* Adjust code error for repo.

This commit is contained in:
caoyanyi
2023-12-05 08:54:13 +08:00
parent 41ed43b6a9
commit 856f1edb9f
2 changed files with 3 additions and 15 deletions
-13
View File
@@ -43,19 +43,6 @@ class gitModel extends model
*/
public $users = array();
/**
* Construct function.
*
* @access public
* @return void
*/
public function __construct()
{
parent::__construct();
$this->loadModel('action');
$this->loadModel('repo');
}
/**
* 执行定时任务同步提交信息。
* Sync commit info by cron.
+3 -2
View File
@@ -1259,7 +1259,7 @@ class repoModel extends model
$scm->setEngine($repo);
$logs = $scm->log('', $lastInDB ? $lastInDB->revision : 0);
if(empty($logs)) return false;
if(empty($logs)) return array();
/* Process logs. */
$logs = array_reverse($logs, true);
@@ -1656,6 +1656,7 @@ class repoModel extends model
$this->saveObjectToPms($objects, $action, $changes);
if(isset($this->app->user)) $this->app->user->account = $account;
return !dao::isError();
}
/**
@@ -1793,7 +1794,7 @@ class repoModel extends model
* @access public
* @return string
*/
public function buildURL(string $methodName, string $url, int $revision, string $scm = 'svn'): string
public function buildURL(string $methodName, string $url, string $revision, string $scm = 'svn'): string
{
$buildedURL = helper::createLink($scm, $methodName, "url=&revision=$revision", 'html');
$buildedURL .= strpos($buildedURL, '?') === false ? '?' : '&';