Merge branch 'master' of https://gitlab.zcorp.cc/easycorp/zentaopms
This commit is contained in:
2
extension/lite/action/ext/model/hook/create.lite.php
Normal file
2
extension/lite/action/ext/model/hook/create.lite.php
Normal file
@@ -0,0 +1,2 @@
|
||||
<?php
|
||||
if(strtolower($objectType) == 'api' && count($this->loadModel('user')->getVisionList()) < 2) return false;
|
||||
@@ -58,7 +58,6 @@ $lang->my->menu->index = array('link' => "$lang->dashboard|my|index");
|
||||
$lang->my->menu->calendar = array('link' => "$lang->calendar|my|calendar|", 'subModule' => 'todo', 'alias' => 'todo');
|
||||
$lang->my->menu->task = array('link' => "{$lang->task->common}|my|contribute|mode=task&type=assignedTo", 'subModule' => 'task');
|
||||
$lang->my->menu->contacts = array('link' => "$lang->contact|my|managecontacts|");
|
||||
if($config->systemScore) $lang->my->menu->score = array('link' => "{$lang->score->shortCommon}|my|score|", 'subModule' => 'score');
|
||||
|
||||
global $config;
|
||||
if($config->edition != 'open') $lang->my->menu->effort = array('link' => 'Effort|effort|calendar|', 'exclude' => 'my-todo');
|
||||
|
||||
@@ -30,8 +30,8 @@ if($config->edition != 'open')
|
||||
/* Menu order. */
|
||||
$lang->mainNav->menuOrder = array();
|
||||
$lang->mainNav->menuOrder[5] = 'my';
|
||||
$lang->mainNav->menuOrder[20] = 'project';
|
||||
$lang->mainNav->menuOrder[30] = 'kanban';
|
||||
$lang->mainNav->menuOrder[10] = 'project';
|
||||
$lang->mainNav->menuOrder[15] = 'kanban';
|
||||
$lang->mainNav->menuOrder[35] = 'doc';
|
||||
$lang->mainNav->menuOrder[45] = 'system';
|
||||
$lang->mainNav->menuOrder[65] = 'admin';
|
||||
@@ -58,7 +58,6 @@ $lang->my->menu->index = array('link' => "$lang->dashboard|my|index");
|
||||
$lang->my->menu->calendar = array('link' => "$lang->calendar|my|calendar|", 'subModule' => 'todo', 'alias' => 'todo');
|
||||
$lang->my->menu->task = array('link' => "{$lang->task->common}|my|contribute|mode=task&type=assignedTo", 'subModule' => 'task');
|
||||
$lang->my->menu->contacts = array('link' => "$lang->contact|my|managecontacts|");
|
||||
if($config->systemScore) $lang->my->menu->score = array('link' => "{$lang->score->shortCommon}|my|score|", 'subModule' => 'score');
|
||||
|
||||
global $config;
|
||||
if($config->edition != 'open') $lang->my->menu->effort = array('link' => '日志|effort|calendar|', 'exclude' => 'my-todo');
|
||||
|
||||
@@ -25,4 +25,4 @@ $lang->custom->story->fields['reviewRules'] = 'Review Rules';
|
||||
$lang->custom->story->fields['reviewResultList'] = 'Review Result';
|
||||
$lang->custom->story->fields['review'] = 'Need Review';
|
||||
|
||||
if($this->config->edition != 'open') $lang->custom->system = array('required', 'score');
|
||||
$lang->custom->system = array('required');
|
||||
|
||||
@@ -26,4 +26,4 @@ $lang->custom->story->fields['reviewRules'] = '评审规则';
|
||||
$lang->custom->story->fields['reviewResultList'] = '评审结果';
|
||||
$lang->custom->story->fields['review'] = '评审流程';
|
||||
|
||||
if($this->config->edition != 'open') $lang->custom->system = array('required', 'score');
|
||||
$lang->custom->system = array('required');
|
||||
|
||||
@@ -8,4 +8,4 @@ $lang->kanban->taskColumn['canceled'] = 'Canceled';
|
||||
$lang->kanban->taskColumn['closed'] = 'Closed';
|
||||
|
||||
$lang->kanban->importCards = 'Enable the import function, you can only import cards that you have permission to view.';
|
||||
$lang->kanban->common = 'Common Kanban';
|
||||
$lang->kanban->common = 'Kanban';
|
||||
|
||||
@@ -8,4 +8,4 @@ $lang->kanban->taskColumn['canceled'] = '已取消';
|
||||
$lang->kanban->taskColumn['closed'] = '已关闭';
|
||||
|
||||
$lang->kanban->importCards = '启用导入功能,只能导入自己有权限查看的卡片';
|
||||
$lang->kanban->common = '通用看板';
|
||||
$lang->kanban->common = '看板';
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
<?php
|
||||
unset($lang->misc->zentao->service);
|
||||
unset($lang->misc->zentao->about['bizversion']);
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
<?php
|
||||
unset($lang->misc->zentao->service);
|
||||
unset($lang->misc->zentao->about['bizversion']);
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<script>
|
||||
$('#zentaoLinks > .row > .col-sm-2').removeClass('col-sm-2').addClass('col-sm-4');
|
||||
$('#mainContent tbody > tr:first-child > td.text-center > h4').text('<?php printf($lang->misc->zentao->version, $config->liteVersion);?>');
|
||||
</script>
|
||||
|
||||
@@ -365,6 +365,13 @@ function loadLaneGroup(regionID)
|
||||
$('#otherLane').replaceWith(data);
|
||||
$('#otherLane_chosen').remove();
|
||||
$('#otherLane').chosen();
|
||||
|
||||
/* Hide region and lane select if there are only one of each. */
|
||||
if($('#otherLane').children().length < 2 && $('#region').children().length < 2)
|
||||
{
|
||||
$('#region').parent().parent().addClass('hide');
|
||||
$('#otherLane').parent().parent().addClass('hide');
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -346,7 +346,7 @@ class apiModel extends model
|
||||
}
|
||||
if($version)
|
||||
{
|
||||
$fields = 'spec.*,api.id,api.product,api.lib,api.version,doc.name as libName,module.name as moduleName,api.editedBy,api.editedDate';
|
||||
$fields = 'spec.*,api.id,api.product,api.lib,api.version,api.paramsExample,api.responseExample,doc.name as libName,module.name as moduleName,api.editedBy,api.editedDate';
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -482,6 +482,9 @@ class commonModel extends model
|
||||
$userVisions = array_filter(explode(',', $app->user->visions));
|
||||
$configVisions = array_filter(explode(',', trim($config->visions, ',')));
|
||||
|
||||
/* The standalone lite version removes the lite interface button */
|
||||
if(trim($config->visions, ',') == 'lite') return true;
|
||||
|
||||
if($app->config->systemMode != 'new') return print("<div>{$lang->visionList['rnd']}</div>");
|
||||
|
||||
if(count($userVisions) < 2) return print("<div>{$lang->visionList[$currentVision]}</div>");
|
||||
|
||||
@@ -2378,7 +2378,7 @@ EOT;
|
||||
if(common::hasPriv('doc', 'edit'))
|
||||
{
|
||||
$treeMenu[0] .= "<div class='tree-actions'>";
|
||||
$treeMenu[0] .= html::a(helper::createLink('doc', 'edit', "docID={$doc->id}&comment=false&objectType=$type&objectID=$objectID&libID=$rootID"), "<i class='icon icon-edit'></i>", '', "title={$this->lang->doc->edit}");
|
||||
$treeMenu[0] .= html::a(helper::createLink('doc', 'edit', "docID={$doc->id}&comment=false&objectType=$type&objectID=$objectID&libID=$rootID"), "<i class='icon icon-edit'></i>", '', "title={$this->lang->doc->edit} data-app='{$this->app->tab}'");
|
||||
$treeMenu[0] .= '</div></div>';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -396,25 +396,25 @@ class userModel extends model
|
||||
$users->account[$i] = trim($users->account[$i]);
|
||||
if($users->account[$i] != '')
|
||||
{
|
||||
if(strtolower($users->account[$i]) == 'guest') helper::end(js::error(sprintf($this->lang->user->error->reserved, $i + 1)));
|
||||
if(strtolower($users->account[$i]) == 'guest') helper::end(js::error(sprintf($this->lang->user->error->reserved, $i)));
|
||||
$account = $this->dao->select('account')->from(TABLE_USER)->where('account')->eq($users->account[$i])->fetch();
|
||||
if($account) helper::end(js::error(sprintf($this->lang->user->error->accountDupl, $i + 1)));
|
||||
if(in_array($users->account[$i], $accounts)) helper::end(js::error(sprintf($this->lang->user->error->accountDupl, $i + 1)));
|
||||
if(!validater::checkAccount($users->account[$i])) helper::end(js::error(sprintf($this->lang->user->error->account, $i + 1)));
|
||||
if($users->realname[$i] == '') helper::end(js::error(sprintf($this->lang->user->error->realname, $i + 1)));
|
||||
if(empty($users->visions[$i])) helper::end(js::error(sprintf($this->lang->user->error->visions, $i + 1)));
|
||||
if($users->email[$i] and !validater::checkEmail($users->email[$i])) helper::end(js::error(sprintf($this->lang->user->error->mail, $i + 1)));
|
||||
if($account) helper::end(js::error(sprintf($this->lang->user->error->accountDupl, $i)));
|
||||
if(in_array($users->account[$i], $accounts)) helper::end(js::error(sprintf($this->lang->user->error->accountDupl, $i)));
|
||||
if(!validater::checkAccount($users->account[$i])) helper::end(js::error(sprintf($this->lang->user->error->account, $i)));
|
||||
if($users->realname[$i] == '') helper::end(js::error(sprintf($this->lang->user->error->realname, $i)));
|
||||
if(empty($users->visions[$i])) helper::end(js::error(sprintf($this->lang->user->error->visions, $i)));
|
||||
if($users->email[$i] and !validater::checkEmail($users->email[$i])) helper::end(js::error(sprintf($this->lang->user->error->mail, $i)));
|
||||
$users->password[$i] = (isset($prev['password']) and $users->ditto[$i] == 'on' and !$this->post->password[$i]) ? $prev['password'] : $this->post->password[$i];
|
||||
if(!validater::checkReg($users->password[$i], '|(.){6,}|')) helper::end(js::error(sprintf($this->lang->user->error->password, $i + 1)));
|
||||
if(!validater::checkReg($users->password[$i], '|(.){6,}|')) helper::end(js::error(sprintf($this->lang->user->error->password, $i)));
|
||||
$role = $users->role[$i] == 'ditto' ? (isset($prev['role']) ? $prev['role'] : '') : $users->role[$i];
|
||||
$visions = in_array('ditto', $users->visions[$i]) ? (isset($prev['visions']) ? $prev['visions'] : array()) : $users->visions[$i];
|
||||
|
||||
/* Check weak and common weak password. */
|
||||
if(isset($this->config->safe->mode) and $this->computePasswordStrength($users->password[$i]) < $this->config->safe->mode) helper::end(js::error(sprintf($this->lang->user->error->weakPassword, $i + 1)));
|
||||
if(isset($this->config->safe->mode) and $this->computePasswordStrength($users->password[$i]) < $this->config->safe->mode) helper::end(js::error(sprintf($this->lang->user->error->weakPassword, $i)));
|
||||
if(!empty($this->config->safe->changeWeak))
|
||||
{
|
||||
if(!isset($this->config->safe->weak)) $this->app->loadConfig('admin');
|
||||
if(strpos(",{$this->config->safe->weak},", ",{$users->password[$i]},") !== false) helper::end(js::error(sprintf($this->lang->user->error->dangerPassword, $i + 1, $this->config->safe->weak)));
|
||||
if(strpos(",{$this->config->safe->weak},", ",{$users->password[$i]},") !== false) helper::end(js::error(sprintf($this->lang->user->error->dangerPassword, $i, $this->config->safe->weak)));
|
||||
}
|
||||
|
||||
$data[$i] = new stdclass();
|
||||
|
||||
Reference in New Issue
Block a user