Merge branch '15.0.beta3' of https://gitlab.zcorp.cc/easycorp/zentaopms into 15.0.beta3

This commit is contained in:
hufangzhou
2021-04-19 14:19:19 +08:00
15 changed files with 107 additions and 21 deletions
+3 -3
View File
@@ -57,10 +57,10 @@ $lang->mainNav->menuOrder[50] = 'admin';
$lang->my->menu = new stdclass();
$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->work = array('link' => "{$lang->my->work}|my|work|mode=task", 'subModule' => 'task,review');
$lang->my->menu->work = array('link' => "{$lang->my->work}|my|work|mode=task", 'subModule' => 'task');
if($config->systemMode == 'new') $lang->my->menu->project = array('link' => "{$lang->project->common}|my|project|");
$lang->my->menu->execution = array('link' => "{$lang->execution->common}|my|execution|type=undone");
$lang->my->menu->contribute = array('link' => "$lang->contribute|my|contribute|mode=task", 'subModule' => 'review');
$lang->my->menu->contribute = array('link' => "$lang->contribute|my|contribute|mode=task");
$lang->my->menu->dynamic = array('link' => "$lang->dynamic|my|dynamic|");
if($config->systemScore) $lang->my->menu->score = array('link' => "{$lang->score->shortCommon}|my|score|", 'subModule' => 'score');
$lang->my->menu->contacts = array('link' => "$lang->contact|my|managecontacts|");
@@ -113,7 +113,7 @@ $lang->my->dividerMenu = ',work,dynamic,';
/* Program menu. */
$lang->program->homeMenu = new stdclass();
$lang->program->homeMenu->browse = array('link' => "{$lang->program->list}|program|browse|");
$lang->program->homeMenu->browse = array('link' => "{$lang->program->list}|program|browse|", 'alias' => 'create');
$lang->program->menu = new stdclass();
$lang->program->menu->product = array('link' => "{$lang->product->common}|program|product|programID=%s", 'alias' => 'view');
+1
View File
@@ -1177,6 +1177,7 @@ class execution extends control
$this->view->title = $title;
$this->view->position = $position;
$this->view->deptUsers = $this->loadModel('dept')->getDeptUserPairs($this->app->user->dept, 'useid');
$this->view->canBeChanged = common::canModify('execution', $execution); // Determines whether an object is editable.
$this->display();
+4
View File
@@ -0,0 +1,4 @@
function checkUserDept(userID)
{
alert(noAccess);
}
+2 -2
View File
@@ -1378,8 +1378,8 @@ class executionModel extends model
if(strpos($taskQuery, "`execution` =") === false) $taskQuery = $taskQuery . " AND `execution` = $executionID";
$executionQuery = "`execution` " . helper::dbIN(array_keys($executions));
$taskQuery = str_replace("`execution` = 'all'", $executionQuery, $taskQuery); // Search all execution.
$this->session->set('taskQueryCondition', $taskQuery);
$this->session->set('taskOnlyCondition', true);
$this->session->set('taskQueryCondition', $taskQuery, $this->app->openApp);
$this->session->set('taskOnlyCondition', true, $this->app->openApp);
$tasks = $this->getSearchTasks($taskQuery, $pager, $sort);
}
+10 -1
View File
@@ -12,6 +12,7 @@
?>
<?php include '../../common/view/header.html.php';?>
<?php js::set('confirmUnlinkMember', $lang->execution->confirmUnlinkMember)?>
<?php js::set('noAccess', $lang->user->error->noAccess)?>
<div id='mainMenu' class='clearfix'>
<div class='btn-toolbar pull-left'>
<span class='btn btn-link btn-active-text'><span class='text'><?php echo $lang->execution->team;?></span></span>
@@ -66,7 +67,15 @@
<tr>
<td>
<?php
if(!common::printLink('user', 'view', "userID={$member->userID}", $member->realname)) print $member->realname;
if(common::hasPriv('user', 'view'))
{
$link = isset($deptUsers[$member->userID]) ? $this->createLink('user', 'view', "userID={$member->userID}") : "javascript:checkUserDept();";
echo html::a($link, $member->realname, '', 'data-app="system"');
}
else
{
echo $member->realname;
}
$memberHours = $member->days * $member->hours;
$totalHours += $memberHours;
?>
+67 -1
View File
@@ -478,7 +478,7 @@ class my extends control
/* Append id for secend sort. */
$sort = $this->loadModel('common')->appendOrder($orderBy);
$docs = $this->doc->getDocsByBrowseType(0, $type, 0, 0, $sort, $pager);
$docs = $this->doc->getDocsByBrowseType($type, 0, 0, $sort, $pager);
/* Assign. */
$this->view->title = $this->lang->my->common . $this->lang->colon . $this->lang->my->doc;
@@ -628,6 +628,72 @@ class my extends control
$this->display();
}
/**
* My audits.
*
* @param string $browseType
* @param string $orderBy
* @param int $recTotal
* @param int $recPerPage
* @param int $pageID
* @access public
* @return void
*/
public function audit($browseType = 'wait', $orderBy = 't1.id_desc', $recTotal = 0, $recPerPage = 15, $pageID = 1)
{
$this->loadModel('datatable');
$this->session->set('reviewList', $this->app->getURI(true));
$this->app->loadLang('review');
$this->app->loadClass('pager', true);
$pager = pager::init($recTotal, $recPerPage, $pageID);
$reviewList = $this->loadModel('review')->getUserReviews($browseType, $orderBy, $pager);
$this->view->title = $this->lang->my->myReview;
$this->view->users = $this->loadModel('user')->getPairs('noclosed|noletter');
$this->view->reviewList = $reviewList;
$this->view->products = $this->my->getProductPairs();
$this->view->recTotal = $recTotal;
$this->view->recPerPage = $recPerPage;
$this->view->pageID = $pageID;
$this->view->browseType = $browseType;
$this->view->orderBy = $orderBy;
$this->view->pager = $pager;
$this->view->mode = 'audit';
$this->display();
}
/**
* My ncs.
*
* @param string $browseType
* @param string $orderBy
* @param int $recTotal
* @param int $recPerPage
* @param int $pageID
* @access public
* @return void
*/
public function nc($browseType = 'assignedToMe', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
$this->loadModel('nc');
$this->session->set('ncList', $this->app->getURI(true));
/* Set the pager. */
$this->app->loadClass('pager', $static = true);
$pager = new pager($recTotal, $recPerPage = 50, $pageID = 1);
$this->view->title = $this->lang->my->common . $this->lang->colon . $this->lang->my->nc;
$this->view->position[] = $this->lang->my->nc;
$this->view->browseType = $browseType;
$this->view->pager = $pager;
$this->view->ncs = $this->my->getNcList($browseType, $orderBy, $pager);
$this->view->users = $this->loadModel('user')->getPairs('noclosed|noletter');
$this->view->projects = $this->loadModel('project')->getPairsByProgram(0);
$this->view->mode = 'nc';
$this->display();
}
/**
* My team.
*
+2 -1
View File
@@ -758,7 +758,7 @@ class projectModel extends model
/* If parent not empty, link products or create products. */
$product = new stdclass();
$product->name = $this->post->productName ? $this->post->productName : $project->name;
$product->bind = $this->post->productName ? 0 : 1;
$product->bind = $this->post->parent ? 0 : 1;
$product->program = $project->parent ? current(array_filter(explode(',', $program->path))) : 0;
$product->acl = $project->acl = 'open' ? 'open' : 'private';
$product->PO = $project->PM;
@@ -1655,6 +1655,7 @@ class projectModel extends model
$lang->execution->create = str_replace($lang->executionCommon, $lang->project->stage, $lang->execution->create);
$lang->execution->name = str_replace($lang->executionCommon, $lang->project->stage, $lang->execution->name);
$lang->execution->status = str_replace($lang->executionCommon, $lang->project->stage, $lang->execution->status);
$lang->execution->copy = str_replace($lang->executionCommon, $lang->project->stage, $lang->execution->copy);
}
$this->lang->switcherMenu = $this->getSwitcher($objectID, $this->app->rawModule, $this->app->rawMethod);
+7
View File
@@ -1294,6 +1294,13 @@ class testtask extends control
$this->lang->scrum->menu->qa['subMenu']->testtask['subModule'] = '';
$this->loadModel('project')->setMenu($this->session->project);
$this->lang->modulePageNav = $this->product->select($this->products, $productID, 'testtask', 'browseUnits');
/* Replace language. */
$project = $this->project->getByID($this->session->project);
if(!empty($project->model) and $project->model == 'waterfall')
{
$this->lang->testtask->execution = str_replace($this->lang->executionCommon, $this->lang->project->stage, $this->lang->testtask->execution);
}
}
else
{
+2 -9
View File
@@ -23,10 +23,7 @@ class upgrade extends control
$upgradeFile = $this->app->wwwRoot . 'upgrade.php';
if(!file_exists($upgradeFile)) $this->locate($this->createLink('my', 'index'));
if((version_compare($this->config->installedVersion, '15', '<')
|| strpos($this->config->installedVersion, 'biz') !== false
|| strpos($this->config->installedVersion, 'pro') !== false)
&& strpos($this->config->installedVersion, 'max') === false)
if(!isset($this->config->systemMode) || !isset($this->config->qcVersion))
{
/* Judge upgrade step. */
$upgradeStep = $this->loadModel('setting')->getItem('owner=system&module=common&section=global&key=upgradeStep');
@@ -137,11 +134,7 @@ class upgrade extends control
if(!$this->upgrade->isError())
{
if((version_compare($fromVersion, '15', '<')
|| strpos($fromVersion, 'biz') !== false
|| strpos($fromVersion, 'pro') !== false)
&& strpos($fromVersion, 'max') === false
&& !isset($this->config->qcVersion)) $this->locate(inlink('to15Guide', "fromVersion=$fromVersion"));
if(!isset($this->config->systemMode) && !isset($this->config->qcVersion)) $this->locate(inlink('to15Guide', "fromVersion=$fromVersion"));
$this->locate(inlink('afterExec', "fromVersion=$fromVersion"));
}
+1 -1
View File
@@ -80,7 +80,7 @@ class user extends control
$todos = $this->todo->getList($type, $account, $status, 0, $pager, $sort);
$date = (int)$type == 0 ? helper::today() : $type;
$users = $this->loadModel('dept')->getDeptUserPairs($this->app->user->dept, 'useid');
if(!isset($users[$userID])) die(js::error($this->lang->notFound) . js::locate('back'));
if(!isset($users[$userID])) die(js::error($this->lang->user->error->noAccess) . js::locate('back'));
/* set menus. */
$this->view->userList = $this->user->setUserList($users, $userID);
+2 -1
View File
@@ -204,6 +204,7 @@ $lang->user->error->dangerPassword = "ID %s,Passwords cannot be used with [%s]
$lang->user->error->verifyPassword = "Verifikation fehlgeschlagen. Bitte geben Sie ihr Loginpasswort ein.";
$lang->user->error->originalPassword = "Altes Passwort ist falsch.";
$lang->user->error->noAccess = "This user is not from your department. You have no access to this user information."
$lang->user->contactFieldList['phone'] = $lang->user->phone;
$lang->user->contactFieldList['mobile'] = $lang->user->mobile;
@@ -242,4 +243,4 @@ $lang->user->noticeResetFile = "<h5>Kontaktieren Sie den Administrator um Ihr Pa
</ol>";
$lang->user->notice4Safe = "Warning: Weak password of one click package detected";
$lang->user->process4DIR = "It is detected that you may be using the one click installation package environment. Other sites in the environment are still using simple passwords. For security reasons, if you do not use other sites, please handle them in time. Delete or rename the %s directory. Visit: <a href='https://www.zentao.pm/book/zentaomanual/fix-weak-password-564.html' target='_blank'>https://www.zentao.pm/book/zentaomanual/fix-weak-password-564.html</a>";
$lang->user->process4DB = "It is detected that you may be using the one click installation package environment. Other sites in the environment are still using simple passwords. For security reasons, if you do not use other sites, please handle them in time. Please login database and modify password field of zt_user table of %s database. Visit: <a href='https://www.zentao.pm/book/zentaomanual/fix-weak-password-564.html' target='_blank'>https://www.zentao.pm/book/zentaomanual/fix-weak-password-564.html</a>";
$lang->user->process4DB = "It is detected that you may be using the one click installation package environment. Other sites in the environment are still using simple passwords. For security reasons, if you do not use other sites, please handle them in time. Please login database and modify password field of zt_user table of %s database. Visit: <a href='https://www.zentao.pm/book/zentaomanual/fix-weak-password-564.html' target='_blank'>https://www.zentao.pm/book/zentaomanual/fix-weak-password-564.html</a>";
+1
View File
@@ -207,6 +207,7 @@ $lang->user->error->dangerPassword = "ID %s,Passwords cannot be used with [%s]
$lang->user->error->verifyPassword = "Verification failed. Please enter your Login Password.";
$lang->user->error->originalPassword = "Old password is incorrect.";
$lang->user->error->companyEmpty = "Company name must be not empty.";
$lang->user->error->noAccess = "This user is not from your department. You have no access to this user information.";
$lang->user->contactFieldList['phone'] = $lang->user->phone;
$lang->user->contactFieldList['mobile'] = $lang->user->mobile;
+2 -1
View File
@@ -204,6 +204,7 @@ $lang->user->error->dangerPassword = "ID %s,Les mots de passe ne peuvent pas u
$lang->user->error->verifyPassword = "Vérification en échec. Entrez votre Mot de Passe de Connexion.";
$lang->user->error->originalPassword = "Ancien Mot de Passe incorrect.";
$lang->user->error->noAccess = "This user is not from your department. You have no access to this user information."
$lang->user->contactFieldList['phone'] = $lang->user->phone;
$lang->user->contactFieldList['mobile'] = $lang->user->mobile;
@@ -242,4 +243,4 @@ $lang->user->noticeResetFile = "<h5>Contactez l'administrateur pour réinitialis
</ol>";
$lang->user->notice4Safe = "Warning: Weak password of one click package detected";
$lang->user->process4DIR = "It is detected that you may be using the one click installation package environment. Other sites in the environment are still using simple passwords. For security reasons, if you do not use other sites, please handle them in time. Delete or rename the %s directory. Visit: <a href='https://www.zentao.pm/book/zentaomanual/fix-weak-password-564.html' target='_blank'>https://www.zentao.pm/book/zentaomanual/fix-weak-password-564.html</a>";
$lang->user->process4DB = "It is detected that you may be using the one click installation package environment. Other sites in the environment are still using simple passwords. For security reasons, if you do not use other sites, please handle them in time. Please login database and modify password field of zt_user table of %s database. Visit: <a href='https://www.zentao.pm/book/zentaomanual/fix-weak-password-564.html' target='_blank'>https://www.zentao.pm/book/zentaomanual/fix-weak-password-564.html</a>";
$lang->user->process4DB = "It is detected that you may be using the one click installation package environment. Other sites in the environment are still using simple passwords. For security reasons, if you do not use other sites, please handle them in time. Please login database and modify password field of zt_user table of %s database. Visit: <a href='https://www.zentao.pm/book/zentaomanual/fix-weak-password-564.html' target='_blank'>https://www.zentao.pm/book/zentaomanual/fix-weak-password-564.html</a>";
+2 -1
View File
@@ -204,6 +204,7 @@ $lang->user->error->dangerPassword = "ID %s,Mật khẩu không thể được
$lang->user->error->verifyPassword = "Xác thực thất bại. Vui lòng nhập mạt khẩu đăng nhập của bạn.";
$lang->user->error->originalPassword = "Old password is incorrect.";
$lang->user->error->noAccess = "This user is not from your department. You have no access to this user information."
$lang->user->contactFieldList['phone'] = $lang->user->phone;
$lang->user->contactFieldList['mobile'] = $lang->user->mobile;
@@ -242,4 +243,4 @@ $lang->user->noticeResetFile = "<h5>Liên hệ quản trị viên để thiết
</ol>";
$lang->user->notice4Safe = "Warning: Weak password of one click package detected";
$lang->user->process4DIR = "It is detected that you may be using the one click installation package environment. Other sites in the environment are still using simple passwords. For security reasons, if you do not use other sites, please handle them in time. Delete or rename the %s directory. Visit: <a href='https://www.zentao.pm/book/zentaomanual/fix-weak-password-564.html' target='_blank'>https://www.zentao.pm/book/zentaomanual/fix-weak-password-564.html</a>";
$lang->user->process4DB = "It is detected that you may be using the one click installation package environment. Other sites in the environment are still using simple passwords. For security reasons, if you do not use other sites, please handle them in time. Please login database and modify password field of zt_user table of %s database. Visit: <a href='https://www.zentao.pm/book/zentaomanual/fix-weak-password-564.html' target='_blank'>https://www.zentao.pm/book/zentaomanual/fix-weak-password-564.html</a>";
$lang->user->process4DB = "It is detected that you may be using the one click installation package environment. Other sites in the environment are still using simple passwords. For security reasons, if you do not use other sites, please handle them in time. Please login database and modify password field of zt_user table of %s database. Visit: <a href='https://www.zentao.pm/book/zentaomanual/fix-weak-password-564.html' target='_blank'>https://www.zentao.pm/book/zentaomanual/fix-weak-password-564.html</a>";
+1
View File
@@ -207,6 +207,7 @@ $lang->user->error->dangerPassword = "【ID %s】的密码不能使用【%s】
$lang->user->error->verifyPassword = "验证失败,请检查您的系统登录密码是否正确";
$lang->user->error->originalPassword = "原密码不正确";
$lang->user->error->companyEmpty = "公司名称不能为空!";
$lang->user->error->noAccess = "该人员和你不是同一部门,你无权访问该人员的工作信息。";
$lang->user->contactFieldList['phone'] = $lang->user->phone;
$lang->user->contactFieldList['mobile'] = $lang->user->mobile;