* Finish task #50709.

This commit is contained in:
liyuchun
2022-03-14 15:53:33 +08:00
parent 89aea98b25
commit 7d40bdf1d3
4 changed files with 9 additions and 2 deletions

View File

@@ -374,6 +374,11 @@ class repo extends control
/* Get repo and synchronous commit. */
$repo = $this->repo->getRepoByID($repoID);
if($repo->SCM == 'Git' and !is_dir($repo->path))
{
$error = sprintf($this->lang->repo->error->notFound, $repo->name, $repo->path);
return print(js::error($error) . js::locate($this->repo->createLink('maintain')));
}
if(!$repo->synced) $this->locate($this->repo->createLink('showSyncCommit', "repoID=$repoID"));
/* Set branch for git. */

View File

@@ -185,6 +185,7 @@ $lang->repo->error->encoding = "The encoding might be wrong. Please change
$lang->repo->error->deleted = "Deletion of the repository failed. The current repository has a commit record associated with the design.";
$lang->repo->error->linkedJob = "Deletion of the repository failed. The current repository has associated with the Compile.";
$lang->repo->error->clientPath = "The client installation directory cannot have spaces!";
$lang->repo->error->notFound = "The repository %ss URL %s does not exist. Please confirm if this repository has been deleted from the local server.";
$lang->repo->syncTips = '<strong>You may find the reference about how to set Git sync from <a target="_blank" href="https://www.zentao.pm/book/zentaomanual/free-open-source-project-management-software-git-105.html">here</a>.</strong>';
$lang->repo->encodingsTips = "The encodings of comments can be comma separated values, e.g. utf-8.";

View File

@@ -185,6 +185,7 @@ $lang->repo->error->encoding = "编码可能错误,请更换编码重试
$lang->repo->error->deleted = "删除版本库失败,当前版本库有提交记录与设计关联";
$lang->repo->error->linkedJob = "删除版本库失败,当前版本库与构建有关联,请取消关联或删除构建。";
$lang->repo->error->clientPath = "客户端安装目录不能有空格!";
$lang->repo->error->notFound = "版本库『%s』路径 %s 不存在,请确认此版本库是否已在本地服务器被删除";
$lang->repo->syncTips = '请参照<a target="_blank" href="https://www.zentao.net/book/zentaopmshelp/207.html">这里</a>,设置版本库定时同步。';
$lang->repo->encodingsTips = "提交日志的编码可以用逗号连接起来的多个比如utf-8。";

View File

@@ -359,11 +359,11 @@ class sonarqube extends control
if($search == true) $keyword = $this->session->sonarqubeIssueKeyword;
}
ini_set('memory_limit', '256M');
$cacheFile = $this->sonarqube->getCacheFile($sonarqubeID, $projectKey);
if(!$cacheFile or !file_exists($cacheFile) or (time() - filemtime($cacheFile)) / 60 > $this->config->sonarqube->cacheTime)
{
ini_set('memory_limit', '256M');
$sonarqubeIssueList = $this->sonarqube->apiGetIssues($sonarqubeID, $projectKey);
foreach($sonarqubeIssueList as $key => $sonarqubeIssue)
{