* finish task #3383.
This commit is contained in:
+20
-3
@@ -643,9 +643,8 @@ class gitModel extends model
|
||||
{
|
||||
foreach($actionFiles as $file)
|
||||
{
|
||||
$param = array('url' => helper::safe64Encode($repoRoot . $file), 'revision' => $log->revision);
|
||||
$catLink = trim(html::a(helper::createLink('git', 'cat', $param, 'html'), 'view', '', "class='repolink'"));
|
||||
$diffLink = trim(html::a(helper::createLink('git', 'diff', $param, 'html'), 'diff', '', "class='repolink'"));
|
||||
$catLink = trim(html::a($this->buildURL('cat', $repoRoot . $file, $log->revision), 'view', '', "class='repolink'"));
|
||||
$diffLink = trim(html::a($this->buildURL('diff', $repoRoot . $file, $log->revision), 'diff', '', "class='repolink'"));
|
||||
$diff .= $action . " " . $file . " $catLink ";
|
||||
$diff .= $action == 'M' ? "$diffLink\n" : "\n" ;
|
||||
}
|
||||
@@ -747,4 +746,22 @@ class gitModel extends model
|
||||
{
|
||||
echo helper::now() . " $log\n";
|
||||
}
|
||||
|
||||
/**
|
||||
* Build URL.
|
||||
*
|
||||
* @param string $methodName
|
||||
* @param string $url
|
||||
* @param int $revision
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function buildURL($methodName, $url, $revision)
|
||||
{
|
||||
$buildedURL = helper::createLink('git', $methodName, "path=&revision=$revision", 'html');
|
||||
$buildedURL .= strpos($buildURL, '?') === false ? '?' : '&';
|
||||
$buildedURL .= 'repoUrl=' . helper::safe64Encode($url);
|
||||
|
||||
return $buildedURL;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user