-
block->allExecution;?>
+
block->allExecutions;?>
createLink('project', 'all', 'status=all')?>
total ? html::a($projectLink, $summary->total) : 0;?>
diff --git a/module/doc/lang/de.php b/module/doc/lang/de.php
index 21512658d8..25b0d6f476 100644
--- a/module/doc/lang/de.php
+++ b/module/doc/lang/de.php
@@ -96,8 +96,8 @@ $lang->doc->removeMenu = 'Vom Menü entfernen';
$lang->doc->search = 'Suche';
/* 查询条件列表 */
-$lang->doc->allProduct = 'Alle' . $lang->productCommon;
-$lang->doc->allProject = 'Alle' . $lang->executionCommon;
+$lang->doc->allProduct = 'Alle' . $lang->productCommon;
+$lang->doc->allExecutions = 'Alle' . $lang->executionCommon;
$lang->doc->libTypeList['product'] = $lang->productCommon . ' Bibliothek';
$lang->doc->libTypeList['execution'] = $lang->executionCommon . ' Bibliothek';
diff --git a/module/doc/lang/en.php b/module/doc/lang/en.php
index a047068aea..4e75f43a7a 100644
--- a/module/doc/lang/en.php
+++ b/module/doc/lang/en.php
@@ -96,8 +96,8 @@ $lang->doc->removeMenu = 'Remove from Menu';
$lang->doc->search = 'Search';
/* Query condition list. */
-$lang->doc->allProduct = 'All' . $lang->productCommon . 's';
-$lang->doc->allProject = 'All' . $lang->executionCommon . 's';
+$lang->doc->allProduct = 'All' . $lang->productCommon . 's';
+$lang->doc->allExecutions = 'All' . $lang->executionCommon . 's';
$lang->doc->libTypeList['product'] = $lang->productCommon . ' Library';
$lang->doc->libTypeList['execution'] = $lang->executionCommon . ' Library';
diff --git a/module/doc/lang/fr.php b/module/doc/lang/fr.php
index ff48ebc3dd..abbaf0d1a5 100644
--- a/module/doc/lang/fr.php
+++ b/module/doc/lang/fr.php
@@ -96,8 +96,8 @@ $lang->doc->removeMenu = 'Décoller du Menu';
$lang->doc->search = 'Rechercher';
/* 查询条件列表 */
-$lang->doc->allProduct = 'Tous les ' . $lang->productCommon . 's';
-$lang->doc->allProject = 'Tous les ' . $lang->executionCommon . 's';
+$lang->doc->allProduct = 'Tous les' . $lang->productCommon . 's';
+$lang->doc->allExecutions = 'Tous les' . $lang->executionCommon . 's';
$lang->doc->libTypeList['product'] = $lang->productCommon . ' Library';
$lang->doc->libTypeList['execution'] = 'Bibliothèque ' . $lang->executionCommon;
diff --git a/module/doc/lang/vi.php b/module/doc/lang/vi.php
index b996268572..965490ac54 100644
--- a/module/doc/lang/vi.php
+++ b/module/doc/lang/vi.php
@@ -96,8 +96,8 @@ $lang->doc->removeMenu = 'Remove from Menu';
$lang->doc->search = 'Tìm kiếm';
/* Query condition list. */
-$lang->doc->allProduct = 'All' . $lang->productCommon;
-$lang->doc->allProject = 'All' . $lang->executionCommon;
+$lang->doc->allProduct = 'All' . $lang->productCommon;
+$lang->doc->allExecutions = 'All' . $lang->executionCommon;
$lang->doc->libTypeList['product'] = $lang->productCommon . ' thư viện';
$lang->doc->libTypeList['execution'] = $lang->executionCommon . ' thư viện';
diff --git a/module/doc/lang/zh-cn.php b/module/doc/lang/zh-cn.php
index 1f76dfc40e..de5147e961 100644
--- a/module/doc/lang/zh-cn.php
+++ b/module/doc/lang/zh-cn.php
@@ -96,8 +96,8 @@ $lang->doc->removeMenu = '从菜单栏移除';
$lang->doc->search = '搜索';
/* 查询条件列表 */
-$lang->doc->allProduct = '所有' . $lang->productCommon;
-$lang->doc->allExecution = '所有' . $lang->executionCommon;
+$lang->doc->allProduct = '所有' . $lang->productCommon;
+$lang->doc->allExecutions = '所有' . $lang->executionCommon;
$lang->doc->libTypeList['product'] = $lang->productCommon . '文档库';
$lang->doc->libTypeList['execution'] = $lang->executionCommon . '文档库';
diff --git a/module/doc/model.php b/module/doc/model.php
index 2e62a0a48c..ee94ecee22 100644
--- a/module/doc/model.php
+++ b/module/doc/model.php
@@ -780,7 +780,7 @@ class docModel extends model
$this->config->doc->search['actionURL'] = $actionURL;
$this->config->doc->search['queryID'] = $queryID;
$this->config->doc->search['params']['product']['values'] = array(''=>'') + $this->loadModel('product')->getPairs('nocode', $this->session->project) + array('all'=>$this->lang->doc->allProduct);
- $this->config->doc->search['params']['execution']['values'] = array(''=>'') + $this->loadModel('execution')->getPairs($this->session->project, 'all', 'noclosed') + array('all'=>$this->lang->doc->allExecution);
+ $this->config->doc->search['params']['execution']['values'] = array(''=>'') + $this->loadModel('execution')->getPairs($this->session->project, 'all', 'noclosed') + array('all'=>$this->lang->doc->allExecutions);
$this->config->doc->search['params']['lib']['values'] = array(''=>'', $libID => ($libID ? $libs[$libID] : 0), 'all' => $this->lang->doclib->all);
/* Get the modules. */
diff --git a/module/execution/control.php b/module/execution/control.php
index eb12d313c2..b28a7a554b 100644
--- a/module/execution/control.php
+++ b/module/execution/control.php
@@ -2407,14 +2407,14 @@ class execution extends control
$this->view->accountPairs = $this->loadModel('user')->getPairs('noletter|nodeleted');
/* Assign. */
- $this->view->executionID = $executionID;
- $this->view->type = $type;
- $this->view->orderBy = $orderBy;
- $this->view->pager = $pager;
- $this->view->account = $account;
- $this->view->param = $param;
- $this->view->dateGroups = $this->action->buildDateGroup($actions, $direction, $type);
- $this->view->direction = $direction;
+ $this->view->executionID = $executionID;
+ $this->view->type = $type;
+ $this->view->orderBy = $orderBy;
+ $this->view->pager = $pager;
+ $this->view->account = $account;
+ $this->view->param = $param;
+ $this->view->dateGroups = $this->action->buildDateGroup($actions, $direction, $type);
+ $this->view->direction = $direction;
$this->display();
}
@@ -2498,14 +2498,14 @@ class execution extends control
*/
public function ajaxGetRecentExecutions()
{
- $allExecution = $this->execution->getRecentExecutions();
- if(!empty($allExecution))
+ $allExecutions = $this->execution->getRecentExecutions();
+ if(!empty($allExecutions))
{
- foreach($allExecution as $type => $executionList)
+ foreach($allExecutions as $type => $executionList)
{
echo '
'. $this->lang->execution->$type . '
';
$color = $type == 'recent' ? 'text-brown' : '';
- $executions = $allExecution[$type];
+ $executions = $allExecutions[$type];
$executionsName = array();
foreach($executions as $execution) $executionsName[] = $execution->name;
$executionsPinYin = common::convert2Pinyin($executionsName);
@@ -2602,8 +2602,8 @@ class execution extends control
$this->app->loadClass('pager', $static = true);
$pager = new pager($recTotal, $recPerPage, $pageID);
- $this->view->title = $this->lang->execution->allExecution;
- $this->view->position[] = $this->lang->execution->allExecution;
+ $this->view->title = $this->lang->execution->allExecutions;
+ $this->view->position[] = $this->lang->execution->allExecutions;
$this->view->executionStats = $this->project->getStats($this->session->project, $status, $productID, 0, 30, $orderBy, $pager);
$this->view->products = array(0 => $this->lang->product->select) + $this->loadModel('product')->getProductPairsByProject($this->session->project);
diff --git a/module/execution/lang/zh-cn.php b/module/execution/lang/zh-cn.php
index d65443c926..96b7b8b0b6 100644
--- a/module/execution/lang/zh-cn.php
+++ b/module/execution/lang/zh-cn.php
@@ -12,7 +12,7 @@
/* 字段列表。*/
$lang->executionCommon = $lang->executionCommon;
$lang->execution->common = $lang->executionCommon . '视图';
-$lang->execution->allExecution = '所有' . $lang->executionCommon;
+$lang->execution->allExecutions = '所有' . $lang->executionCommon;
$lang->execution->id = $lang->executionCommon . '编号';
$lang->execution->type = $lang->executionCommon . '类型';
$lang->execution->name = $lang->executionCommon . '名称';
diff --git a/module/execution/model.php b/module/execution/model.php
index 1f938d23ea..5c4db327cb 100644
--- a/module/execution/model.php
+++ b/module/execution/model.php
@@ -2846,7 +2846,7 @@ class executionModel extends model
{
$this->config->execution->search['actionURL'] = $actionURL;
$this->config->execution->search['queryID'] = $queryID;
- $this->config->execution->search['params']['execution']['values'] = array(''=>'', $executionID => $executions[$executionID], 'all' => $this->lang->execution->allExecution);
+ $this->config->execution->search['params']['execution']['values'] = array(''=>'', $executionID => $executions[$executionID], 'all' => $this->lang->execution->allExecutions);
$showAllModule = isset($this->config->execution->task->allModule) ? $this->config->execution->task->allModule : '';
$this->config->execution->search['params']['module']['values'] = $this->loadModel('tree')->getTaskOptionMenu($executionID, 0, 0, $showAllModule ? 'allModule' : '');
@@ -3462,7 +3462,7 @@ class executionModel extends model
$productPairs = $this->getStageLinkProductPairs($stageIdList);
$recentExecutions = isset($this->config->execution->recentExecutions) ? explode(',', $this->config->execution->recentExecutions) : array();
- $allExecution = array('recent' => array(), 'mine' => array());
+ $allExecutions = array('recent' => array(), 'mine' => array());
foreach($executions as $execution)
{
if($execution->type == 'stage') $execution->name = zget($executionPairs, $execution->execution) . '/' . zget($productPairs, $execution->id) . '/' . $execution->name;
@@ -3470,14 +3470,14 @@ class executionModel extends model
if(in_array($execution->id, $recentExecutions))
{
$index = array_search($execution->id, $recentExecutions);
- $allExecution['recent'][$index] = $execution;
+ $allExecutions['recent'][$index] = $execution;
continue;
}
- $allExecution['mine'][] = $execution;
+ $allExecutions['mine'][] = $execution;
}
- ksort($allExecution['recent']);
- return $allExecution;
+ ksort($allExecutions['recent']);
+ return $allExecutions;
}
/**
diff --git a/module/group/lang/resource.php b/module/group/lang/resource.php
index 76b5a8932b..d5a8873af1 100644
--- a/module/group/lang/resource.php
+++ b/module/group/lang/resource.php
@@ -564,7 +564,7 @@ $lang->resource->execution->printKanban = 'printKanbanAction';
$lang->resource->execution->tree = 'treeAction';
$lang->resource->execution->treeTask = 'treeOnlyTask';
$lang->resource->execution->treeStory = 'treeOnlyStory';
-$lang->resource->execution->all = 'allProjects';
+$lang->resource->execution->all = 'allExecutions';
$lang->resource->execution->kanbanHideCols = 'kanbanHideCols';
$lang->resource->execution->kanbanColsColor = 'kanbanColsColor';
$lang->resource->execution->export = 'exportAction';
From 9516eeafffe1cc7dc5bc438817368f3435b228cc Mon Sep 17 00:00:00 2001
From: Yagami <976204163@qq.com>
Date: Tue, 9 Mar 2021 15:22:19 +0800
Subject: [PATCH 4/8] * Finish task #36481.
---
module/admin/js/checkweak.js | 4 ++++
module/admin/js/safe.js | 4 ++++
module/product/css/all.css | 2 ++
3 files changed, 10 insertions(+)
create mode 100644 module/admin/js/checkweak.js
create mode 100644 module/admin/js/safe.js
diff --git a/module/admin/js/checkweak.js b/module/admin/js/checkweak.js
new file mode 100644
index 0000000000..294858376c
--- /dev/null
+++ b/module/admin/js/checkweak.js
@@ -0,0 +1,4 @@
+$(function()
+{
+ $("#mainHeader #navbar li[data-id='system']").addClass('active');
+})
diff --git a/module/admin/js/safe.js b/module/admin/js/safe.js
new file mode 100644
index 0000000000..294858376c
--- /dev/null
+++ b/module/admin/js/safe.js
@@ -0,0 +1,4 @@
+$(function()
+{
+ $("#mainHeader #navbar li[data-id='system']").addClass('active');
+})
diff --git a/module/product/css/all.css b/module/product/css/all.css
index 63ad6f35d5..53e696ec41 100644
--- a/module/product/css/all.css
+++ b/module/product/css/all.css
@@ -43,3 +43,5 @@ th.table-nest-title .sort-down {padding-left: 5px;}
#productTableList .icon-product:before {content: '\e98f'; width: 22px; height: 22px; background: none; color: #16a8f8; top: 0; line-height: 22px; margin-right: 2px; font-size: 14px}
.main-table thead>tr>th {padding: 0px 8px; line-height: 24px;}
+
+.icon-move {color: #16a8f8}
From d1e6e9265bfd619a6817687fe870f84257ada3fe Mon Sep 17 00:00:00 2001
From: Yagami <976204163@qq.com>
Date: Tue, 9 Mar 2021 15:29:06 +0800
Subject: [PATCH 5/8] * Rename project session to PRJ.
---
framework/base/helper.class.php | 34 +++++++--------
framework/base/router.class.php | 2 +-
framework/router.class.php | 2 +-
module/block/control.php | 62 ++++++++++++++--------------
module/bug/control.php | 14 +++----
module/bug/model.php | 8 ++--
module/build/control.php | 16 +++----
module/build/model.php | 10 ++---
module/caselib/model.php | 10 ++---
module/common/model.php | 18 ++++----
module/common/view/header.html.php | 2 +-
module/doc/control.php | 12 +++---
module/doc/model.php | 12 +++---
module/execution/control.php | 24 +++++------
module/execution/model.php | 18 ++++----
module/personnel/control.php | 2 +-
module/product/control.php | 12 +++---
module/product/view/browse.html.php | 12 +++---
module/productplan/control.php | 4 +-
module/project/control.php | 8 ++--
module/project/model.php | 10 ++---
module/project/view/close.html.php | 2 +-
module/projectrelease/control.php | 22 +++++-----
module/projectrelease/model.php | 4 +-
module/projectstory/control.php | 4 +-
module/search/model.php | 4 +-
module/stakeholder/control.php | 20 ++++-----
module/stakeholder/model.php | 36 ++++++++--------
module/story/control.php | 20 ++++-----
module/story/model.php | 6 +--
module/story/view/view.html.php | 2 +-
module/task/control.php | 20 ++++-----
module/task/model.php | 8 ++--
module/testcase/model.php | 12 +++---
module/testreport/control.php | 6 +--
module/testreport/model.php | 6 +--
module/testsuite/control.php | 10 ++---
module/testsuite/model.php | 12 +++---
module/testtask/control.php | 10 ++---
module/testtask/model.php | 18 ++++----
module/testtask/view/create.html.php | 2 +-
module/todo/control.php | 6 +--
module/tree/control.php | 10 ++---
43 files changed, 266 insertions(+), 266 deletions(-)
diff --git a/framework/base/helper.class.php b/framework/base/helper.class.php
index 91789aeb3d..226983f1a6 100644
--- a/framework/base/helper.class.php
+++ b/framework/base/helper.class.php
@@ -56,17 +56,17 @@ class baseHelper
* @param string|array $vars the params passed to the method, can be array('key' => 'value') or key1=value1&key2=value2) or key1=value1&key2=value2
* @param string $viewType the view type
* @param bool $onlyBody pass onlyBody=yes to the link thus the app can control the header and footer hide or show..
- * @param bool $projectID set project id in to session.
- * @param bool $removeProject if true, remove project param.
+ * @param bool $PRJID set PRJ id in to session.
+ * @param bool $removePRJ if true, remove PRJ param.
* @static
* @access public
* @return string the link string.
*/
- static public function createLink($moduleName, $methodName = 'index', $vars = '', $viewType = '', $onlyBody = false, $projectID = 0, $removeProject = false)
+ static public function createLink($moduleName, $methodName = 'index', $vars = '', $viewType = '', $onlyBody = false, $PRJID = 0, $removePRJ = false)
{
/* 设置$appName和$moduleName。Set appName and moduleName. */
global $app, $config;
- $projectID = $projectID ? $projectID : $app->session->project;
+ $PRJID = $PRJID ? $PRJID : $app->session->PRJ;
if(strpos($moduleName, '.') !== false)
{
@@ -99,7 +99,7 @@ class baseHelper
foreach($vars as $key => $value) $link .= "&$key=$value";
$link = self::processOnlyBodyParam($link, $onlyBody);
- return self::processProjectParam($link, $projectID, $onlyBody, $moduleName, $removeProject);
+ return self::processProjectParam($link, $PRJID, $onlyBody, $moduleName, $removePRJ);
}
/**
@@ -115,7 +115,7 @@ class baseHelper
$link .= '.' . $viewType;
$link = self::processOnlyBodyParam($link, $onlyBody);
- return self::processProjectParam($link, $projectID, $onlyBody, $moduleName, $removeProject);
+ return self::processProjectParam($link, $PRJID, $onlyBody, $moduleName, $removePRJ);
}
/**
@@ -127,7 +127,7 @@ class baseHelper
{
$link .= $config->default->method . '.' . $viewType;
$link = self::processOnlyBodyParam($link, $onlyBody);
- return self::processProjectParam($link, $projectID, $onlyBody, $moduleName, $removeProject);
+ return self::processProjectParam($link, $PRJID, $onlyBody, $moduleName, $removePRJ);
}
/**
@@ -139,7 +139,7 @@ class baseHelper
{
$link .= $moduleName . '/';
$link = self::processOnlyBodyParam($link, $onlyBody);
- return self::processProjectParam($link, $projectID, $onlyBody, $moduleName, $removeProject);
+ return self::processProjectParam($link, $PRJID, $onlyBody, $moduleName, $removePRJ);
}
/**
@@ -149,34 +149,34 @@ class baseHelper
*/
$link .= $moduleName . '.' . $viewType;
$link = self::processOnlyBodyParam($link, $onlyBody);
- return self::processProjectParam($link, $projectID, $onlyBody, $moduleName, $removeProject);
+ return self::processProjectParam($link, $PRJID, $onlyBody, $moduleName, $removePRJ);
}
/**
- * 处理project 参数。
- * Process the projectID param in url.
+ * 处理PRJ 参数。
+ * Process the PRJID param in url.
*
- * 如果传参的时候设定了$projectID,在生成链接的时候继续追加。
+ * 如果传参的时候设定了$PRJID,在生成链接的时候继续追加。
* If $progrmID in the url, append it to the link.
*
* @param string $link
- * @param int $projectID
+ * @param int $PRJID
* @param bool $onlybody
* @param string $moduleName
- * @param bool $removeProject
+ * @param bool $removePRJ
* @static
* @access public
* @return string
*/
- public static function processProjectParam($link, $projectID = '', $onlybody = false, $moduleName = '', $removeProject = false)
+ public static function processProjectParam($link, $PRJID = '', $onlybody = false, $moduleName = '', $removePRJ = false)
{
global $config, $lang;
- if(!$projectID || $removeProject) return $link;
+ if(!$PRJID || $removePRJ) return $link;
$app = zget($lang->navGroup, $moduleName);
if($app != 'project' and $app != 'execution') return $link;
- $link .= strpos($link, '?') === false ? "?project=$projectID" : "&project=$projectID";
+ $link .= strpos($link, '?') === false ? "?PRJ=$PRJID" : "&PRJ=$PRJID";
return $link;
}
diff --git a/framework/base/router.class.php b/framework/base/router.class.php
index 37f524b96e..847452b748 100644
--- a/framework/base/router.class.php
+++ b/framework/base/router.class.php
@@ -1830,7 +1830,7 @@ class baseRouter
global $filter;
/* Remove these three params. */
- unset($passedParams['project']);
+ unset($passedParams['PRJ']);
unset($passedParams['onlybody']);
unset($passedParams['HTTP_X_REQUESTED_WITH']);
diff --git a/framework/router.class.php b/framework/router.class.php
index 816910706a..4faf92ad6f 100755
--- a/framework/router.class.php
+++ b/framework/router.class.php
@@ -203,7 +203,7 @@ class router extends baseRouter
$model = new stdclass();
$model->model = 'scrum';
- if($this->session->project) $model = $this->dbh->query('SELECT model FROM' . TABLE_PROJECT . "WHERE id = {$this->session->project}")->fetch();
+ if($this->session->PRJ) $model = $this->dbh->query('SELECT model FROM' . TABLE_PROJECT . "WHERE id = {$this->session->PRJ}")->fetch();
$iterationKey = $projectKey;
if(isset($model->model) && $model->model == 'waterfall') $projectKey = STAGE_KEY;
diff --git a/module/block/control.php b/module/block/control.php
index 491acfa6b8..8388eca3f7 100644
--- a/module/block/control.php
+++ b/module/block/control.php
@@ -216,7 +216,7 @@ class block extends control
$commonField = 'common';
if($module == 'project')
{
- $project = $this->loadModel('project')->getByID($this->session->project);
+ $project = $this->loadModel('project')->getByID($this->session->PRJ);
$commonField = $project->model . 'common';
}
@@ -431,7 +431,7 @@ class block extends control
/* Create a project block. */
if($dashboard == 'project')
{
- $project = $this->loadModel('project')->getByID($this->session->project);
+ $project = $this->loadModel('project')->getByID($this->session->PRJ);
$model = $project->model;
}
@@ -587,7 +587,7 @@ class block extends control
$this->session->set('storyList', $uri);
if(preg_match('/[^a-zA-Z0-9_]/', $this->params->type)) die();
- $projectID = $this->view->block->module == 'my' ? 0 : (int)$this->session->project;
+ $projectID = $this->view->block->module == 'my' ? 0 : (int)$this->session->PRJ;
$this->view->tasks = $this->loadModel('task')->getUserTasks($this->app->user->account, $this->params->type, $this->viewType == 'json' ? 0 : (int)$this->params->count, null, $this->params->orderBy, $projectID);
}
@@ -602,7 +602,7 @@ class block extends control
$this->session->set('bugList', $this->app->getURI(true));
if(preg_match('/[^a-zA-Z0-9_]/', $this->params->type)) die();
- $projectID = $this->lang->navGroup->qa == 'project' ? $this->session->project : 0;
+ $projectID = $this->lang->navGroup->qa == 'project' ? $this->session->PRJ : 0;
$projectID = $this->view->block->module == 'my' ? 0 : $projectID;
$this->view->bugs = $this->loadModel('bug')->getUserBugs($this->app->user->account, $this->params->type, $this->params->orderBy, $this->viewType == 'json' ? 0 : (int)$this->params->count, null, $projectID);
}
@@ -619,7 +619,7 @@ class block extends control
$this->app->loadLang('testcase');
$this->app->loadLang('testtask');
- $projectID = $this->lang->navGroup->qa == 'project' ? $this->session->project : 0;
+ $projectID = $this->lang->navGroup->qa == 'project' ? $this->session->PRJ : 0;
$projectID = $this->view->block->module == 'my' ? 0 : $projectID;
$cases = array();
@@ -663,7 +663,7 @@ class block extends control
$this->session->set('testtaskList', $this->app->getURI(true));
if(preg_match('/[^a-zA-Z0-9_]/', $this->params->type)) die();
- $projectID = $this->lang->navGroup->qa == 'project' ? $this->session->project : 0;
+ $projectID = $this->lang->navGroup->qa == 'project' ? $this->session->PRJ : 0;
$projectID = $this->view->block->module == 'my' ? 0 : $projectID;
$this->view->testtasks = $this->dao->select('t1.*,t2.name as productName,t3.name as buildName,t4.name as projectName')->from(TABLE_TESTTASK)->alias('t1')
@@ -733,7 +733,7 @@ class block extends control
->leftJoin(TABLE_PRODUCT)->alias('t2')->on('t1.product=t2.id')
->leftJoin(TABLE_BUILD)->alias('t3')->on('t1.build=t3.id')
->where('t1.deleted')->eq('0')
- ->beginIF($this->view->block->module != 'my' and $this->session->project)->andWhere('t1.project')->eq((int)$this->session->project)->fi()
+ ->beginIF($this->view->block->module != 'my' and $this->session->PRJ)->andWhere('t1.project')->eq((int)$this->session->PRJ)->fi()
->beginIF(!$this->app->user->admin)->andWhere('t1.product')->in($this->app->user->view->products)->fi()
->orderBy('t1.id desc')
->beginIF($this->viewType != 'json')->limit((int)$this->params->count)->fi()
@@ -755,7 +755,7 @@ class block extends control
->leftJoin(TABLE_PRODUCT)->alias('t2')->on('t1.product=t2.id')
->where('t1.deleted')->eq('0')
->beginIF(!$this->app->user->admin)->andWhere('t1.project')->in($this->app->user->view->projects)->fi()
- ->beginIF($this->view->block->module != 'my' and $this->session->project)->andWhere('t1.project')->eq((int)$this->session->project)->fi()
+ ->beginIF($this->view->block->module != 'my' and $this->session->PRJ)->andWhere('t1.project')->eq((int)$this->session->PRJ)->fi()
->orderBy('t1.id desc')
->beginIF($this->viewType != 'json')->limit((int)$this->params->count)->fi()
->fetchAll();
@@ -1043,7 +1043,7 @@ class block extends control
$count = isset($this->params->count) ? (int)$this->params->count : 0;
/* Get projects. */
- $projectID = $this->view->block->module == 'my' ? 0 : (int)$this->session->project;
+ $projectID = $this->view->block->module == 'my' ? 0 : (int)$this->session->PRJ;
$executions = $this->loadModel('execution')->getOrderedExecutions($projectID, $status, $count);
if(empty($executions))
{
@@ -1163,7 +1163,7 @@ class block extends control
*/
public function printWaterfallReportBlock()
{
- $project = $this->loadModel('project')->getByID($this->session->project);
+ $project = $this->loadModel('project')->getByID($this->session->PRJ);
$today = helper::today();
$date = date('Ymd', strtotime('this week Monday'));
$begin = $project->begin;
@@ -1173,14 +1173,14 @@ class block extends control
$task = $this->dao->select("
sum(consumed) as totalConsumed,
sum(if(status != 'cancel' and status != 'closed', `left`, 0)) as totalLeft")
- ->from(TABLE_TASK)->where('project')->eq($this->session->project)
+ ->from(TABLE_TASK)->where('project')->eq($this->session->PRJ)
->andWhere('deleted')->eq(0)
->andWhere('parent')->lt(1)
->fetch();
- $this->view->pv = $this->weekly->getPV($this->session->project, $today);
- $this->view->ev = $this->weekly->getEV($this->session->project, $today);
- $this->view->ac = $this->weekly->getAC($this->session->project, $today);
+ $this->view->pv = $this->weekly->getPV($this->session->PRJ, $today);
+ $this->view->ev = $this->weekly->getEV($this->session->PRJ, $today);
+ $this->view->ac = $this->weekly->getAC($this->session->PRJ, $today);
$this->view->sv = $this->weekly->getSV($this->view->ev, $this->view->pv);
$this->view->cv = $this->weekly->getCV($this->view->ev, $this->view->ac);
@@ -1196,11 +1196,11 @@ class block extends control
*/
public function printWaterfallGanttBlock()
{
- $products = $this->loadModel('product')->getProductPairsByProject($this->session->project);
+ $products = $this->loadModel('product')->getProductPairsByProject($this->session->PRJ);
$productID = $this->session->product ? $this->session->product : 0;
$productID = isset($products[$productID]) ? $productID : key($products);
- $this->view->plans = $this->loadModel('programplan')->getDataForGantt($this->session->project, $productID, 0, 'task', false);
+ $this->view->plans = $this->loadModel('programplan')->getDataForGantt($this->session->PRJ, $productID, 0, 'task', false);
$this->view->products = $products;
$this->view->productID = $productID;
}
@@ -1217,7 +1217,7 @@ class block extends control
$this->session->set('issueList', $uri);
if(preg_match('/[^a-zA-Z0-9_]/', $this->params->type)) die();
$this->view->users = $this->loadModel('user')->getPairs('noletter');
- $this->view->issues = $this->loadModel('issue')->getBlockIssues($this->session->project, $this->params->type, $this->viewType == 'json' ? 0 : (int)$this->params->count, $this->params->orderBy);
+ $this->view->issues = $this->loadModel('issue')->getBlockIssues($this->session->PRJ, $this->params->type, $this->viewType == 'json' ? 0 : (int)$this->params->count, $this->params->orderBy);
}
/**
@@ -1231,7 +1231,7 @@ class block extends control
$uri = $this->app->getURI(true);
$this->session->set('riskList', $uri);
$this->view->users = $this->loadModel('user')->getPairs('noletter');
- $this->view->risks = $this->loadModel('risk')->getBlockRisks($this->session->project, $this->params->type, $this->viewType == 'json' ? 0 : (int)$this->params->count, $this->params->orderBy);
+ $this->view->risks = $this->loadModel('risk')->getBlockRisks($this->session->PRJ, $this->params->type, $this->viewType == 'json' ? 0 : (int)$this->params->count, $this->params->orderBy);
}
/**
@@ -1243,12 +1243,12 @@ class block extends control
public function printWaterfallEstimateBlock()
{
$this->app->loadLang('durationestimation');
- $projectID = $this->session->project;
+ $projectID = $this->session->PRJ;
$members = $this->loadModel('project')->getTeamMemberPairs($projectID);
$budget = $this->loadModel('workestimation')->getBudget($projectID);
if(empty($budget)) $budget = new stdclass();
- $this->view->people = $this->dao->select('sum(people) as people')->from(TABLE_DURATIONESTIMATION)->where('project')->eq($this->session->project)->fetch('people');
+ $this->view->people = $this->dao->select('sum(people) as people')->from(TABLE_DURATIONESTIMATION)->where('project')->eq($this->session->PRJ)->fetch('people');
$this->view->members = count($members) ? count($members) - 1 : 0;
$this->view->consumed = $this->dao->select('sum(cast(consumed as decimal(10,2))) as consumed')->from(TABLE_TASK)->where('project')->eq($projectID)->andWhere('deleted')->eq(0)->andWhere('parent')->lt(1)->fetch('consumed');
$this->view->budget = $budget;
@@ -1264,7 +1264,7 @@ class block extends control
{
$this->loadModel('milestone');
$this->loadModel('weekly');
- $projectID = $this->session->project;
+ $projectID = $this->session->PRJ;
$project = $this->loadModel('project')->getByID($projectID);
$begin = $project->begin;
@@ -1301,7 +1301,7 @@ class block extends control
*/
public function printScrumOverviewBlock()
{
- $projectID = $this->session->project;
+ $projectID = $this->session->PRJ;
$this->app->loadLang('execution');
$totalData = $this->loadModel('project')->getOverviewList('byId', $projectID, 'id_desc', 1);
@@ -1324,7 +1324,7 @@ class block extends control
$this->app->loadClass('pager', $static = true);
$pager = pager::init(0, $count, 1);
$this->app->loadLang('execution');
- $this->view->executionStats = $this->loadModel('project')->getStats($this->session->project, $type, 0, 0, 30, 'id_desc', $pager);
+ $this->view->executionStats = $this->loadModel('project')->getStats($this->session->PRJ, $type, 0, 0, 30, 'id_desc', $pager);
}
/**
@@ -1367,7 +1367,7 @@ class block extends control
$sprints = $this->dao->select('status, count(*) as sprints')->from(TABLE_EXECUTION)
->where('deleted')->eq(0)
->andWhere('type')->eq('sprint')
- ->andWhere('parent')->eq($this->session->project)
+ ->andWhere('parent')->eq($this->session->PRJ)
->groupBy('status')
->fetchPairs();
@@ -1392,7 +1392,7 @@ class block extends control
*/
public function printProjectDynamicBlock()
{
- $projectID = $this->session->project;
+ $projectID = $this->session->PRJ;
$executions = $this->loadModel('execution')->getPairs($projectID);
$products = $this->loadModel('product')->getProductPairsByProject($projectID);
@@ -1424,7 +1424,7 @@ class block extends control
$this->session->set('releaseList', $this->app->getURI(true));
$this->session->set('productPlanList', $this->app->getURI(true));
- $products = $this->loadModel('product')->getPairs('', $this->session->project);
+ $products = $this->loadModel('product')->getPairs('', $this->session->PRJ);
if(!is_numeric($productID)) $productID = key($products);
$this->view->roadmaps = $this->product->getRoadmap($productID, 0, 6);
@@ -1461,7 +1461,7 @@ class block extends control
->leftJoin(TABLE_PROJECT)->alias('t4')->on('t1.project=t4.id')
->leftJoin(TABLE_PROJECTPRODUCT)->alias('t5')->on('t1.project=t5.project')
->where('t1.deleted')->eq('0')
- ->andWhere('t1.project')->eq($this->session->project)->fi()
+ ->andWhere('t1.project')->eq($this->session->PRJ)->fi()
->andWhere('t1.product = t5.product')
->beginIF($status != 'all')->andWhere('t1.status')->eq($status)->fi()
->orderBy('t1.id desc')
@@ -1483,7 +1483,7 @@ class block extends control
$status = isset($this->params->type) ? $this->params->type : '';
$count = isset($this->params->count) ? (int)$this->params->count : 0;
- $projectID = $this->lang->navGroup->qa == 'project' ? $this->session->project : 0;
+ $projectID = $this->lang->navGroup->qa == 'project' ? $this->session->PRJ : 0;
$products = $this->loadModel('product')->getOrderedProducts($status, $count, $projectID);
if(empty($products))
{
@@ -1587,7 +1587,7 @@ class block extends control
*/
public function printExecutionOverviewBlock()
{
- $projectID = $this->view->block->module == 'my' ? 0 : (int)$this->session->project;
+ $projectID = $this->view->block->module == 'my' ? 0 : (int)$this->session->PRJ;
$executions = $this->loadModel('execution')->getList($projectID);
$total = 0;
@@ -1620,7 +1620,7 @@ class block extends control
{
$casePairs = $this->dao->select('lastRunResult, COUNT(*) AS count')->from(TABLE_CASE)
->where('1=1')
- ->beginIF($this->view->block->module != 'my' and $this->session->project)->andWhere('project')->eq((int)$this->session->project)->fi()
+ ->beginIF($this->view->block->module != 'my' and $this->session->PRJ)->andWhere('project')->eq((int)$this->session->PRJ)->fi()
->groupBy('lastRunResult')
->fetchPairs();
@@ -1657,7 +1657,7 @@ class block extends control
$status = isset($this->params->type) ? $this->params->type : 'all';
$pager = pager::init(0, $count, 1);
- $projectID = $this->view->block->module == 'my' ? 0 : (int)$this->session->project;
+ $projectID = $this->view->block->module == 'my' ? 0 : (int)$this->session->PRJ;
$this->view->executionStats = $this->loadModel('project')->getStats($projectID, $status, 0, 0, 30, 'id_asc', $pager);
}
diff --git a/module/bug/control.php b/module/bug/control.php
index ad0ee865bd..d7446de714 100644
--- a/module/bug/control.php
+++ b/module/bug/control.php
@@ -364,7 +364,7 @@ class bug extends control
$this->bug->setMenu($this->products, $productID, $branch);
/* Init vars. */
- $projectID = $this->lang->navGroup->bug == 'project' ? $this->session->project : 0;
+ $projectID = $this->lang->navGroup->bug == 'project' ? $this->session->PRJ : 0;
$moduleID = 0;
$executionID = 0;
$taskID = 0;
@@ -571,7 +571,7 @@ class bug extends control
$showFields = trim($showFields, ',');
}
- $projectID = $this->lang->navGroup->bug == 'project' ? $this->session->project : 0;
+ $projectID = $this->lang->navGroup->bug == 'project' ? $this->session->PRJ : 0;
$this->view->customFields = $customFields;
$this->view->showFields = $showFields;
@@ -607,8 +607,8 @@ class bug extends control
/* Judge bug exits or not. */
$bug = $this->bug->getById($bugID, true);
if(!$bug) die(js::error($this->lang->notFound) . js::locate('back'));
- $this->session->project = $bug->project;
- $this->view->products = $this->products = $this->product->getProductPairsByProject($this->session->project);
+ $this->session->PRJ = $bug->project;
+ $this->view->products = $this->products = $this->product->getProductPairsByProject($this->session->PRJ);
$this->bug->checkBugExecutionPriv($bug);
@@ -624,7 +624,7 @@ class bug extends control
{
session_write_close();
$this->lang->set('menugroup.bug', 'repo');
- $repos = $this->loadModel('repo')->getRepoPairs($this->session->project);
+ $repos = $this->loadModel('repo')->getRepoPairs($this->session->PRJ);
$this->repo->setMenu($repos);
$this->lang->bug->menu = $this->lang->repo->menu;
}
@@ -755,7 +755,7 @@ class bug extends control
$oldResolvedBuild = array();
if(($bug->resolvedBuild) and isset($allBuilds[$bug->resolvedBuild])) $oldResolvedBuild[$bug->resolvedBuild] = $allBuilds[$bug->resolvedBuild];
- $projectID = $this->lang->navGroup->bug == 'project' ? $this->session->project : 0;
+ $projectID = $this->lang->navGroup->bug == 'project' ? $this->session->PRJ : 0;
$this->view->bug = $bug;
$this->view->productID = $productID;
@@ -1120,7 +1120,7 @@ class bug extends control
}
}
- $projectID = $this->lang->navGroup->bug == 'project' ? $this->session->project : 0;
+ $projectID = $this->lang->navGroup->bug == 'project' ? $this->session->PRJ : 0;
$bug = $this->bug->getById($bugID);
$productID = $bug->product;
$users = $this->user->getPairs('noclosed');
diff --git a/module/bug/model.php b/module/bug/model.php
index b890457f21..c8e0d1d527 100644
--- a/module/bug/model.php
+++ b/module/bug/model.php
@@ -72,7 +72,7 @@ class bugModel extends model
->setDefault('execution,story,task', 0)
->setDefault('openedBuild', '')
->setDefault('deadline', '0000-00-00')
- ->setIF($this->config->systemMode == 'new' && $this->lang->navGroup->bug != 'qa', 'project', $this->session->project)
+ ->setIF($this->config->systemMode == 'new' && $this->lang->navGroup->bug != 'qa', 'project', $this->session->PRJ)
->setIF(strpos($this->config->bug->create->requiredFields, 'deadline') !== false, 'deadline', $this->post->deadline)
->setIF($this->post->assignedTo != '', 'assignedDate', $now)
->setIF($this->post->story != false, 'storyVersion', $this->loadModel('story')->getVersion($this->post->story))
@@ -234,7 +234,7 @@ class bugModel extends model
}
}
- if($this->config->systemMode == 'new' && $this->lang->navGroup->bug != 'qa') $bug->project = $this->session->project;
+ if($this->config->systemMode == 'new' && $this->lang->navGroup->bug != 'qa') $bug->project = $this->session->PRJ;
$this->dao->insert(TABLE_BUG)->data($bug)
->autoCheck()
->batchCheck($this->config->bug->create->requiredFields, 'notempty')
@@ -1232,7 +1232,7 @@ class bugModel extends model
*/
public function buildSearchForm($productID, $products, $queryID, $actionURL)
{
- $projectID = $this->lang->navGroup->bug == 'qa' ? 0 : $this->session->project;
+ $projectID = $this->lang->navGroup->bug == 'qa' ? 0 : $this->session->PRJ;
$this->config->bug->search['actionURL'] = $actionURL;
$this->config->bug->search['queryID'] = $queryID;
$this->config->bug->search['params']['product']['values'] = array($productID => $products[$productID], 'all' => $this->lang->bug->allProduct);
@@ -1678,7 +1678,7 @@ class bugModel extends model
{
$datas = $this->dao->select('execution as name, count(execution) as value')->from(TABLE_BUG)->where($this->reportCondition())->groupBy('execution')->orderBy('value DESC')->fetchAll('name');
if(!$datas) return array();
- $executions = $this->loadModel('execution')->getPairs($this->session->project);
+ $executions = $this->loadModel('execution')->getPairs($this->session->PRJ);
$maxLength = 12;
if(common::checkNotCN()) $maxLength = 22;
diff --git a/module/build/control.php b/module/build/control.php
index 26789a01ea..f5b8eecad5 100644
--- a/module/build/control.php
+++ b/module/build/control.php
@@ -100,7 +100,7 @@ class build extends control
$build = $this->build->getById((int)$buildID);
/* Set menu. */
- $this->execution->setMenu($this->execution->getPairs($this->session->project), $build->execution);
+ $this->execution->setMenu($this->execution->getPairs($this->session->PRJ), $build->execution);
/* Get stories and bugs. */
$orderBy = 'status_asc, stage_asc, id_desc';
@@ -113,7 +113,7 @@ class build extends control
$execution->name = '';
}
- $executions = $this->product->getExecutionPairsByProduct($build->product, $build->branch, 'id_desc', $this->session->project);
+ $executions = $this->product->getExecutionPairsByProduct($build->product, $build->branch, 'id_desc', $this->session->PRJ);
if(!isset($executions[$build->execution])) $executions[$build->execution] = $execution->name;
$productGroups = $this->execution->getProducts($build->execution);
@@ -162,7 +162,7 @@ class build extends control
{
$build = $this->build->getByID((int)$buildID, true);
if(!$build) die(js::error($this->lang->notFound) . js::locate('back'));
- $this->session->project = $build->project;
+ $this->session->PRJ = $build->project;
/* Set session and load modules. */
if($type == 'story')$this->session->set('storyList', $this->app->getURI(true));
@@ -195,8 +195,8 @@ class build extends control
foreach($stages as $storyID => $stage)$stories[$storyID]->stage = $stage;
/* Set menu. */
- $this->loadModel('execution')->setMenu($this->execution->getPairs($this->session->project), $build->execution, $buildID);
- $executions = $this->execution->getPairs($this->session->project, 'all', 'empty');
+ $this->loadModel('execution')->setMenu($this->execution->getPairs($this->session->PRJ), $build->execution, $buildID);
+ $executions = $this->execution->getPairs($this->session->PRJ, 'all', 'empty');
$this->view->title = "BUILD #$build->id $build->name - " . $executions[$build->execution];
$this->view->position[] = html::a($this->createLink('execution', 'task', "executionID=$build->execution"), $executions[$build->execution]);
@@ -390,7 +390,7 @@ class build extends control
$this->session->set('storyList', inlink('view', "buildID=$buildID&type=story&link=true¶m=" . helper::safe64Encode("&browseType=$browseType&queryID=$param")));
$build = $this->build->getById($buildID);
$product = $this->loadModel('product')->getById($build->product);
- $this->loadModel('execution')->setMenu($this->execution->getPairs($this->session->project), $build->execution);
+ $this->loadModel('execution')->setMenu($this->execution->getPairs($this->session->PRJ), $build->execution);
$this->loadModel('story');
$this->loadModel('tree');
$this->loadModel('product');
@@ -509,7 +509,7 @@ class build extends control
/* Set menu. */
$build = $this->build->getByID($buildID);
$product = $this->loadModel('product')->getByID($build->product);
- $this->loadModel('execution')->setMenu($this->execution->getPairs($this->session->project), $build->execution);
+ $this->loadModel('execution')->setMenu($this->execution->getPairs($this->session->PRJ), $build->execution);
/* Load pager. */
$this->app->loadClass('pager', $static = true);
@@ -524,7 +524,7 @@ class build extends control
$this->config->bug->search['style'] = 'simple';
$this->config->bug->search['params']['plan']['values'] = $this->loadModel('productplan')->getForProducts(array($build->product => $build->product));
$this->config->bug->search['params']['module']['values'] = $this->loadModel('tree')->getOptionMenu($build->product, $viewType = 'bug', $startModuleID = 0);
- $this->config->bug->search['params']['execution']['values'] = $this->loadModel('product')->getExecutionPairsByProduct($build->product, 0, 'id_desc', $this->session->project);
+ $this->config->bug->search['params']['execution']['values'] = $this->loadModel('product')->getExecutionPairsByProduct($build->product, 0, 'id_desc', $this->session->PRJ);
$this->config->bug->search['params']['openedBuild']['values'] = $this->build->getProductBuildPairs($build->product, $branch = 0, $params = '');
$this->config->bug->search['params']['resolvedBuild']['values'] = $this->config->bug->search['params']['openedBuild']['values'];
diff --git a/module/build/model.php b/module/build/model.php
index f7384e2fd9..c3b06200cb 100644
--- a/module/build/model.php
+++ b/module/build/model.php
@@ -144,15 +144,15 @@ class buildModel extends model
$this->session->set('projectBuildForm', $query->form);
}
}
- if($this->session->projectBuildQuery == false) $this->session->set('projectBuildQuery', ' 1 = 1');
+ if($this->session->PRJBuildQuery == false) $this->session->set('projectBuildQuery', ' 1 = 1');
- $buildQuery = $this->session->projectBuildQuery;
+ $buildQuery = $this->session->PRJBuildQuery;
/* Distinguish between repeated fields. */
$fields = array('id' => '`id`', 'name' => '`name`', 'product' => '`product`', 'desc' => '`desc`', 'project' => '`project`');
foreach($fields as $field)
{
- if(strpos($this->session->projectBuildQuery, $field) !== false)
+ if(strpos($this->session->PRJBuildQuery, $field) !== false)
{
$buildQuery = str_replace($field, "t1." . $field, $buildQuery);
}
@@ -293,7 +293,7 @@ class buildModel extends model
->leftJoin(TABLE_RELEASE)->alias('t3')->on('t1.id = t3.build')
->leftJoin(TABLE_BRANCH)->alias('t4')->on('t1.branch = t4.id')
->where('t1.product')->in($products)
- ->beginIF($this->lang->navGroup->testtask != 'qa')->andWhere('t1.project')->eq($this->session->project)->fi()
+ ->beginIF($this->lang->navGroup->testtask != 'qa')->andWhere('t1.project')->eq($this->session->PRJ)->fi()
->beginIF($branch)->andWhere('t1.branch')->in("0,$branch")->fi()
->andWhere('t1.deleted')->eq(0)
->orderBy('t1.date desc, t1.id desc')->fetchAll('id');
@@ -354,7 +354,7 @@ class buildModel extends model
$build->bugs = '';
$build = fixer::input('post')
- ->setDefault('project', $this->session->project)
+ ->setDefault('project', $this->session->PRJ)
->setDefault('product', 0)
->setDefault('branch', 0)
->cleanInt('product,branch')
diff --git a/module/caselib/model.php b/module/caselib/model.php
index 6e04d2991c..5bffc21316 100644
--- a/module/caselib/model.php
+++ b/module/caselib/model.php
@@ -234,7 +234,7 @@ class caselibModel extends model
$lib = fixer::input('post')
->stripTags($this->config->caselib->editor->create['id'], $this->config->allowedTags)
->setForce('type', 'library')
- ->setIF($this->config->systemMode == 'new' and $this->lang->navGroup->caselib != 'qa', 'project', $this->session->project)
+ ->setIF($this->config->systemMode == 'new' and $this->lang->navGroup->caselib != 'qa', 'project', $this->session->PRJ)
->add('addedBy', $this->app->user->account)
->add('addedDate', helper::now())
->remove('uid')
@@ -278,7 +278,7 @@ class caselibModel extends model
{
$cases = $this->dao->select('*')->from(TABLE_CASE)
->where('lib')->eq((int)$libID)
- ->beginIF($this->config->systemMode == 'new' and $this->lang->navGroup->caselib != 'qa')->andWhere('project')->eq($this->session->project)->fi()
+ ->beginIF($this->config->systemMode == 'new' and $this->lang->navGroup->caselib != 'qa')->andWhere('project')->eq($this->session->PRJ)->fi()
->andWhere('product')->eq(0)
->beginIF($moduleIdList)->andWhere('module')->in($moduleIdList)->fi()
->beginIF($browseType == 'wait')->andWhere('status')->eq($browseType)->fi()
@@ -315,7 +315,7 @@ class caselibModel extends model
$cases = $this->dao->select('*')->from(TABLE_CASE)->where($caseQuery)
->beginIF($queryLibID != 'all')->andWhere('lib')->eq((int)$libID)->fi()
- ->beginIF($this->config->systemMode == 'new' and $this->lang->navGroup->caselib != 'qa')->andWhere('project')->eq($this->session->project)->fi()
+ ->beginIF($this->config->systemMode == 'new' and $this->lang->navGroup->caselib != 'qa')->andWhere('project')->eq($this->session->PRJ)->fi()
->andWhere('product')->eq(0)
->andWhere('deleted')->eq(0)
->orderBy($sort)->page($pager)->fetchAll();
@@ -536,7 +536,7 @@ class caselibModel extends model
}
else
{
- $caseData->project = $this->session->project;
+ $caseData->project = $this->session->PRJ;
$caseData->version = 1;
$caseData->openedBy = $this->app->user->account;
$caseData->openedDate = $now;
@@ -630,7 +630,7 @@ class caselibModel extends model
$data[$i]->openedDate = $now;
$data[$i]->status = $forceNotReview ? 'normal' : 'wait';
$data[$i]->version = 1;
- if($this->config->systemMode == 'new' and $this->lang->navGroup->caselib != 'qa') $data[$i]->project = $this->session->project;
+ if($this->config->systemMode == 'new' and $this->lang->navGroup->caselib != 'qa') $data[$i]->project = $this->session->PRJ;
$this->dao->insert(TABLE_CASE)->data($data[$i])
->autoCheck()
diff --git a/module/common/model.php b/module/common/model.php
index 0cdb4ea2e9..0707a34015 100644
--- a/module/common/model.php
+++ b/module/common/model.php
@@ -392,7 +392,7 @@ class commonModel extends model
{
if($group == 'program')
{
- $link = helper::createLink($menuItem->link['module'], $menuItem->link['method'], $vars, '', '', $app->session->project);
+ $link = helper::createLink($menuItem->link['module'], $menuItem->link['method'], $vars, '', '', $app->session->PRJ);
}
elseif($group == 'product' && $menuItem->name == 'doc')
{
@@ -472,7 +472,7 @@ class commonModel extends model
if(isset($lang->$model->subMenu->$key))
{
$programSubMenu = $lang->$model->subMenu->$key;
- $subMenu = common::createSubMenu($programSubMenu, $app->session->project);
+ $subMenu = common::createSubMenu($programSubMenu, $app->session->PRJ);
if(!empty($subMenu))
{
@@ -1732,7 +1732,7 @@ EOD;
if(!defined('IN_UPGRADE') and $inProject)
{
/* Check program priv. */
- if($this->session->project and strpos(",{$this->app->user->view->projects},", ",{$this->session->project},") === false and !$this->app->user->admin) $this->loadModel('program')->accessDenied();
+ if($this->session->PRJ and strpos(",{$this->app->user->view->projects},", ",{$this->session->PRJ},") === false and !$this->app->user->admin) $this->loadModel('program')->accessDenied();
$this->resetProgramPriv($module, $method);
if(!commonModel::hasPriv($module, $method)) $this->deny($module, $method, false);
}
@@ -1772,7 +1772,7 @@ EOD;
/* If is the program admin, have all program privs. */
$inProject = isset($lang->navGroup->$module) && $lang->navGroup->$module == 'project';
- if($inProject && $app->session->project && strpos(",{$app->user->rights['projects']},", ",{$app->session->project},") !== false) return true;
+ if($inProject && $app->session->PRJ && strpos(",{$app->user->rights['projects']},", ",{$app->session->PRJ},") !== false) return true;
/* If not super admin, check the rights. */
$rights = $app->user->rights['rights'];
@@ -1812,8 +1812,8 @@ EOD;
public function resetProgramPriv($module, $method)
{
/* Get user program priv. */
- if(!$this->app->session->project) return;
- $program = $this->dao->findByID($this->app->session->project)->from(TABLE_PROJECT)->fetch();
+ if(!$this->app->session->PRJ) return;
+ $program = $this->dao->findByID($this->app->session->PRJ)->from(TABLE_PROJECT)->fetch();
$programRights = $this->dao->select('t3.module, t3.method')->from(TABLE_GROUP)->alias('t1')
->leftJoin(TABLE_USERGROUP)->alias('t2')->on('t1.id = t2.group')
->leftJoin(TABLE_GROUPPRIV)->alias('t3')->on('t2.group=t3.group')
@@ -2398,7 +2398,7 @@ EOD;
if(strpos($link, "{PRODUCT}") !== false) $link = str_replace('{PRODUCT}', $app->session->product, $link);
if(strpos($link, "{EXECUTION}") !== false) $link = str_replace('{EXECUTION}', $app->session->execution, $link);
- if(strpos($link, "{PROJECT}") !== false) $link = str_replace('{PROJECT}', $app->session->project, $link);
+ if(strpos($link, "{PROJECT}") !== false) $link = str_replace('{PROJECT}', $app->session->PRJ, $link);
if(is_array($setting))
{
@@ -2426,7 +2426,7 @@ EOD;
public static function getProjectMainMenu($moduleName)
{
global $app, $lang, $dbh, $config;
- $project = $dbh->query("SELECT * FROM " . TABLE_PROJECT . " WHERE `id` = '{$app->session->project}'")->fetch();
+ $project = $dbh->query("SELECT * FROM " . TABLE_PROJECT . " WHERE `id` = '{$app->session->PRJ}'")->fetch();
if(empty($project)) return;
self::initProjectSubmenu();
@@ -2461,7 +2461,7 @@ EOD;
public static function getProgramModuleMenu($moduleName, $methodName)
{
global $app, $lang, $dbh;
- $program = $dbh->query("SELECT * FROM " . TABLE_PROJECT . " WHERE `id` = '{$app->session->project}'")->fetch();
+ $program = $dbh->query("SELECT * FROM " . TABLE_PROJECT . " WHERE `id` = '{$app->session->PRJ}'")->fetch();
if(empty($program)) return;
if($program->model == 'waterfall')
{
diff --git a/module/common/view/header.html.php b/module/common/view/header.html.php
index 7b1ea13f6b..a86181b8fd 100755
--- a/module/common/view/header.html.php
+++ b/module/common/view/header.html.php
@@ -23,7 +23,7 @@ $isQa = $rawModule == 'qa';
qa->switcherMenu) ? $lang->qa->switcherMenu : '';?>
config->systemMode == 'new'):?>
program->switcherMenu) ? $lang->program->switcherMenu : '';?>
- loadModel('project')->getSwitcher($this->session->project, $app->rawModule, $app->rawMethod);?>
+ loadModel('project')->getSwitcher($this->session->PRJ, $app->rawModule, $app->rawMethod);?>
config->systemMode == 'classic'):?>
project->switcherMenu) ? $lang->project->switcherMenu : '';;?>
diff --git a/module/doc/control.php b/module/doc/control.php
index 92c9fc50be..f47b9b01c2 100644
--- a/module/doc/control.php
+++ b/module/doc/control.php
@@ -128,7 +128,7 @@ class doc extends control
$this->lang->doc->menu = $this->lang->project->menu;
$this->lang->doc->menuOrder = $this->lang->project->menuOrder;
if($this->config->systemMode == 'classic') $this->lang->noMenuModule[] = 'doc';
- $this->project->setMenu($this->project->getPairs($this->session->project, 'all', 0, true), $lib->project);
+ $this->project->setMenu($this->project->getPairs($this->session->PRJ, 'all', 0, true), $lib->project);
}
else
{
@@ -231,7 +231,7 @@ class doc extends control
}
}
- $projectID = $this->session->project;
+ $projectID = $this->session->PRJ;
$products = $this->product->getProductPairsByProject($projectID, 'noclosed');
$executions = $this->execution->getByProject($projectID, 'all', 0, true);
@@ -364,7 +364,7 @@ class doc extends control
$this->lang->doc->menu = $this->lang->project->menu;
$this->lang->doc->menuOrder = $this->lang->project->menuOrder;
if($this->config->systemMode == 'classic') $this->lang->noMenuModule[] = 'doc';
- $this->project->setMenu($this->project->getPairs($this->session->project, 'all', 0, true), $lib->project);
+ $this->project->setMenu($this->project->getPairs($this->session->PRJ, 'all', 0, true), $lib->project);
$this->lang->set('menugroup.doc', 'project');
$this->lang->TRActions = common::hasPriv('doc', 'createLib') ? html::a(helper::createLink('doc', 'createLib'), "
" . $this->lang->doc->createlib, '', "class='btn btn-secondary iframe' data-width='70%'") : '';
@@ -517,7 +517,7 @@ class doc extends control
$this->lang->doc->menu = $this->lang->project->menu;
$this->lang->doc->menuOrder = $this->lang->project->menuOrder;
if($this->config->systemMode == 'classic') $this->lang->noMenuModule[] = 'doc';
- $this->project->setMenu($this->project->getPairs($this->session->project, 'all', 0, true), $objectID);
+ $this->project->setMenu($this->project->getPairs($this->session->PRJ, 'all', 0, true), $objectID);
$this->lang->set('menugroup.doc', 'project');
}
else
@@ -847,7 +847,7 @@ class doc extends control
$this->lang->doc->menu = $this->lang->project->menu;
$this->lang->doc->menuOrder = $this->lang->project->menuOrder;
if($this->config->systemMode == 'classic') $this->lang->noMenuModule[] = 'doc';
- $this->project->setMenu($this->project->getPairs($this->session->project, 'all', 0, true), $objectID);
+ $this->project->setMenu($this->project->getPairs($this->session->PRJ, 'all', 0, true), $objectID);
$this->lang->set('menugroup.doc', 'project');
}
else
@@ -947,7 +947,7 @@ class doc extends control
$this->lang->doc->menu = $this->lang->project->menu;
$this->lang->doc->menuOrder = $this->lang->project->menuOrder;
if($this->config->systemMode == 'classic') $this->lang->noMenuModule[] = 'doc';
- $this->project->setMenu($this->project->getPairs($this->session->project, 'all', 0, true), $objectID);
+ $this->project->setMenu($this->project->getPairs($this->session->PRJ, 'all', 0, true), $objectID);
$this->lang->set('menugroup.doc', 'project');
}
else
diff --git a/module/doc/model.php b/module/doc/model.php
index ee94ecee22..c139473aae 100644
--- a/module/doc/model.php
+++ b/module/doc/model.php
@@ -152,7 +152,7 @@ class docModel extends model
*/
public function getLibs($type = '', $extra = '', $appendLibs = '')
{
- $projectID = $this->session->project;
+ $projectID = $this->session->PRJ;
if($type == 'product' or $type == 'project')
{
$idList = array();
@@ -779,8 +779,8 @@ class docModel extends model
{
$this->config->doc->search['actionURL'] = $actionURL;
$this->config->doc->search['queryID'] = $queryID;
- $this->config->doc->search['params']['product']['values'] = array(''=>'') + $this->loadModel('product')->getPairs('nocode', $this->session->project) + array('all'=>$this->lang->doc->allProduct);
- $this->config->doc->search['params']['execution']['values'] = array(''=>'') + $this->loadModel('execution')->getPairs($this->session->project, 'all', 'noclosed') + array('all'=>$this->lang->doc->allExecutions);
+ $this->config->doc->search['params']['product']['values'] = array(''=>'') + $this->loadModel('product')->getPairs('nocode', $this->session->PRJ) + array('all'=>$this->lang->doc->allProduct);
+ $this->config->doc->search['params']['execution']['values'] = array(''=>'') + $this->loadModel('execution')->getPairs($this->session->PRJ, 'all', 'noclosed') + array('all'=>$this->lang->doc->allExecutions);
$this->config->doc->search['params']['lib']['values'] = array(''=>'', $libID => ($libID ? $libs[$libID] : 0), 'all' => $this->lang->doclib->all);
/* Get the modules. */
@@ -999,7 +999,7 @@ class docModel extends model
$orderBy = '`order` desc, id desc';
if($type == 'execution')
{
- $project = $this->loadModel('project')->getByID($this->session->project);
+ $project = $this->loadModel('project')->getByID($this->session->PRJ);
$orderBy = (isset($project->model) and $project->model) == 'waterfall' ? 'begin_asc,id_asc' : 'begin_desc,id_desc';
}
@@ -1128,7 +1128,7 @@ class docModel extends model
}
$idList = array();
- $projectID = $this->session->project;
+ $projectID = $this->session->PRJ;
$executionStatus = strpos($this->config->doc->custom->showLibs, 'unclosed') !== false ? 'undone' : 'all';
/* If it is a extension module, query the extension related products. */
@@ -1587,7 +1587,7 @@ class docModel extends model
public function getStatisticInfo()
{
$libIdList = array();
- $libIdList = $this->getLibIdListByProject($this->session->project);
+ $libIdList = $this->getLibIdListByProject($this->session->PRJ);
$docIdList = $this->getPrivDocs($libIdList);
$today = date('Y-m-d');
diff --git a/module/execution/control.php b/module/execution/control.php
index 25606ee895..e550a7c07a 100644
--- a/module/execution/control.php
+++ b/module/execution/control.php
@@ -539,7 +539,7 @@ class execution extends control
$this->app->session->set('executionList', $uri);
$this->loadModel('bug');
- $executions = $this->execution->getPairs($this->session->project, 'all', 'nocode');
+ $executions = $this->execution->getPairs($this->session->PRJ, 'all', 'nocode');
$this->execution->setMenu($executions, $executionID);
/* Load pager. */
@@ -990,7 +990,7 @@ class execution extends control
$this->view->orderBy = $orderBy;
$this->view->tasks = $productTasks;
$this->view->users = $this->loadModel('user')->getPairs('noclosed|noletter');
- $this->view->products = $this->loadModel('product')->getPairs('', $this->session->project);
+ $this->view->products = $this->loadModel('product')->getPairs('', $this->session->PRJ);
$this->view->canBeChanged = common::canModify('execution', $execution); // Determines whether an object is editable.
$this->display();
@@ -1205,7 +1205,7 @@ class execution extends control
$isSprint = true;
if($this->config->systemMode == 'new')
{
- $project = $this->project->getById($this->session->project);
+ $project = $this->project->getById($this->session->PRJ);
if($project->model == 'scrum')
{
unset($this->lang->execution->endList[62]);
@@ -1222,7 +1222,7 @@ class execution extends control
$this->view->position[] = $this->view->title;
$this->view->executions = array('' => '') + $this->executions;
$this->view->groups = $this->loadModel('group')->getPairs();
- $this->view->allProducts = array(0 => '') + $this->loadModel('product')->getProductPairsByProject($this->session->project);
+ $this->view->allProducts = array(0 => '') + $this->loadModel('product')->getProductPairsByProject($this->session->PRJ);
$this->view->acl = $acl;
$this->view->plan = $plan;
$this->view->name = $name;
@@ -1335,7 +1335,7 @@ class execution extends control
$isSprint = true;
if($this->config->systemMode == 'new')
{
- $project = $this->project->getById($this->session->project);
+ $project = $this->project->getById($this->session->PRJ);
if($project->model == 'scrum')
{
unset($this->lang->execution->endList[62]);
@@ -1440,7 +1440,7 @@ class execution extends control
$rdUsers = $this->user->getPairs('noclosed|nodeleted|devfirst', $appendRdUsers, $this->config->maxCount);
if(!empty($this->config->user->moreLink)) $this->config->moreLinks["RD"] = $this->config->user->moreLink;
- $project = $this->project->getById($this->session->project);
+ $project = $this->project->getById($this->session->PRJ);
$this->view->title = $this->lang->execution->batchEdit;
$this->view->position[] = $this->lang->execution->batchEdit;
@@ -1649,7 +1649,7 @@ class execution extends control
if(empty($execution) || strpos('stage,sprint', $execution->type) === false) die(js::error($this->lang->notFound) . js::locate('back'));
$this->app->loadLang('program');
- $this->session->project = $execution->project;
+ $this->session->PRJ = $execution->project;
/* Execution not found to prevent searching for .*/
if(!isset($this->executions[$execution->id])) $this->executions = $this->execution->getPairs($execution->execution, 'all', 'nocode');
@@ -2604,8 +2604,8 @@ class execution extends control
$this->view->title = $this->lang->execution->allExecutions;
$this->view->position[] = $this->lang->execution->allExecutions;
- $this->view->executionStats = $this->project->getStats($this->session->project, $status, $productID, 0, 30, $orderBy, $pager);
- $this->view->products = array(0 => $this->lang->product->select) + $this->loadModel('product')->getProductPairsByProject($this->session->project);
+ $this->view->executionStats = $this->project->getStats($this->session->PRJ, $status, $productID, 0, 30, $orderBy, $pager);
+ $this->view->products = array(0 => $this->lang->product->select) + $this->loadModel('product')->getProductPairsByProject($this->session->PRJ);
$this->view->productID = $productID;
$this->view->executionID = $executionID;
$this->view->pager = $pager;
@@ -2697,7 +2697,7 @@ class execution extends control
unset($fields[$key]);
}
- $executionStats = $this->execution->getStats($this->session->project, $status == 'byproduct' ? 'all' : $status, $productID, 0, 30, 'id_asc');
+ $executionStats = $this->execution->getStats($this->session->PRJ, $status == 'byproduct' ? 'all' : $status, $productID, 0, 30, 'id_asc');
$users = $this->loadModel('user')->getPairs('noletter');
foreach($executionStats as $i => $execution)
{
@@ -2826,7 +2826,7 @@ class execution extends control
}
$planStories = array_keys($planStory);
$this->execution->linkStory($executionID, $planStories, $planProducts);
- if($executionID != $this->session->project) $this->execution->linkStory($this->session->project, $planStories, $planProducts);
+ if($executionID != $this->session->PRJ) $this->execution->linkStory($this->session->PRJ, $planStories, $planProducts);
}
$moduleName = 'execution';
@@ -2871,7 +2871,7 @@ class execution extends control
$this->view->cases = $cases;
$this->view->story = $story;
$this->view->users = $users;
- $this->view->executions = $this->loadModel('execution')->getPairs($this->session->project, 'all', 'nocode');
+ $this->view->executions = $this->loadModel('execution')->getPairs($this->session->PRJ, 'all', 'nocode');
$this->view->actions = $this->loadModel('action')->getList('story', $storyID);
$this->view->modulePath = $modulePath;
$this->view->version = $version == 0 ? $story->version : $version;
diff --git a/module/execution/model.php b/module/execution/model.php
index 5c4db327cb..b362e1e459 100644
--- a/module/execution/model.php
+++ b/module/execution/model.php
@@ -64,7 +64,7 @@ class executionModel extends model
{
if(empty($executions))
{
- $project = $this->loadModel('project')->getByID($this->session->project);
+ $project = $this->loadModel('project')->getByID($this->session->PRJ);
if($project->model == 'waterfall')
{
if(($this->app->moduleName == 'programplan' && $this->app->methodName != 'create') || $this->app->moduleName == 'execution') die(js::locate(helper::createLink('programplan', 'create', "projectID=$project->id")));
@@ -212,7 +212,7 @@ class executionModel extends model
*/
public function tree()
{
- $products = $this->loadModel('product')->getPairs('nocode', $this->session->project);
+ $products = $this->loadModel('product')->getPairs('nocode', $this->session->PRJ);
$productGroup = $this->getProductGroupList();
$executionTree = "
";
foreach($productGroup as $productID => $executions)
@@ -324,7 +324,7 @@ class executionModel extends model
$this->lang->execution->team = $this->lang->execution->teamname;
/* Determine whether to add a sprint or a stage according to the model of the execution. */
- $execution = $this->getByID($this->session->project);
+ $execution = $this->getByID($this->session->PRJ);
$sprintType = $this->config->systemMode == 'new' ? zget($this->config->execution->modelList, $execution->model, '') : 'sprint';
/* If the execution model is a stage, determine whether the product is linked. */
@@ -343,8 +343,8 @@ class executionModel extends model
->setDefault('lastEditedBy', $this->app->user->account)
->setDefault('lastEditedDate', helper::now())
->setDefault('team', substr($this->post->name,0, 30))
- ->setIF($this->config->systemMode == 'new', 'execution', $this->session->project)
- ->setIF($this->config->systemMode == 'new', 'parent', $this->session->project)
+ ->setIF($this->config->systemMode == 'new', 'execution', $this->session->PRJ)
+ ->setIF($this->config->systemMode == 'new', 'parent', $this->session->PRJ)
->setIF($this->post->acl == 'open', 'whitelist', '')
->join('whitelist', ',')
->add('type', $sprintType)
@@ -416,7 +416,7 @@ class executionModel extends model
$member->hours = $this->config->execution->defaultWorkhours;
$this->dao->insert(TABLE_TEAM)->data($member)->exec();
- $this->addExecutionMembers($this->session->project, array($member));
+ $this->addExecutionMembers($this->session->PRJ, array($member));
}
/* Create doc lib. */
@@ -1825,7 +1825,7 @@ class executionModel extends model
$task = new stdClass();
$task->bug = $bug;
- $task->PRJ = $this->session->project;
+ $task->PRJ = $this->session->PRJ;
$task->execution = $executionID;
$task->story = $bug->story;
$task->storyVersion = $bug->storyVersion;
@@ -1993,7 +1993,7 @@ class executionModel extends model
$data->order = ++$lastOrder;
$this->dao->insert(TABLE_PROJECTSTORY)->data($data)->exec();
$this->story->setStage($storyID);
- $action = $executionID == $this->session->project ? 'linked2prj' : 'linked2execution';
+ $action = $executionID == $this->session->PRJ ? 'linked2prj' : 'linked2execution';
$this->action->create('story', $storyID, $action, '', $executionID);
}
}
@@ -2037,7 +2037,7 @@ class executionModel extends model
}
}
$this->linkStory($executionID, $planStories, $planProducts);
- $this->linkStory($this->session->project, $planStories, $planProducts);
+ $this->linkStory($this->session->PRJ, $planStories, $planProducts);
if($count != 0) echo js::alert(sprintf($this->lang->execution->haveDraft, $count)) . js::locate(helper::createLink('execution', 'create', "productID=&executionID=$executionID"));
}
diff --git a/module/personnel/control.php b/module/personnel/control.php
index 80b5217679..2fbdf1a22d 100644
--- a/module/personnel/control.php
+++ b/module/personnel/control.php
@@ -115,7 +115,7 @@ class personnel extends control
$pager = pager::init($recTotal, $recPerPage, $pageID);
/* Set back link. */
- $goback = $this->session->projectBrowse ? $this->session->projectBrowse : $this->createLink('program', 'whitelist', "projectID=$objectID");
+ $goback = $this->session->PRJBrowse ? $this->session->PRJBrowse : $this->createLink('program', 'whitelist', "projectID=$objectID");
if($from == 'program') $goback = $this->createLink('program', 'browse');
if($from == 'programproject') $goback = $this->session->programProject ? $this->session->programProject : $this->createLink('program', 'project', "programID=$programID");
diff --git a/module/product/control.php b/module/product/control.php
index c0e94cdee2..ac5957a401 100644
--- a/module/product/control.php
+++ b/module/product/control.php
@@ -202,11 +202,11 @@ class product extends control
if($this->app->rawModule == 'projectstory')
{
$this->session->set('currentProductType', $product->type);
- $projectProducts = $this->product->getProducts($this->session->project);
+ $projectProducts = $this->product->getProducts($this->session->PRJ);
$productPlans = $this->execution->getPlans($projectProducts);
if($browseType == 'bybranch') $param = $branch;
- $stories = $this->story->getExecutionStories($this->session->project, $productID, $branch, $sort, $browseType, $param, 'story', '', $pager);
+ $stories = $this->story->getExecutionStories($this->session->PRJ, $productID, $branch, $sort, $browseType, $param, 'story', '', $pager);
}
/* Process the sql, get the conditon partion, save it to session. */
@@ -903,7 +903,7 @@ class product extends control
$moduleGroup = zget($this->lang->navGroup, $module);
$moduleGroup = in_array($moduleGroup, array('product', 'qa'))? $moduleGroup : 'project';
- $products = $moduleGroup == 'project' ? $this->product->getProducts($this->session->project, 'all', 'program desc, line desc, ') : $this->product->getList(0, 'all', 0, 0, 'program desc, line desc, ');
+ $products = $moduleGroup == 'project' ? $this->product->getProducts($this->session->PRJ, 'all', 'program desc, line desc, ') : $this->product->getList(0, 'all', 0, 0, 'program desc, line desc, ');
$this->view->link = $this->product->getProductLink($module, $method, $extra);
$this->view->productID = $productID;
@@ -911,7 +911,7 @@ class product extends control
$this->view->method = $method;
$this->view->extra = $extra;
$this->view->products = $products;
- $this->view->projectID = $moduleGroup == 'project' ? $this->session->project : 0;
+ $this->view->projectID = $moduleGroup == 'project' ? $this->session->PRJ : 0;
$this->view->programs = $this->loadModel('program')->getPairs(true);
$this->view->lines = $this->product->getLinePairs();
$this->view->openApp = $moduleGroup;
@@ -962,7 +962,7 @@ class product extends control
$moduleIndex = array_search('product', $this->lang->noMenuModule);
if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
- $this->view->project = $this->loadModel('project')->getById($this->session->project);
+ $this->view->project = $this->loadModel('project')->getById($this->session->PRJ);
}
$this->loadModel($fromModule)->setMenu($this->products, key($this->products));
@@ -1173,7 +1173,7 @@ class product extends control
$this->session->set('productList', $this->app->getURI(true));
/* Get all product list. Locate to the create product page if there is no product. */
- $this->products = $this->product->getPairs('', $this->session->project);
+ $this->products = $this->product->getPairs('', $this->session->PRJ);
if(empty($this->products) and strpos('create|view', $this->methodName) === false) $this->locate($this->createLink('product', 'create'));
/* Get current product. */
diff --git a/module/product/view/browse.html.php b/module/product/view/browse.html.php
index 4780b13a5a..2526773b87 100644
--- a/module/product/view/browse.html.php
+++ b/module/product/view/browse.html.php
@@ -14,7 +14,7 @@
-session->project);?>
+session->PRJ);?>
app->rawModule);?>
app->rawModule == 'projectstory';
if(commonModel::isTutorialMode())
{
$wizardParams = helper::safe64Encode("productID=$productID&branch=$branch&moduleID=$moduleID");
- if($isProjectStory) $wizardParams = helper::safe64Encode("productID=$productID&branch=$branch&moduleID=$moduleID&storyID=&projectID={$this->session->project}");
+ if($isProjectStory) $wizardParams = helper::safe64Encode("productID=$productID&branch=$branch&moduleID=$moduleID&storyID=&projectID={$this->session->PRJ}");
$link = $this->createLink('tutorial', 'wizard', "module=story&method=create¶ms=$wizardParams");
echo html::a($link, $lang->story->createCommon, '', "data-group='$openApp'");
}
else
{
$link = $this->createLink('story', 'create', "product=$productID&branch=$branch&moduleID=$moduleID&storyID=0&projectID=0&bugID=0&planID=0&todoID=0&extra=&type=$storyType");
- if($isProjectStory) $link = $this->createLink('story', 'create', "product=$productID&branch=$branch&moduleID=$moduleID&storyID=0&projectID={$this->session->project}");
+ if($isProjectStory) $link = $this->createLink('story', 'create', "product=$productID&branch=$branch&moduleID=$moduleID&storyID=0&projectID={$this->session->PRJ}");
$disabled = '';
if(!common::hasPriv('story', 'create'))
{
@@ -158,7 +158,7 @@ $isProjectStory = $this->app->rawModule == 'projectstory';
- >
createLink('story', 'batchCreate', "productID=$productID&branch=$branch&moduleID=$moduleID&storyID=0&project=0&plan=0&type=$storyType");
- if($isProjectStory) $batchLink = $this->createLink('story', 'batchCreate', "productID=$productID&branch=$branch&moduleID=$moduleID&storyID=0&project={$this->session->project}");
+ if($isProjectStory) $batchLink = $this->createLink('story', 'batchCreate', "productID=$productID&branch=$branch&moduleID=$moduleID&storyID=0&project={$this->session->PRJ}");
echo html::a($batchLink, $lang->story->batchCreate, '', "data-group='$openApp'");
?>
@@ -178,7 +178,7 @@ $isProjectStory = $this->app->rawModule == 'projectstory';
echo " {$lang->execution->linkStory} ";
echo '';
echo "';
}
@@ -212,7 +212,7 @@ $isProjectStory = $this->app->rawModule == 'projectstory';
story->noStory : $lang->story->noRequirement;?>
- session->project : 0;?>
+ session->PRJ : 0;?>
createLink('story', 'create', "productID={$productID}&branch={$branch}&moduleID={$moduleID}&storyID=0&projectID=$projectID&bugID=0&planID=0&todoID=0&extra=&type=$storyType"), " " . $lang->story->createCommon, '', "class='btn btn-info' data-group='$openApp'");?>
diff --git a/module/productplan/control.php b/module/productplan/control.php
index d1a72c58bb..50a799d61c 100644
--- a/module/productplan/control.php
+++ b/module/productplan/control.php
@@ -266,7 +266,7 @@ class productplan extends control
$sort = $this->loadModel('common')->appendOrder($orderBy);
$this->commonAction($plan->product, $plan->branch);
- $products = $this->product->getProductPairsByProject($this->session->project);
+ $products = $this->product->getProductPairsByProject($this->session->PRJ);
$bugPager = new pager(0, $recPerPage, $type == 'bug' ? $pageID : 1);
$storyPager = new pager(0, $recPerPage, $type == 'story' ? $pageID : 1);
@@ -368,7 +368,7 @@ class productplan extends control
$this->loadModel('tree');
$plan = $this->productplan->getByID($planID);
$this->commonAction($plan->product, $plan->branch);
- $products = $this->product->getProductPairsByProject($this->session->project);
+ $products = $this->product->getProductPairsByProject($this->session->PRJ);
/* Load pager. */
$this->app->loadClass('pager', $static = true);
diff --git a/module/project/control.php b/module/project/control.php
index 81c266e94b..d1b91b105f 100644
--- a/module/project/control.php
+++ b/module/project/control.php
@@ -378,7 +378,7 @@ class project extends control
$this->action->logHistory($actionID, $changes);
}
- $locateLink = $this->session->projectBrowse ? $this->session->projectBrowse : inLink('view', "projectID=$projectID");
+ $locateLink = $this->session->PRJBrowse ? $this->session->PRJBrowse : inLink('view', "projectID=$projectID");
if($from == 'program') $locateLink = $this->createLink('program', 'browse');
if($from == 'programProject') $locateLink = $this->session->programProject ? $this->session->programProject : $this->createLink('program', 'project', "projectID=$projectID");
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $locateLink));
@@ -462,10 +462,10 @@ class project extends control
$this->action->logHistory($actionID, $changes);
}
}
- die(js::locate($this->session->projectList, 'parent'));
+ die(js::locate($this->session->PRJList, 'parent'));
}
- $projectIdList = $this->post->projectIdList ? $this->post->projectIdList : die(js::locate($this->session->projectList, 'parent'));
+ $projectIdList = $this->post->projectIdList ? $this->post->projectIdList : die(js::locate($this->session->PRJList, 'parent'));
$projects = $this->dao->select('*')->from(TABLE_PROJECT)->where('id')->in($projectIdList)->fetchAll('id');
foreach($projects as $project) $appendPMUsers[$project->PM] = $project->PM;
@@ -1136,7 +1136,7 @@ class project extends control
$diffProducts = array_merge(array_diff($oldProducts, $newProducts), array_diff($newProducts, $oldProducts));
if($diffProducts) $this->loadModel('action')->create('project', $projectID, 'Managed', '', !empty($_POST['products']) ? join(',', $_POST['products']) : '');
- $locateLink = $this->session->projectBrowse ? $this->session->projectBrowse : inLink('manageProducts', "projectID=$projectID");
+ $locateLink = $this->session->PRJBrowse ? $this->session->PRJBrowse : inLink('manageProducts', "projectID=$projectID");
if($from == 'program') $locateLink = $this->createLink('program', 'browse');
if($from == 'programproject') $locateLink = $this->session->programProject ? $this->session->programProject : inLink('programProject', "projectID=$projectID");
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $locateLink));
diff --git a/module/project/model.php b/module/project/model.php
index 3fff17cade..5a2264225c 100644
--- a/module/project/model.php
+++ b/module/project/model.php
@@ -121,14 +121,14 @@ class projectModel extends model
{
if($projectID > 0) $this->session->set('project', (int)$projectID);
if($projectID == 0 and $this->cookie->lastProject) $this->session->set('project', (int)$this->cookie->lastProject);
- if($projectID == 0 and $this->session->project == '') $this->session->set('project', key($projects));
- if(!isset($projects[$this->session->project]))
+ if($projectID == 0 and $this->session->PRJ == '') $this->session->set('project', key($projects));
+ if(!isset($projects[$this->session->PRJ]))
{
$this->session->set('project', key($projects));
- if($projectID && strpos(",{$this->app->user->view->projects},", ",{$this->session->project},") === false) $this->accessDenied();
+ if($projectID && strpos(",{$this->app->user->view->projects},", ",{$this->session->PRJ},") === false) $this->accessDenied();
}
- return $this->session->project;
+ return $this->session->PRJ;
}
/*
@@ -1557,7 +1557,7 @@ class projectModel extends model
}
/* In the case of the waterfall model, calculate the sub-stage. */
- $project = $this->getByID($this->session->project);
+ $project = $this->getByID($this->session->PRJ);
if($project and $project->model == 'waterfall')
{
foreach($parents as $id => $execution)
diff --git a/module/project/view/close.html.php b/module/project/view/close.html.php
index 4264552105..5dbd4bb68d 100644
--- a/module/project/view/close.html.php
+++ b/module/project/view/close.html.php
@@ -35,7 +35,7 @@
|