* Modify restore repo tips.

This commit is contained in:
caoyanyi
2022-08-08 08:51:34 +08:00
parent 0679729a7e
commit ffb8077e2c
7 changed files with 26 additions and 9 deletions
+1
View File
@@ -57,6 +57,7 @@ $lang->action->historyEdit = 'Der Verlauf darf nicht leer sein.';
$lang->action->noDynamic = 'Kein Verlauf. ';
$lang->action->undeletedTips = 'This data did not participate in the merging process during the version upgrade process, so restore is not supported.';
$lang->action->executionNoProject = 'The execution does not belong to a project,please restore the project first';
$lang->action->repoNoServer = 'The repo does not belong to a server,please restore the server first';
$lang->action->repeatChange = '%s with the same name and code already exists in the system, After recovery, the name are \"%s\",the code are \"%s\".';
$lang->action->nameRepeatChange = '%s with the same name already exists in the system, After recovery, the name are \"%s\".';
+1
View File
@@ -57,6 +57,7 @@ $lang->action->historyEdit = 'The history EditBy cannot be empty.';
$lang->action->noDynamic = 'No dynamics. ';
$lang->action->undeletedTips = 'This data did not participate in the merging process during the version upgrade process, so restore is not supported.';
$lang->action->executionNoProject = 'The execution does not belong to a project,please restore the project first';
$lang->action->repoNoServer = 'The repo does not belong to a server,please restore the server first';
$lang->action->repeatChange = '%s with the same name and code already exists in the system, After recovery, the name are \"%s\",the code are \"%s\".';
$lang->action->nameRepeatChange = '%s with the same name already exists in the system, After recovery, the name are \"%s\".';
+1
View File
@@ -57,6 +57,7 @@ $lang->action->historyEdit = "l'historique Edité Par ne peut pas être v
$lang->action->noDynamic = "Pas d'historique.";
$lang->action->undeletedTips = 'This data did not participate in the merging process during the version upgrade process, so restore is not supported.';
$lang->action->executionNoProject = 'The execution does not belong to a project,please restore the project first';
$lang->action->repoNoServer = 'The repo does not belong to a server,please restore the server first';
$lang->action->repeatChange = '%s with the same name and code already exists in the system, After recovery, the name are \"%s\",the code are \"%s\".';
$lang->action->nameRepeatChange = '%s with the same name already exists in the system, After recovery, the name are \"%s\".';
+10 -7
View File
@@ -30,13 +30,16 @@ $lang->action->editComment = 'Sửa nhận xét';
$lang->action->create = 'Thêm nhận xét';
$lang->action->comment = 'Nhận xét';
$lang->action->trashTips = 'Ghi chú: Xóa trong ZenTao là hợp lệ.';
$lang->action->textDiff = 'Định dạng văn bản';
$lang->action->original = 'Định dạng gốc';
$lang->action->confirmHideAll = 'Bạn có muốn ẩn tất cả ghi nhận này?';
$lang->action->needEdit = '%s mà bạn muốn khôi phục. Vui lòng edit it.';
$lang->action->historyEdit = 'Lịch sử người cập nhật không thể trống.';
$lang->action->noDynamic = 'Không có lịch sử. ';
$lang->action->trashTips = 'Ghi chú: Xóa trong ZenTao là hợp lệ.';
$lang->action->textDiff = 'Định dạng văn bản';
$lang->action->original = 'Định dạng gốc';
$lang->action->confirmHideAll = 'Bạn có muốn ẩn tất cả ghi nhận này?';
$lang->action->needEdit = '%s mà bạn muốn khôi phục. Vui lòng edit it.';
$lang->action->historyEdit = 'Lịch sử người cập nhật không thể trống.';
$lang->action->noDynamic = 'Không có lịch sử. ';
$lang->action->undeletedTips = 'This data did not participate in the merging process during the version upgrade process, so restore is not supported.';
$lang->action->executionNoProject = 'The execution does not belong to a project,please restore the project first';
$lang->action->repoNoServer = 'The repo does not belong to a server,please restore the server first';
$lang->action->history = new stdclass();
$lang->action->history->action = 'Liên kết';
+1
View File
@@ -57,6 +57,7 @@ $lang->action->historyEdit = '历史记录编辑不能为空。';
$lang->action->noDynamic = '暂时没有动态。';
$lang->action->undeletedTips = '该数据在版本升级过程中未参与数据归并流程,不支持还原。';
$lang->action->executionNoProject = '该执行没有所属的项目,请先还原项目再还原执行';
$lang->action->repoNoServer = '该代码库没有所属的服务器,请先还原服务器再还原代码库';
$lang->action->repeatChange = '系统内已有同名、同代号的%s,恢复后名称为\"%s\"、代号为\"%s\"。';
$lang->action->nameRepeatChange = '系统内已有同名的%s,恢复后名称为\"%s\"。';
+10
View File
@@ -1727,6 +1727,16 @@ class actionModel extends model
if((int)$projectCount == 0) return print(js::error($this->lang->action->executionNoProject));
}
if($action->objectType == 'repo')
{
$repo = $this->dao->select('*')->from(TABLE_REPO)->where('id')->eq($action->objectID)->fetch();
if($repo and in_array($repo->SCM, array('Gitlab', 'Gitea', 'Gogs')))
{
$server = $this->dao->select('*')->from(TABLE_PIPELINE)->where('id')->eq($repo->serviceHost)->andWhere('deleted')->eq('0')->fetch();
if(empty($server)) return print(js::error($this->lang->action->repoNoServer));
}
}
if($action->objectType == 'product')
{
$product = $this->dao->select('id,name,code,acl')->from(TABLE_PRODUCT)->where('id')->eq($action->objectID)->fetch();
+2 -2
View File
@@ -228,8 +228,8 @@ class gitlab extends control
{
if($confirm != 'yes') return print(js::confirm($this->lang->gitlab->confirmDelete, inlink('delete', "id=$id&confirm=yes")));
$oldGitea = $this->loadModel('pipeline')->getByID($id);
$actionID = $this->pipeline->delete($id, 'gitlab');
$oldGitlab = $this->loadModel('pipeline')->getByID($id);
$actionID = $this->pipeline->delete($id, 'gitlab');
if(!$actionID) return print(js::error($this->lang->pipeline->delError));
$gitLab = $this->gitlab->getByID($id);