execution->team;?>
@@ -66,7 +67,15 @@
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;
?>
diff --git a/module/my/control.php b/module/my/control.php
index 21cc0589d0..3b8db82b08 100644
--- a/module/my/control.php
+++ b/module/my/control.php
@@ -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.
*
diff --git a/module/project/model.php b/module/project/model.php
index 1e459807cc..3dacad58cf 100644
--- a/module/project/model.php
+++ b/module/project/model.php
@@ -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);
diff --git a/module/testtask/control.php b/module/testtask/control.php
index 2c6e287dc6..16a842a547 100644
--- a/module/testtask/control.php
+++ b/module/testtask/control.php
@@ -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
{
diff --git a/module/upgrade/control.php b/module/upgrade/control.php
index 5169770ffb..52b0fc460b 100644
--- a/module/upgrade/control.php
+++ b/module/upgrade/control.php
@@ -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§ion=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"));
}
diff --git a/module/user/control.php b/module/user/control.php
index 9c7094011b..b01fafe60d 100644
--- a/module/user/control.php
+++ b/module/user/control.php
@@ -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);
diff --git a/module/user/lang/de.php b/module/user/lang/de.php
index 61208b67fd..2cd5990625 100644
--- a/module/user/lang/de.php
+++ b/module/user/lang/de.php
@@ -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 = "Kontaktieren Sie den Administrator um Ihr Pa
";
$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: https://www.zentao.pm/book/zentaomanual/fix-weak-password-564.html";
-$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: https://www.zentao.pm/book/zentaomanual/fix-weak-password-564.html";
\ No newline at end of file
+$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: https://www.zentao.pm/book/zentaomanual/fix-weak-password-564.html";
diff --git a/module/user/lang/en.php b/module/user/lang/en.php
index fb163ee378..832665ba4f 100644
--- a/module/user/lang/en.php
+++ b/module/user/lang/en.php
@@ -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;
diff --git a/module/user/lang/fr.php b/module/user/lang/fr.php
index d00fa4eb48..819fe3c05f 100644
--- a/module/user/lang/fr.php
+++ b/module/user/lang/fr.php
@@ -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 = "