This commit is contained in:
hufangzhou
2021-08-06 11:14:49 +08:00
5 changed files with 21 additions and 10 deletions
+3 -1
View File
@@ -103,7 +103,9 @@ $lang->action->objectTypes['entry'] = '應用';
$lang->action->objectTypes['webhook'] = 'Webhook';
$lang->action->objectTypes['team'] = '團隊';
$lang->action->objectTypes['whitelist'] = '白名單';
$lang->action->objectTypes['pipeline'] = 'GitLib';
$lang->action->objectTypes['pipeline'] = 'GitLab';
$lang->action->objectTypes['gitlab'] = 'GitLab';
$lang->action->objectTypes['jenkins'] = 'Jenkins';
/* 用來描述操作歷史記錄。*/
$lang->action->desc = new stdclass();
+9 -1
View File
@@ -1076,6 +1076,11 @@ class docModel extends model
->where('deleted')->eq(0)
->andWhere($type)->eq($objectID)
->beginIF(!empty($appendLib))->orWhere('id')->eq($appendLib)->fi()
->beginIF($type == 'project')
->andWhere('(execution')->eq(0)
->orWhere('main')->eq(0)
->markRight(1)
->fi()
->orderBy('`order`, id')
->fetchAll('id');
}
@@ -1795,7 +1800,10 @@ class docModel extends model
if($doc->type == 'project') $objectID = $doc->project;
if($doc->type == 'execution') $objectID = $doc->execution;
$html .= '<li>' . html::a(inlink('objectLibs', "type={$doc->type}&objectID=$objectID&libID={$doc->lib}&docID={$doc->id}"), "<i class='icon icon-file-text'></i> " . $doc->title, '', "data-app='doc' title='{$doc->title}'") . '</li>';
$app = $this->app->openApp;
if($app != 'doc') $app = $objectID ? $doc->type : 'doc';
$html .= '<li>' . html::a(inlink('objectLibs', "type={$doc->type}&objectID=$objectID&libID={$doc->lib}&docID={$doc->id}"), "<i class='icon icon-file-text'></i> " . $doc->title, '', "data-app='$app' title='{$doc->title}'") . '</li>';
}
$collectionCount = $this->dao->select('count(id) as count')->from(TABLE_DOC)
+5 -5
View File
@@ -169,7 +169,7 @@ class releaseModel extends model
}
}
if($release->build)
if($release->build)
{
$buildInfo = $this->dao->select('project, branch')->from(TABLE_BUILD)->where('id')->eq($release->build)->fetch();
$release->branch = $buildInfo->branch;
@@ -227,15 +227,15 @@ class releaseModel extends model
->remove('files,labels,allchecker,uid')
->get();
$release = $this->loadModel('file')->processImgURL($release, $this->config->release->editor->edit['id'], $this->post->uid);
/* update release project and branch */
if($release->build)
if($release->build)
{
$buildInfo = $this->dao->select('project, branch')->from(TABLE_BUILD)->where('id')->eq($release->build)->fetch();
$release->branch = $buildInfo->branch;
$release->project = $buildInfo->project;
}
}
$this->dao->update(TABLE_RELEASE)->data($release)
->autoCheck()
->batchCheck($this->config->release->edit->requiredFields, 'notempty')
+1
View File
@@ -586,6 +586,7 @@ class upgrade extends control
die(js::locate($this->createLink('upgrade', 'afterExec', "fromVersion=&processed=no")));
}
$this->view->title = $this->lang->upgrade->mergeRepo;
$this->view->repos = $repos;
$this->view->products = $this->dao->select('id, name')->from(TABLE_PRODUCT)->where('deleted')->eq(0)->fetchPairs();
$this->view->programs = $this->dao->select('id, name')->from(TABLE_PROGRAM)->where('deleted')->eq(0)->andWhere('type')->eq('program')->fetchPairs();
+3 -3
View File
@@ -5213,13 +5213,13 @@ class upgradeModel extends model
$groupPriv = new stdclass();
$groupPriv->group = $groupID;
$groupPriv->module = 'doc';
$groupPriv->method = 'objectlibs';
$groupPriv->method = 'objectLibs';
$this->dao->replace(TABLE_GROUPPRIV)->data($groupPriv)->exec();
$groupPriv->method = 'tablecontents';
$groupPriv->method = 'tableContents';
$this->dao->replace(TABLE_GROUPPRIV)->data($groupPriv)->exec();
$groupPriv->method = 'showfiles';
$groupPriv->method = 'showFiles';
$this->dao->replace(TABLE_GROUPPRIV)->data($groupPriv)->exec();
}
return true;