Merge branch 'master' of https://gitlab.zcorp.cc/easycorp/zentaopms into zentaopms_289

This commit is contained in:
caoyanyi
2023-02-15 09:13:10 +08:00
24 changed files with 77 additions and 70 deletions
+1 -1
View File
@@ -227,7 +227,7 @@ $config->openMethods[] = 'doc.createbasicinfo';
$config->openMethods[] = 'project.createguide';
$config->openMethods[] = 'task.editteam';
$config->openMethods[] = 'feedback.mergeproductmodule';
$config->openMethods[] = 'zanode.nodeList';
$config->openMethods[] = 'zanode.nodelist';
$config->openModules = array();
$config->openModules[] = 'install';
+2 -2
View File
@@ -120,8 +120,8 @@ $lang->admin->safe->modeList[0] = 'N/A';
$lang->admin->safe->modeList[1] = 'Medium';
$lang->admin->safe->modeList[2] = 'Stark';
$lang->admin->safe->modeRuleList[1] = 'Beinhaltet Groß und Kleinbuchstaben sowie Ziffern. Länge >= 6.';
$lang->admin->safe->modeRuleList[2] = 'Beinhaltet Groß und Kleinbuchstaben, Ziffern sowie Sonderzeichen. Länge >= 10.';
$lang->admin->safe->modeRuleList[1] = 'Beinhaltet Groß und Kleinbuchstaben sowie Ziffern. Länge 6.';
$lang->admin->safe->modeRuleList[2] = ' ≥ 10 letters, combination of uppercase, lowercase letters, numbers, and special symbols.';
$lang->admin->safe->reasonList['weak'] = 'Bekannte Schwache Passwörter';
$lang->admin->safe->reasonList['account'] = 'Entspricht ihrem Konto';
+3 -3
View File
@@ -120,8 +120,8 @@ $lang->admin->safe->modeList[0] = 'I don\'t care.';
$lang->admin->safe->modeList[1] = 'Medium';
$lang->admin->safe->modeList[2] = 'Strong';
$lang->admin->safe->modeRuleList[1] = ' >= 6 upper and lower case, and numbers.';
$lang->admin->safe->modeRuleList[2] = ' >= 10 upper and lower case, numbers and special characters.';
$lang->admin->safe->modeRuleList[1] = ' 6 upper and lower case, and numbers.';
$lang->admin->safe->modeRuleList[2] = ' 10 letters, combination of uppercase, lowercase letters, numbers, and special symbols.';
$lang->admin->safe->reasonList['weak'] = 'Common Weak Password';
$lang->admin->safe->reasonList['account'] = 'Same as account';
@@ -141,4 +141,4 @@ $lang->admin->safe->resetPWDList[0] = 'Off';
$lang->admin->safe->noticeMode = 'The password will be checked when creating and modifying user information, and changing passwords.';
$lang->admin->safe->noticeWeakMode = 'The password will be checked when logging into the system, creating and modifying user information, and changing passwords.';
$lang->admin->safe->noticeStrong = 'The longer the password, the more letters, numbers, or special characters it contains, and the less repetitive the password, the more secure it is!';
$lang->admin->safe->noticeGd = 'Your server does not have GD module installed, you cannot use the Captcha function, Please use it after installation.';
$lang->admin->safe->noticeGd = 'Your server does not have GD module installed, you cannot use the Captcha function, Please use it after installation.';
+2 -2
View File
@@ -120,8 +120,8 @@ $lang->admin->safe->modeList[0] = "Contrôle Modéré";
$lang->admin->safe->modeList[1] = 'Contrôle Moyen';
$lang->admin->safe->modeList[2] = 'Contrôle Fort';
$lang->admin->safe->modeRuleList[1] = ' >= 6 Majuscules, minuscules et chiffres.';
$lang->admin->safe->modeRuleList[2] = ' >= 10 Majuscules, minuscules, chiffres et caractères spéciaux.';
$lang->admin->safe->modeRuleList[1] = ' 6 Majuscules, minuscules et chiffres.';
$lang->admin->safe->modeRuleList[2] = ' 10 letters, combination of uppercase, lowercase letters, numbers, and special symbols.';
$lang->admin->safe->reasonList['weak'] = 'Mots de passe faibles courants';
$lang->admin->safe->reasonList['account'] = 'Identique au compte';
+1 -1
View File
@@ -121,7 +121,7 @@ $lang->admin->safe->modeList[1] = '中';
$lang->admin->safe->modeList[2] = '强';
$lang->admin->safe->modeRuleList[1] = '6位及以上,包含大小写字母,数字。';
$lang->admin->safe->modeRuleList[2] = '10位及以上,包含字母,数字,特殊字符。';
$lang->admin->safe->modeRuleList[2] = '10位及以上,包含大小写字母,数字,特殊字符。';
$lang->admin->safe->reasonList['weak'] = '常用弱口令';
$lang->admin->safe->reasonList['account'] = '与帐号相同';
+1 -1
View File
@@ -166,7 +166,7 @@ class blockModel extends model
{
$data = array();
$tasks = $this->dao->select("count(t1.id) as tasks, count(if(t1.status = 'done', 1, null)) as doneTasks")->from(TABLE_TASK)->alias('t1')
$tasks = $this->dao->select("count(distinct t1.id) as tasks, count(distinct if(t1.status = 'done', 1, null)) as doneTasks")->from(TABLE_TASK)->alias('t1')
->leftJoin(TABLE_PROJECT)->alias('t2')->on("t1.project = t2.id")
->leftJoin(TABLE_EXECUTION)->alias('t3')->on("t1.execution = t3.id")
->leftJoin(TABLE_TASKTEAM)->alias('t4')->on("t4.task = t1.id and t4.account = '{$this->app->user->account}'")
+2 -2
View File
@@ -10,7 +10,7 @@
</div>
<style>
.flow-chart-row {display: flex; gap: 5px; margin-bottom: 9px; width: 100%;}
.flow-item {background: url('/static/svg/arrow-blue.svg') center no-repeat; background-size: cover; text-align: center; margin: 0; padding-right: 15px; flex:0 1 15%; position: relative; padding: 5px 0 5px 8px; white-space:nowrap; overflow: hidden; color: #3c4353; display: flex; align-items: center; text-align: center; padding-right: 10px;}
.flow-item {background: url('static/svg/arrow-blue.svg') center no-repeat; background-size: cover; text-align: center; margin: 0; padding-right: 15px; flex:0 1 15%; position: relative; padding: 5px 0 5px 8px; white-space:nowrap; overflow: hidden; color: #3c4353; display: flex; align-items: center; text-align: center; padding-right: 10px;}
.ie-8 .flow-item > div:before {display: none}
.flow-item > div:before {border-left-color: #fff; z-index: 1}
.flow-item > div > div {display: flow-root; overflow: hidden;}
@@ -22,7 +22,7 @@
.flow-item-2,
.flow-item-3,
.flow-item-4,
.flow-item-5 {background-image: url('/static/svg/arrow-white.svg'); }
.flow-item-5 {background-image: url('static/svg/arrow-white.svg'); }
.block-sm .flow-item {padding-right: 5px}
.block-sm .flow-item > div:before, .block-sm .flow-item > div:after {border-width: 15px 0 15px 6px;}
+1 -1
View File
@@ -288,7 +288,7 @@ class bug extends control
}
$project = $this->loadModel('project')->getByShadowProduct($productID);
if(!$project->multiple) unset($this->lang->bug->report->charts['bugsPerExecution']);
if(!empty($project) and !$project->multiple) unset($this->lang->bug->report->charts['bugsPerExecution']);
$this->qa->setMenu($this->products, $productID, $branchID);
$this->view->title = $this->products[$productID] . $this->lang->colon . $this->lang->bug->common . $this->lang->colon . $this->lang->bug->reportChart;
+2 -2
View File
@@ -584,8 +584,8 @@ $lang->admin->menu->system = array('link' => "{$lang->admin->system}|custom|m
$lang->admin->menu->model['dropMenu'] = new stdclass();
$lang->admin->menu->model['dropMenu']->allModel = array('link' => "{$lang->globalSetting}|custom|browsestoryconcept|", 'subModule' => 'measurement,report,sqlbuilder,subject,custom,meetingroom,baseline');
if($config->edition == 'max') $lang->admin->menu->model['dropMenu']->scrum = array('link' => "{$lang->scrumModel}|auditcl|scrumbrowse|processID=0&browseType=scrum", 'subModule' => 'auditcl,process,activity,zoutput,classify,');
$lang->admin->menu->model['dropMenu']->waterfall = array('link' => "{$lang->waterfallModel}|stage|setType|", 'subModule' => 'stage,auditcl,cmcl,process,activity,zoutput,classify,reviewcl,reviewsetting,design');
if($config->edition == 'max') $lang->admin->menu->model['dropMenu']->scrum = array('link' => "{$lang->scrumModel}|auditcl|scrumbrowse|processID=0&browseType=scrum", 'subModule' => 'auditcl,process,activity,zoutput,classify,', 'exclude' => 'process-browse');
$lang->admin->menu->model['dropMenu']->waterfall = array('link' => "{$lang->waterfallModel}|stage|setType|", 'subModule' => 'stage,auditcl,cmcl,process,activity,zoutput,classify,reviewcl,reviewsetting,design', 'exclude' => 'process-scrumbrowse');
$lang->admin->menu->allModel['subMenu'] = new stdclass();
$lang->admin->menu->allModel['subMenu']->storyConcept = array('link' => "{$lang->storyConcept}|custom|browsestoryconcept|");
+8 -3
View File
@@ -1220,8 +1220,9 @@ class commonModel extends model
}
else
{
$subModule = isset($dropMenuItem['subModule']) ? explode(',', $dropMenuItem['subModule']) : array();
if($subModule and in_array($currentModule, $subModule) and strpos(",$exclude,", ",$currentModule-$currentMethod,") === false) $activeMainMenu = true;
$subModule = isset($dropMenuItem['subModule']) ? explode(',', $dropMenuItem['subModule']) : array();
$subExclude = isset($dropMenuItem['exclude']) ? $dropMenuItem['exclude'] : $exclude;
if($subModule and in_array($currentModule, $subModule) and strpos(",$subExclude,", ",$currentModule-$currentMethod,") === false) $activeMainMenu = true;
}
if($activeMainMenu)
@@ -2659,7 +2660,11 @@ EOD;
if($this->app->user->account == $program->openedBy or $this->app->user->account == $program->PM) $program->auth = 'extend';
if($program->auth == 'extend') $this->app->user->rights['rights'] = array_merge_recursive($programRightGroup, $rights);
if($program->auth == 'extend')
{
$this->app->user->rights['rights'] = array_merge_recursive($programRightGroup, $rights);
$this->session->set('user', $this->app->user);
}
if($program->auth == 'reset')
{
/* If priv way is reset, unset common program priv, and cover by program priv. */
+2 -2
View File
@@ -159,13 +159,13 @@ class gitModel extends model
$lastInDB = $this->repo->getLatestCommit($repo->id);
/* Ignore unsynced branch. */
if(empty($lastInDB))
if($repo->synced != 1)
{
if($printLog) $this->printLog("Please init repo {$repo->name}");
continue;
}
$version = (int)$lastInDB->commit + 1;
$version = isset($lastInDB->commit) ? (int)$lastInDB->commit + 1 : 1;
$logs = $this->repo->getUnsyncedCommits($repo);
$objects = array();
if(!empty($logs))
-7
View File
@@ -69,13 +69,6 @@ $(function()
infoShowed = true;
}
if(href !== '')
{
type = href == '#stories' ? 'story' : (href == '#bugs' ? 'bug' : 'planInfo');
var viewLink = createLink('productplan', 'view', 'planID=' + planID + '&type=' + type + (typeof(param) == 'undefined' ? '' : param) + (typeof(orderBy) == 'undefined' ? '' : "&orderBy=" + orderBy));
if(type == 'planInfo') viewLink = createLink('productplan', 'view', 'planID=' + planID + '&type=' + type);
self.location.href = viewLink;
}
});
$('#storyList').on('sort.sortable', function(e, data)
-21
View File
@@ -68,26 +68,5 @@ $(function()
infoShowed = true;
}
if(href !== '')
{
switch(href)
{
case '#stories':
type = 'story';
break;
case '#bugs':
type = 'bug';
break;
case '#leftBugs':
type = 'leftBug';
break;
case '#releaseInfo':
type = 'releaseInfo';
break;
}
var viewLink = createLink('release', 'view', 'releaseID=' + releaseID + '&type=' + type + '&link=' + link + (typeof(param) == 'undefined' ? '' : param) + (typeof(orderBy) == 'undefined' ? '' : "&orderBy=" + orderBy));
if(type == 'releaseInfo') viewLink = createLink('release', 'view', 'releaseID=' + releaseID + '&type=' + type);
self.location.href = viewLink;
}
});
})
+1 -13
View File
@@ -598,19 +598,7 @@ class repo extends control
}
/* Refresh repo. */
if($refresh)
{
/* Update code commit history. */
$commentGroup = $this->loadModel('job')->getTriggerGroup('commit', array($repo->id));
if(in_array($repo->SCM, $this->config->repo->gitTypeList))
{
$branch = $this->cookie->repoBranch;
$this->loadModel('git')->updateCommit($repo, $commentGroup, false);
$_COOKIE['repoBranch'] = $branch;
}
if($repo->SCM == 'Subversion') $this->loadModel('svn')->updateCommit($repo, $commentGroup, false);
}
if($refresh) $this->repo->updateCommit($repoID);
/* Get files info. */
$infos = $this->repo->getFileCommits($repo, $branchID, $path);
+29 -2
View File
@@ -333,8 +333,13 @@ class repoModel extends model
if($type == 'task') $links = $this->post->tasks;
$revisionInfo = $this->dao->select('*')->from(TABLE_REPOHISTORY)->where('repo')->eq($repoID)->andWhere('revision')->eq($revision)->fetch();
$revisionID = $revisionInfo->id;
$committer = $this->dao->select('account')->from(TABLE_USER)->where('commiter')->eq($revisionInfo->committer)->fetch('account');
if(empty($revisionInfo)) $this->updateCommit($repoID);
$revisionInfo = $this->dao->select('*')->from(TABLE_REPOHISTORY)->where('repo')->eq($repoID)->andWhere('revision')->eq($revision)->fetch();
if(empty($revisionInfo)) return false;
$revisionID = $revisionInfo->id;
$committer = $this->dao->select('account')->from(TABLE_USER)->where('commiter')->eq($revisionInfo->committer)->fetch('account');
if(empty($committer)) $committer = $revisionInfo->committer;
foreach($links as $linkID)
{
@@ -2769,4 +2774,26 @@ class repoModel extends model
$linkedProjects = $this->dao->select('id,name')->from(TABLE_PROJECT)->where('id')->in($projectIDList)->fetchPairs('id', 'name');
return $accessProjects + $linkedProjects; // Merge projects can be accessed and exists.
}
/**
* Update commit history.
*
* @param int $repoID
* @access public
* @return void
*/
public function updateCommit($repoID)
{
$repo = $this->getRepoByID($repoID);
/* Update code commit history. */
$commentGroup = $this->loadModel('job')->getTriggerGroup('commit', array($repoID));
if(in_array($repo->SCM, $this->config->repo->gitTypeList))
{
$branch = $this->cookie->repoBranch;
$this->loadModel('git')->updateCommit($repo, $commentGroup, false);
$_COOKIE['repoBranch'] = $branch;
}
if($repo->SCM == 'Subversion') $this->loadModel('svn')->updateCommit($repo, $commentGroup, false);
}
}
+2 -1
View File
@@ -30,4 +30,5 @@ tbody > tr > td .icon-share {font-size: 9px;}
#mainMenu .pull-left .dividing-line {margin: 7px 5px 0 0;}
.btn-toolbar>.btn, .btn-toolbar>.btn-group, .btn-toolbar>.dropdown {margin-right: 5px;}
.checkbox-primary{float: left;}
#mainMenu > .btn-toolbar > .checkbox-primary{float: left;}
+1
View File
@@ -78,6 +78,7 @@ function checkDangerExtensions(file)
{
alert(<?php echo json_encode($this->lang->file->dangerFile);?>);
$(file).val('');
$('.file-input-normal').last().remove()
return false;
}
+11 -1
View File
@@ -852,10 +852,20 @@ class transferModel extends model
{
$productID = array();
foreach($stories as $values) $productID[] = $values->product;
$product = array_unique($productID);
$storyDatas = end($stories);
$lastBranch = $storyDatas->branch;
$lastType = $storyDatas->type;
$stories = $this->loadModel('story')->mergePlanTitle($productID , $stories, $lastBranch, $lastType);
if($storyDatas->type == 'requirement')
{
$stories = $this->loadModel('story')->mergePlanTitle($productID , $stories, $lastBranch, $lastType);
}
elseif($storyDatas->type == 'story')
{
return $stories;
}
return $stories;
}
+2 -2
View File
@@ -7,13 +7,13 @@ $('#hostList tr[data-status="wait"]').hover(function(){
if(showFeature)
{
var encodedHelpPageUrl = encodeURIComponent('https://www.zentao.net/book/zentaopms/978.html?fullScreen=zentao');
var urlForNewTab = window.location.origin + '#app=help&url=' + encodedHelpPageUrl;
var urlForNewTab = webRoot + '#app=help&url=' + encodedHelpPageUrl;
window.open(urlForNewTab)
}
$('#helpTab').click(function()
{
var encodedHelpPageUrl = encodeURIComponent('https://www.zentao.net/book/zentaopms/978.html?fullScreen=zentao');
var urlForNewTab = window.location.origin + '#app=help&url=' + encodedHelpPageUrl;
var urlForNewTab = webRoot + '#app=help&url=' + encodedHelpPageUrl;
window.open(urlForNewTab)
})
+1
View File
@@ -14,6 +14,7 @@
<?php js::set('confirmDelete', $lang->zahost->confirmDelete)?>
<?php js::set('browseType', $browseType);?>
<?php js::set('showFeature', $showFeature);?>
<?php js::set('webRoot', getWebRoot());?>
<div id='mainMenu' class='clearfix'>
<div class='pull-left btn-toolbar'>
<a href='#' class='btn btn-link querybox-toggle' id='bysearchTab'><i class='icon-search icon'></i> <?php echo $lang->zahost->byQuery;?></a>
+2 -2
View File
@@ -1,13 +1,13 @@
if(showFeature)
{
var encodedHelpPageUrl = encodeURIComponent('https://www.zentao.net/book/zentaopms/978.html?fullScreen=zentao');
var urlForNewTab = window.location.origin + '#app=help&url=' + encodedHelpPageUrl;
var urlForNewTab = webRoot + '#app=help&url=' + encodedHelpPageUrl;
window.open(urlForNewTab)
}
$('#helpTab').click(function()
{
var encodedHelpPageUrl = encodeURIComponent('https://www.zentao.net/book/zentaopms/978.html?fullScreen=zentao');
var urlForNewTab = window.location.origin + '#app=help&url=' + encodedHelpPageUrl;
var urlForNewTab = webRoot + '#app=help&url=' + encodedHelpPageUrl;
window.open(urlForNewTab)
})
+1 -1
View File
@@ -180,7 +180,7 @@ $('.btn-pwd-show').live('click', function()
$('#jumpManual').click(function()
{
var encodedHelpPageUrl = encodeURIComponent('https://www.zentao.net/book/zentaopms/974.html?fullScreen=zentao');
var urlForNewTab = window.location.origin + '#app=help&url=' + encodedHelpPageUrl;
var urlForNewTab = webRoot + '#app=help&url=' + encodedHelpPageUrl;
window.open(urlForNewTab)
})
+1
View File
@@ -18,6 +18,7 @@
<?php js::set('confirmShutdown', $lang->zanode->confirmShutdown) ?>
<?php js::set('actionSuccess', $lang->zanode->actionSuccess) ?>
<?php js::set('showFeature', $showFeature);?>
<?php js::set('webRoot', getWebRoot());?>
<div id='mainMenu' class='clearfix'>
<div class='pull-left btn-toolbar'>
<?php echo html::a($this->createLink('zanode', 'browse'), "<span class='text'>{$lang->zanode->all}</span>", '', "class='btn btn-link btn-active-text'"); ?>
+1
View File
@@ -21,6 +21,7 @@
<?php js::set('nodeID', $zanode->id) ?>
<?php js::set('zanodeLang', $lang->zanode); ?>
<?php js::set('nodeStatus', $zanode->status); ?>
<?php js::set('webRoot', getWebRoot());?>
<?php $browseLink = $this->session->zanodeList ? $this->session->zanodeList : $this->createLink('zanode', 'browse', ""); ?>
<?php
$vars = "id={$zanode->id}&orderBy=%s";