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] * 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 @@
|
- | goback, $this->session->projectList, 'self', '', 'btn btn-wide'); ?> |
+ goback, $this->session->PRJList, 'self', '', 'btn btn-wide'); ?> |
diff --git a/module/projectrelease/control.php b/module/projectrelease/control.php
index 9d4764c6d5..a9d4e75947 100644
--- a/module/projectrelease/control.php
+++ b/module/projectrelease/control.php
@@ -27,7 +27,7 @@ class projectrelease extends control
$products = array();
$this->loadModel('product');
$this->loadModel('release');
- $this->view->products = $this->products = $this->product->getProductPairsByProject($this->session->project);
+ $this->view->products = $this->products = $this->product->getProductPairsByProject($this->session->PRJ);
if(empty($this->view->products)) $this->locate($this->createLink('product', 'create'));
}
@@ -45,7 +45,7 @@ class projectrelease extends control
$this->lang->product->switcherMenu = $this->product->getSwitcher($productID);
/* Get product and product list by project. */
- $products = $this->product->getProductPairsByProject($this->session->project);
+ $products = $this->product->getProductPairsByProject($this->session->PRJ);
if(!$productID) $productID = key($products);
$product = $this->product->getById($productID);
@@ -53,7 +53,7 @@ class projectrelease extends control
$this->view->product = $product;
$this->view->branches = (isset($product->type) and $product->type == 'normal') ? array() : $this->loadModel('branch')->getPairs($productID);
$this->view->branch = $branch;
- $this->view->project = $this->loadModel('project')->getByID($this->session->project);
+ $this->view->project = $this->loadModel('project')->getByID($this->session->PRJ);
}
/**
@@ -66,13 +66,13 @@ class projectrelease extends control
public function browse($type = 'all')
{
$this->session->set('releaseList', $this->app->getURI(true));
- $execution = $this->loadModel('execution')->getById($this->session->project);
+ $execution = $this->loadModel('execution')->getById($this->session->PRJ);
$this->view->title = $execution->name . $this->lang->colon . $this->lang->release->browse;
$this->view->position[] = $this->lang->release->browse;
$this->view->execution = $execution;
- $this->view->products = $this->loadModel('product')->getProducts($this->session->project);
- $this->view->releases = $this->projectrelease->getList($this->session->project, $type);
+ $this->view->products = $this->loadModel('product')->getProducts($this->session->PRJ);
+ $this->view->releases = $this->projectrelease->getList($this->session->PRJ, $type);
$this->view->type = $type;
$this->display();
}
@@ -99,10 +99,10 @@ class projectrelease extends control
}
/* Get the builds that can select. */
- $productPairs = $this->loadModel('product')->getProductPairsByProject($this->session->project);
+ $productPairs = $this->loadModel('product')->getProductPairsByProject($this->session->PRJ);
$productIdList = array_keys($productPairs);
$builds = $this->loadModel('build')->getProductBuildPairs($productIdList, 0, 0, 'notrunk');
- $releaseBuilds = $this->projectrelease->getReleaseBuilds($this->session->project);
+ $releaseBuilds = $this->projectrelease->getReleaseBuilds($this->session->PRJ);
foreach($releaseBuilds as $build) unset($builds[$build]);
unset($builds['trunk']);
@@ -110,7 +110,7 @@ class projectrelease extends control
$this->view->title = $this->view->project->name . $this->lang->colon . $this->lang->release->create;
$this->view->position[] = $this->lang->release->create;
$this->view->builds = $builds;
- $this->view->lastRelease = $this->projectrelease->getLast($this->session->project);
+ $this->view->lastRelease = $this->projectrelease->getLast($this->session->PRJ);
$this->display();
}
@@ -154,7 +154,7 @@ class projectrelease extends control
$this->view->position[] = $this->lang->release->edit;
$this->view->release = $release;
$this->view->build = $build;
- $this->view->builds = $this->loadModel('build')->getProjectBuildPairs($this->session->project, $release->product, $release->branch, 'notrunk|withbranch');
+ $this->view->builds = $this->loadModel('build')->getProjectBuildPairs($this->session->PRJ, $release->product, $release->branch, 'notrunk|withbranch');
$this->display();
}
@@ -547,7 +547,7 @@ class projectrelease extends control
$this->config->bug->search['style'] = 'simple';
$this->config->bug->search['params']['plan']['values'] = $this->loadModel('productplan')->getForProducts(array($release->product => $release->product));
$this->config->bug->search['params']['module']['values'] = $this->loadModel('tree')->getOptionMenu($release->product, $viewType = 'bug', $startModuleID = 0);
- $this->config->bug->search['params']['execution']['values'] = $this->loadModel('product')->getExecutionPairsByProduct($release->product, 0, 'id_desc', $this->session->project);
+ $this->config->bug->search['params']['execution']['values'] = $this->loadModel('product')->getExecutionPairsByProduct($release->product, 0, 'id_desc', $this->session->PRJ);
$this->config->bug->search['params']['openedBuild']['values'] = $this->loadModel('build')->getProductBuildPairs($release->product, $branch = 0, $params = '');
$this->config->bug->search['params']['resolvedBuild']['values'] = $this->config->bug->search['params']['openedBuild']['values'];
if($this->session->currentProductType == 'normal')
diff --git a/module/projectrelease/model.php b/module/projectrelease/model.php
index d8a7c3d3df..bd373d9ecf 100644
--- a/module/projectrelease/model.php
+++ b/module/projectrelease/model.php
@@ -122,7 +122,7 @@ class projectreleaseModel extends model
}
$release = fixer::input('post')
- ->add('project', $this->session->project)
+ ->add('project', $this->session->PRJ)
->add('product', (int)$productID)
->add('branch', (int)$branch)
->setDefault('stories', '')
@@ -151,7 +151,7 @@ class projectreleaseModel extends model
else
{
$build = new stdclass();
- $build->project = $this->session->project;
+ $build->project = $this->session->PRJ;
$build->product = (int)$productID;
$build->branch = (int)$branch;
$build->name = $release->name;
diff --git a/module/projectstory/control.php b/module/projectstory/control.php
index d9eef5ba65..ace37abee9 100644
--- a/module/projectstory/control.php
+++ b/module/projectstory/control.php
@@ -23,7 +23,7 @@ class projectStory extends control
public function __construct($moduleName = '', $methodName = '')
{
parent::__construct($moduleName, $methodName);
- $this->products = $this->loadModel('product')->getProductPairsByProject($this->session->project);
+ $this->products = $this->loadModel('product')->getProductPairsByProject($this->session->PRJ);
if(empty($this->products)) die($this->locate($this->createLink('product', 'showErrorNone', "fromModule=projectstory")));
}
@@ -89,7 +89,7 @@ class projectStory extends control
public function view($storyID)
{
$story = $this->loadModel('story')->getByID($storyID);
- echo $this->fetch('story', 'view', "storyID=$storyID&version=$story->version¶m=" . $this->session->project);
+ echo $this->fetch('story', 'view', "storyID=$storyID&version=$story->version¶m=" . $this->session->PRJ);
}
/**
diff --git a/module/search/model.php b/module/search/model.php
index a48c14e25d..194c103036 100644
--- a/module/search/model.php
+++ b/module/search/model.php
@@ -266,8 +266,8 @@ class searchModel extends model
$users = $this->loadModel('user')->getPairs('realname|noclosed', $appendUsers, $this->config->maxCount);
$users['$@me'] = $this->lang->search->me;
}
- if($hasProduct) $products = array('' => '') + $this->loadModel('product')->getPairs('', $this->session->project);
- if($hasExecution) $executions = array('' => '') + $this->loadModel('execution')->getPairs($this->session->project);
+ if($hasProduct) $products = array('' => '') + $this->loadModel('product')->getPairs('', $this->session->PRJ);
+ if($hasExecution) $executions = array('' => '') + $this->loadModel('execution')->getPairs($this->session->PRJ);
foreach($fields as $fieldName)
{
diff --git a/module/stakeholder/control.php b/module/stakeholder/control.php
index 8adad8d7a1..617b724f5f 100644
--- a/module/stakeholder/control.php
+++ b/module/stakeholder/control.php
@@ -78,7 +78,7 @@ class stakeholder extends control
}
else
{
- $this->view->members = $this->loadModel('execution')->getTeamMemberPairs($this->session->project);
+ $this->view->members = $this->loadModel('execution')->getTeamMemberPairs($this->session->PRJ);
}
$this->view->title = $this->lang->stakeholder->create;
@@ -110,11 +110,11 @@ class stakeholder extends control
$this->view->title = $this->lang->stakeholder->batchCreate;
$this->view->position[] = $this->lang->stakeholder->batchCreate;
- $this->view->project = $this->loadModel('project')->getByID($this->session->project);
+ $this->view->project = $this->loadModel('project')->getByID($this->session->PRJ);
$this->view->users = $this->user->getPairs('all|nodeleted|noclosed');
$this->view->deptUsers = $deptUsers;
$this->view->dept = $dept;
- $this->view->projectID = $this->session->project;
+ $this->view->projectID = $this->session->PRJ;
$this->view->depts = array('' => '') + $this->dept->getOptionMenu();
$this->view->stakeholders = $this->stakeholder->getStakeholders('all', 'id_desc');
$this->view->parentStakeholders = $this->program->getStakeholders($parentID, 't1.id_desc');
@@ -153,10 +153,10 @@ class stakeholder extends control
}
$users = array('' => '');
- if($stakeholder->type == 'team') $users = $this->loadModel('execution')->getTeamMemberPairs($this->session->project);
+ if($stakeholder->type == 'team') $users = $this->loadModel('execution')->getTeamMemberPairs($this->session->PRJ);
elseif($stakeholder->type == 'company')
{
- $members = $this->loadModel('execution')->getTeamMemberPairs($this->session->project);
+ $members = $this->loadModel('execution')->getTeamMemberPairs($this->session->PRJ);
$users = $this->loadModel('user')->getPairs('noclosed');
$users = array('' => '') + array_diff($users, $members);
}
@@ -180,7 +180,7 @@ class stakeholder extends control
*/
public function ajaxGetMembers($user = '', $programID = 0)
{
- $members = $programID == 0 ? $this->loadModel('execution')->getTeamMemberPairs($this->session->project) : $this->loadModel('project')->getTeamMemberPairs($programID);
+ $members = $programID == 0 ? $this->loadModel('execution')->getTeamMemberPairs($this->session->PRJ) : $this->loadModel('project')->getTeamMemberPairs($programID);
die(html::select('user', $members, $user, "class='form-control chosen'"));
}
@@ -194,7 +194,7 @@ class stakeholder extends control
*/
public function ajaxGetCompanyUser($user = '', $programID = 0)
{
- $members = $programID == 0 ? $this->loadModel('execution')->getTeamMemberPairs($this->session->project) : $this->loadModel('project')->getTeamMemberPairs($programID);
+ $members = $programID == 0 ? $this->loadModel('execution')->getTeamMemberPairs($this->session->PRJ) : $this->loadModel('project')->getTeamMemberPairs($programID);
$users = $this->loadModel('user')->getPairs('noclosed');
$companyUsers = array('' => '') + array_diff($users, $members);
@@ -274,7 +274,7 @@ class stakeholder extends control
else
{
$this->stakeholder->delete(TABLE_STAKEHOLDER, $userID);
- $this->loadModel('user')->updateUserView($this->session->project, 'project');
+ $this->loadModel('user')->updateUserView($this->session->PRJ, 'project');
die(js::reload('parent'));
}
}
@@ -293,7 +293,7 @@ class stakeholder extends control
$this->view->position[] = $this->lang->stakeholder->view;
$this->view->user = $this->stakeholder->getByID($userID);
- $this->view->users = $this->loadModel('execution')->getTeamMemberPairs($this->session->project,'nodeleted');
+ $this->view->users = $this->loadModel('execution')->getTeamMemberPairs($this->session->PRJ,'nodeleted');
$this->view->expects = $this->stakeholder->getExpectByUser($userID);
$this->display();
@@ -356,7 +356,7 @@ class stakeholder extends control
$this->view->title = $this->lang->stakeholder->common . $this->lang->colon . $this->lang->stakeholder->communicate;
$this->view->position[] = $this->lang->stakeholder->view;
$this->view->user = $this->stakeholder->getByID($userID);
- $this->view->users = $this->loadModel('execution')->getTeamMemberPairs($this->session->project,'nodeleted');
+ $this->view->users = $this->loadModel('execution')->getTeamMemberPairs($this->session->PRJ,'nodeleted');
$this->display();
}
diff --git a/module/stakeholder/model.php b/module/stakeholder/model.php
index c561ecf6fc..01d5f758b7 100644
--- a/module/stakeholder/model.php
+++ b/module/stakeholder/model.php
@@ -14,7 +14,7 @@ class stakeholderModel extends model
$data = fixer::input('post')
->setIF($programID == 0, 'objectType', 'project')
->setIF($programID != 0, 'objectType', 'program')
- ->setIF($programID == 0, 'objectID', $this->session->project)
+ ->setIF($programID == 0, 'objectID', $this->session->PRJ)
->setIF($programID != 0, 'objectID', $programID)
->setDefault('createdBy', $this->app->user->account)
->setDefault('createdDate', helper::today())
@@ -113,17 +113,17 @@ class stakeholderModel extends model
$this->loadModel('action');
$data = (array)fixer::input('post')->get();
- $members = $this->loadModel('execution')->getTeamMemberPairs($this->session->project);
+ $members = $this->loadModel('execution')->getTeamMemberPairs($this->session->PRJ);
$accounts = array_unique($data['accounts']);
- $oldJoin = $this->dao->select('`user`, createdDate')->from(TABLE_STAKEHOLDER)->where('objectID')->eq((int)$this->session->project)->andWhere('objectType')->eq('project')->fetchPairs();
- $this->dao->delete()->from(TABLE_STAKEHOLDER)->where('objectID')->eq((int)$this->session->project)->andWhere('objectType')->eq('project')->exec();
+ $oldJoin = $this->dao->select('`user`, createdDate')->from(TABLE_STAKEHOLDER)->where('objectID')->eq((int)$this->session->PRJ)->andWhere('objectType')->eq('project')->fetchPairs();
+ $this->dao->delete()->from(TABLE_STAKEHOLDER)->where('objectID')->eq((int)$this->session->PRJ)->andWhere('objectType')->eq('project')->exec();
foreach($accounts as $key => $account)
{
if(empty($account)) continue;
$stakeholder = new stdclass();
- $stakeholder->objectID = $this->session->project;
+ $stakeholder->objectID = $this->session->PRJ;
$stakeholder->objectType = 'project';
$stakeholder->user = $account;
$stakeholder->type = in_array($account, array_keys($members)) ? 'inside' : 'outside';
@@ -142,7 +142,7 @@ class stakeholderModel extends model
$changedAccounts = array_merge($changedAccounts, array_diff($oldAccounts, $accounts));
$changedAccounts = array_unique($changedAccounts);
- $this->loadModel('user')->updateUserView($this->session->project, 'project', $changedAccounts);
+ $this->loadModel('user')->updateUserView($this->session->PRJ, 'project', $changedAccounts);
}
/**
@@ -206,7 +206,7 @@ class stakeholderModel extends model
->leftJoin(TABLE_COMPANY)->alias('t3')->on('t2.company=t3.id')
->leftJoin(TABLE_PROJECT)->alias('t4')->on('t1.objectID=t4.id')
->where('t1.deleted')->eq('0')
- ->andWhere('t1.objectID')->eq($this->session->project)
+ ->andWhere('t1.objectID')->eq($this->session->PRJ)
->beginIF($browseType == 'inside')->andWhere('t1.type')->eq('inside')->fi()
->beginIF($browseType == 'outside')->andWhere('t1.type')->eq('outside')->fi()
->beginIF($browseType == 'key')->andWhere('t1.key')->ne('0')->fi()
@@ -230,7 +230,7 @@ class stakeholderModel extends model
{
$stakeholders = $this->dao->select('id, user')->from(TABLE_STAKEHOLDER)
->where('deleted')->eq('0')
- ->andWhere('objectID')->eq($this->session->project)
+ ->andWhere('objectID')->eq($this->session->PRJ)
->orderBy('id_desc')
->fetchPairs();
@@ -309,7 +309,7 @@ class stakeholderModel extends model
$stakeholders = $this->dao->select('t2.realname as name, t2.account, t1.type, t2.role')->from(TABLE_STAKEHOLDER)->alias('t1')
->leftJoin(TABLE_USER)->alias('t2')->on('t1.user=t2.account')
->where('t1.deleted')->eq('0')
- ->andWhere('t1.objectID')->eq($this->session->project)
+ ->andWhere('t1.objectID')->eq($this->session->PRJ)
->fetchGroup('type');
return $stakeholders;
@@ -329,7 +329,7 @@ class stakeholderModel extends model
->leftJoin(TABLE_COMPANY)->alias('t3')->on('t2.company=t3.id')
->where('t1.id')->eq($userID)
->andWhere('t1.deleted')->eq('0')
- ->andWhere('t1.objectID')->eq($this->session->project)
+ ->andWhere('t1.objectID')->eq($this->session->PRJ)
->fetch();
return $stakeholder;
@@ -344,7 +344,7 @@ class stakeholderModel extends model
public function getProcessGroup()
{
$group = $this->dao->select('process, activity')->from(TABLE_PROGRAMACTIVITY)
- ->where('project')->eq($this->session->project)
+ ->where('project')->eq($this->session->PRJ)
->andWhere('result')->eq('yes')
->fetchGroup('process');
@@ -374,7 +374,7 @@ class stakeholderModel extends model
{
return $this->dao->select('*')->from(TABLE_INTERVENTION)
->where('deleted')->eq(0)
- ->andWhere('project')->eq($this->session->project)
+ ->andWhere('project')->eq($this->session->PRJ)
->fetchAll('activity');
}
@@ -389,7 +389,7 @@ class stakeholderModel extends model
$stakeholders = $this->getStakeHolderPairs();
return $this->dao->select('*')->from(TABLE_ISSUE)
->where('deleted')->eq(0)
- ->andWhere('project')->eq($this->session->project)
+ ->andWhere('project')->eq($this->session->PRJ)
->andWhere('owner')->in(array_values($stakeholders))
->orWhere('activity')->ne('')
->orderBy('id_desc')
@@ -440,7 +440,7 @@ class stakeholderModel extends model
->add('userID', $userID)
->add('createdBy', $this->app->user->account)
->add('createdDate', date('Y-m-d'))
- ->add('project', $this->session->project)
+ ->add('project', $this->session->PRJ)
->stripTags($this->config->stakeholder->editor->expect['id'], $this->config->allowedTags)
->get();
@@ -492,7 +492,7 @@ class stakeholderModel extends model
$expects = $this->dao->select('t1.*,t2.key,t3.realname')->from(TABLE_EXPECT)->alias('t1')
->leftJoin(TABLE_STAKEHOLDER)->alias('t2')->on('t1.userID=t2.id')
->leftJoin(TABLE_USER)->alias('t3')->on('t2.user=t3.account')
- ->where('t1.project')->eq($this->session->project)
+ ->where('t1.project')->eq($this->session->PRJ)
->beginIF($browseType == 'bysearch')
->andWhere($stakeholderQuery)
->fi()
@@ -565,7 +565,7 @@ class stakeholderModel extends model
$users = $this->dao->select("t1.id, CONCAT_WS('/', t3.name,t2.realname) as realname")->from(TABLE_STAKEHOLDER)->alias('t1')
->leftJoin(TABLE_USER)->alias('t2')->on('t1.user=t2.account')
->leftJoin(TABLE_COMPANY)->alias('t3')->on('t2.company=t3.id')
- ->where('t1.objectID')->eq($this->session->project)
+ ->where('t1.objectID')->eq($this->session->PRJ)
->andWhere('t1.deleted')->eq('0')
->fetchPairs('id', 'realname');
@@ -583,7 +583,7 @@ class stakeholderModel extends model
$users = $this->dao->select("t1.user, CONCAT_WS('/', t3.name,t2.realname) as realname")->from(TABLE_STAKEHOLDER)->alias('t1')
->leftJoin(TABLE_USER)->alias('t2')->on('t1.user=t2.account')
->leftJoin(TABLE_COMPANY)->alias('t3')->on('t2.company=t3.id')
- ->where('t1.objectID')->eq($this->session->project)
+ ->where('t1.objectID')->eq($this->session->PRJ)
->andWhere('t1.deleted')->eq('0')
->fetchPairs('user', 'realname');
@@ -644,7 +644,7 @@ class stakeholderModel extends model
public function getStakeholderIssue($account)
{
$issueList = $this->dao->select('*')->from(TABLE_ISSUE)
- ->where('project')->eq($this->session->project)
+ ->where('project')->eq($this->session->PRJ)
->andWhere('owner')->eq($account)
->andWhere('deleted')->eq('0')
->orderBy('id_desc')
diff --git a/module/story/control.php b/module/story/control.php
index 6158a60a2e..8ae0d131f2 100644
--- a/module/story/control.php
+++ b/module/story/control.php
@@ -139,8 +139,8 @@ class story extends control
if($executionID != 0)
{
- if($executionID != $this->session->project) $this->loadModel('action')->create('story', $storyID, 'linked2project', '', $executionID);
- $this->loadModel('action')->create('story', $storyID, 'linked2prj', '', $this->session->project);
+ if($executionID != $this->session->PRJ) $this->loadModel('action')->create('story', $storyID, 'linked2project', '', $executionID);
+ $this->loadModel('action')->create('story', $storyID, 'linked2prj', '', $this->session->PRJ);
}
if($todoID > 0)
@@ -387,7 +387,7 @@ class story extends control
$products = array();
foreach($mails as $story) $products[$story->storyID] = $productID;
$this->execution->linkStory($executionID, $stories, $products);
- if($executionID != $this->session->project) $this->execution->linkStory($this->session->project, $stories, $products);
+ if($executionID != $this->session->PRJ) $this->execution->linkStory($this->session->PRJ, $stories, $products);
}
/* If storyID not equal zero, subdivide this story to child stories and close it. */
@@ -658,7 +658,7 @@ class story extends control
if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
$this->lang->story->menu = $this->lang->execution->menu;
- $this->execution->setMenu($this->execution->getPairs($this->session->project, 'all', 'nodeleted'), $executionID);
+ $this->execution->setMenu($this->execution->getPairs($this->session->PRJ, 'all', 'nodeleted'), $executionID);
$this->lang->set('menugroup.story', 'execution');
$this->lang->story->menuOrder = $this->lang->execution->menuOrder;
@@ -854,9 +854,9 @@ class story extends control
$from = $this->app->openApp;
if($from == 'project')
{
- $project = $this->dao->findById((int)$this->session->project)->from(TABLE_PROJECT)->fetch();
+ $project = $this->dao->findById((int)$this->session->PRJ)->from(TABLE_PROJECT)->fetch();
$this->lang->product->menu = $this->lang->menu->{$project->model};
- $this->execution->setMenu($this->execution->getPairs($this->session->project, 'all', 'nodeleted'), $project->id);
+ $this->execution->setMenu($this->execution->getPairs($this->session->PRJ, 'all', 'nodeleted'), $project->id);
/* If status is done, can not create task from story. */
$execution = $this->execution->getById($param);
@@ -871,7 +871,7 @@ class story extends control
if($this->app->rawModule == 'projectstory')
{
- $project = $this->dao->findById((int)$this->session->project)->from(TABLE_PROJECT)->fetch();
+ $project = $this->dao->findById((int)$this->session->PRJ)->from(TABLE_PROJECT)->fetch();
$this->lang->product->menu = $this->lang->menu->{$project->model};
}
}
@@ -1158,7 +1158,7 @@ class story extends control
{
$this->lang->story->menu = $this->lang->execution->menu;
$this->lang->story->menuOrder = $this->lang->execution->menuOrder;
- $this->execution->setMenu($this->execution->getPairs($this->session->project, 'all', 'nodeleted'), $executionID);
+ $this->execution->setMenu($this->execution->getPairs($this->session->PRJ, 'all', 'nodeleted'), $executionID);
$this->lang->set('menugroup.story', 'execution');
$execution = $this->execution->getByID($executionID);
$this->view->position[] = html::a($this->createLink('execution', 'story', "executionID=$execution->id"), $execution->name);
@@ -1230,7 +1230,7 @@ class story extends control
$response['result'] = 'success';
$response['message'] = $this->lang->story->successToTask;
- $this->story->batchToTask($executionID, $this->session->project);
+ $this->story->batchToTask($executionID, $this->session->PRJ);
if(dao::isError())
{
@@ -1413,7 +1413,7 @@ class story extends control
$pager = new pager($recTotal, $recPerPage, $pageID);
$tracks = $this->story->getTracks($productID, $branch, $pager);
- if($this->app->rawModule == 'projectstory') $projectProducts = $this->product->getProducts($this->session->project);
+ if($this->app->rawModule == 'projectstory') $projectProducts = $this->product->getProducts($this->session->PRJ);
$this->view->title = $this->lang->story->track;
$this->view->position[] = $this->lang->story->track;
diff --git a/module/story/model.php b/module/story/model.php
index fceb411967..c14d43ea30 100644
--- a/module/story/model.php
+++ b/module/story/model.php
@@ -247,7 +247,7 @@ class storyModel extends model
if($executionID != 0 and $story->status != 'draft')
{
$this->linkStory($executionID, $this->post->product, $storyID);
- if($executionID != $this->session->project) $this->linkStory($this->session->project, $this->post->product, $storyID);
+ if($executionID != $this->session->PRJ) $this->linkStory($this->session->PRJ, $this->post->product, $storyID);
}
if(is_array($this->post->URS))
@@ -2313,7 +2313,7 @@ class storyModel extends model
$type = strtolower($type);
if($type == 'bysearch')
{
- if($this->app->rawModule == 'projectstory') $this->session->projectStoryQuery = $this->session->storyQuery;
+ if($this->app->rawModule == 'projectstory') $this->session->PRJStoryQuery = $this->session->storyQuery;
$queryID = (int)$param;
$products = $this->loadModel('execution')->getProducts($executionID);
@@ -3488,7 +3488,7 @@ class storyModel extends model
common::printIcon('story', 'edit', $vars . "&from=$story->from", $story, 'list', '', '', '', false, "data-group=$story->from");
common::printIcon('story', 'createCase', "productID=$story->product&branch=$story->branch&module=0&from=¶m=0&$vars", $story, 'list', 'sitemap');
common::printIcon('story', 'batchCreate', "productID=$story->product&branch=$story->branch&module=$story->module&storyID=$story->id", $story, 'list', 'split', '', '', '', '', $this->lang->story->subdivide);
- if($this->app->rawModule == 'projectstory') common::printIcon('projectstory', 'unlinkStory', "projectID={$this->session->project}&storyID=$story->id", '', 'list', 'unlink', 'hiddenwin');
+ if($this->app->rawModule == 'projectstory') common::printIcon('projectstory', 'unlinkStory', "projectID={$this->session->PRJ}&storyID=$story->id", '', 'list', 'unlink', 'hiddenwin');
}
else
{
diff --git a/module/story/view/view.html.php b/module/story/view/view.html.php
index 109f36c901..ffe17cbee7 100644
--- a/module/story/view/view.html.php
+++ b/module/story/view/view.html.php
@@ -53,7 +53,7 @@
$openApp = 'product';
if($this->app->rawModule == 'projectstory')
{
- $otherParam = "storyID=&projectID={$this->session->project}";
+ $otherParam = "storyID=&projectID={$this->session->PRJ}";
$openGroup = 'project';
}
?>
diff --git a/module/task/control.php b/module/task/control.php
index 394569b12c..b445f9320f 100644
--- a/module/task/control.php
+++ b/module/task/control.php
@@ -39,7 +39,7 @@ class task extends control
*/
public function create($executionID = 0, $storyID = 0, $moduleID = 0, $taskID = 0, $todoID = 0)
{
- $executions = $this->execution->getPairs($this->session->project);
+ $executions = $this->execution->getPairs($this->session->PRJ);
$executionID = $this->execution->saveState($executionID, $executions);
$this->execution->getLimitedExecution();
@@ -206,7 +206,7 @@ class task extends control
$this->view->title = $title;
$this->view->position = $position;
$this->view->execution = $execution;
- $this->view->executions = $this->config->systemMode == 'classic' ? $executions : $this->execution->getByProject($this->session->project, 'all', 0, true);
+ $this->view->executions = $this->config->systemMode == 'classic' ? $executions : $this->execution->getByProject($this->session->PRJ, 'all', 0, true);
$this->view->task = $task;
$this->view->users = $users;
$this->view->stories = $stories;
@@ -239,7 +239,7 @@ class task extends control
if($this->config->systemMode == 'new')
{
- $project = $this->project->getByID($this->session->project);
+ $project = $this->project->getByID($this->session->PRJ);
if($project->model == 'waterfall') $this->config->task->create->requiredFields .= ',estStarted,deadline';
}
@@ -248,7 +248,7 @@ class task extends control
$storyLink = $this->session->storyList ? $this->session->storyList : $this->createLink('execution', 'story', "executionID=$executionID");
/* Set menu. */
- $this->execution->setMenu($this->execution->getPairs($this->session->project), $execution->id);
+ $this->execution->setMenu($this->execution->getPairs($this->session->PRJ), $execution->id);
/* When common task are child tasks, query whether common task are consumed. */
$taskConsumed = 0;
@@ -317,7 +317,7 @@ class task extends control
$this->view->actions = $this->loadModel('action')->getList('task', $taskID);
/* Set menu. */
- $this->execution->setMenu($this->execution->getPairs($this->session->project), $this->view->execution->id);
+ $this->execution->setMenu($this->execution->getPairs($this->session->PRJ), $this->view->execution->id);
$this->view->position[] = html::a($this->createLink('execution', 'browse', "execution={$this->view->task->execution}"), $this->view->execution->name);
}
@@ -392,7 +392,7 @@ class task extends control
$this->view->users = $this->loadModel('user')->getPairs('nodeleted', "{$this->view->task->openedBy},{$this->view->task->canceledBy},{$this->view->task->closedBy}");
$this->view->showAllModule = isset($this->config->execution->task->allModule) ? $this->config->execution->task->allModule : '';
$this->view->modules = $this->tree->getTaskOptionMenu($this->view->task->execution, 0, 0, $this->view->showAllModule ? 'allModule' : '');
- $this->view->executions = $this->config->systemMode == 'classic' ? $this->execution->getPairs() : $this->execution->getByProject($this->session->project, 'all', 0, true);
+ $this->view->executions = $this->config->systemMode == 'classic' ? $this->execution->getPairs() : $this->execution->getByProject($this->session->PRJ, 'all', 0, true);
$this->display();
}
@@ -445,7 +445,7 @@ class task extends control
if($executionID)
{
$execution = $this->execution->getById($executionID);
- $this->execution->setMenu($this->execution->getPairs($this->session->project), $execution->id);
+ $this->execution->setMenu($this->execution->getPairs($this->session->PRJ), $execution->id);
/* Set modules and members. */
$showAllModule = isset($this->config->task->allModule) ? $this->config->task->allModule : '';
@@ -627,7 +627,7 @@ class task extends control
{
$task = $this->task->getById($taskID, true);
if(!$task) die(js::error($this->lang->notFound) . js::locate('back'));
- $this->session->project = $task->project;
+ $this->session->PRJ = $task->project;
if($task->fromBug != 0)
{
@@ -655,7 +655,7 @@ class task extends control
/* Set menu. */
$execution = $this->execution->getById($task->execution);
- $this->execution->setMenu($this->execution->getPairs($this->session->project), $execution->id);
+ $this->execution->setMenu($this->execution->getPairs($this->session->PRJ), $execution->id);
$this->executeHooks($taskID);
@@ -1323,7 +1323,7 @@ class task extends control
}
}
- $executions = $this->execution->getPairs($this->session->project);
+ $executions = $this->execution->getPairs($this->session->PRJ);
$this->execution->setMenu($executions, $executionID);
$this->executions = $executions;
diff --git a/module/task/model.php b/module/task/model.php
index 457a218458..2f2053e347 100644
--- a/module/task/model.php
+++ b/module/task/model.php
@@ -47,7 +47,7 @@ class taskModel extends model
->setDefault('execution', $executionID)
->setDefault('estimate,left,story', 0)
->setDefault('status', 'wait')
- ->setIF($this->config->systemMode == 'new', 'project', $this->session->project)
+ ->setIF($this->config->systemMode == 'new', 'project', $this->session->PRJ)
->setIF($this->post->estimate != false, 'left', $this->post->estimate)
->setIF($this->post->story != false, 'storyVersion', $this->loadModel('story')->getVersion($this->post->story))
->setDefault('estStarted', '0000-00-00')
@@ -303,7 +303,7 @@ class taskModel extends model
$data[$i]->pri = $tasks->pri[$i];
$data[$i]->estimate = $tasks->estimate[$i];
$data[$i]->left = $tasks->estimate[$i];
- $data[$i]->project = $this->config->systemMode == 'new' ? $this->session->project : 0;
+ $data[$i]->project = $this->config->systemMode == 'new' ? $this->session->PRJ : 0;
$data[$i]->execution = $executionID;
$data[$i]->estStarted = empty($tasks->estStarted[$i]) ? '0000-00-00' : $tasks->estStarted[$i];
$data[$i]->deadline = empty($tasks->deadline[$i]) ? '0000-00-00' : $tasks->deadline[$i];
@@ -2534,7 +2534,7 @@ class taskModel extends model
$datas = $this->processData4Report($tasks, '', 'execution');
- $executions = $this->loadModel('execution')->getPairs($this->session->project, 'all', 'all');
+ $executions = $this->loadModel('execution')->getPairs($this->session->PRJ, 'all', 'all');
foreach($datas as $executionID => $data)
{
$data->name = isset($executions[$executionID]) ? $executions[$executionID] : $this->lang->report->undefined;
@@ -3260,7 +3260,7 @@ class taskModel extends model
public function getExtraRequiredFields()
{
/* Add required fields to waterfall execution. */
- $execution = $this->loadModel('project')->getByID($this->session->project);
+ $execution = $this->loadModel('project')->getByID($this->session->PRJ);
if(!empty($execution) && $execution->model == 'waterfall')
{
$this->config->task->create->requiredFields .= ',estStarted,deadline';
diff --git a/module/testcase/model.php b/module/testcase/model.php
index c37e4f41dc..f8178acff0 100644
--- a/module/testcase/model.php
+++ b/module/testcase/model.php
@@ -73,7 +73,7 @@ class testcaseModel extends model
->add('fromBug', $bugID)
->setDefault('openedBy', $this->app->user->account)
->setDefault('openedDate', $now)
- ->setIF($this->config->systemMode == 'new' && $this->lang->navGroup->testcase != 'qa', 'project', $this->session->project)
+ ->setIF($this->config->systemMode == 'new' && $this->lang->navGroup->testcase != 'qa', 'project', $this->session->PRJ)
->setIF($this->post->story != false, 'storyVersion', $this->loadModel('story')->getVersion((int)$this->post->story))
->remove('steps,expects,files,labels,stepType,forceNotReview')
->setDefault('story', 0)
@@ -165,7 +165,7 @@ class testcaseModel extends model
$data[$i] = new stdclass();
$data[$i]->product = $productID;
- if($this->config->systemMode == 'new' && $this->lang->navGroup->testcase != 'qa') $data[$i]->project = $this->session->project;
+ if($this->config->systemMode == 'new' && $this->lang->navGroup->testcase != 'qa') $data[$i]->project = $this->session->PRJ;
$data[$i]->branch = $cases->branch[$i];
$data[$i]->module = $cases->module[$i];
$data[$i]->type = $cases->type[$i];
@@ -242,7 +242,7 @@ class testcaseModel extends model
return $this->dao->select('t1.*, t2.title as storyTitle')->from(TABLE_CASE)->alias('t1')
->leftJoin(TABLE_STORY)->alias('t2')->on('t1.story=t2.id')
->where('t1.product')->eq((int)$productID)
- ->beginIF($this->lang->navGroup->testcase != 'qa')->andWhere('t1.project')->eq($this->session->project)->fi()
+ ->beginIF($this->lang->navGroup->testcase != 'qa')->andWhere('t1.project')->eq($this->session->PRJ)->fi()
->beginIF($branch)->andWhere('t1.branch')->eq($branch)->fi()
->beginIF($moduleIdList)->andWhere('t1.module')->in($moduleIdList)->fi()
->beginIF($browseType == 'wait')->andWhere('t1.status')->eq($browseType)->fi()
@@ -271,7 +271,7 @@ class testcaseModel extends model
->leftJoin(TABLE_STORY)->alias('t2')->on('t1.story=t2.id')
->leftJoin(TABLE_SUITECASE)->alias('t3')->on('t1.id=t3.case')
->where('t1.product')->eq((int)$productID)
- ->beginIF($this->lang->navGroup->testcase != 'qa')->andWhere('t1.project')->eq($this->session->project)->fi()
+ ->beginIF($this->lang->navGroup->testcase != 'qa')->andWhere('t1.project')->eq($this->session->PRJ)->fi()
->andWhere('t3.suite')->eq((int)$suiteID)
->beginIF($branch)->andWhere('t1.branch')->eq($branch)->fi()
->beginIF($moduleIdList)->andWhere('t1.module')->in($moduleIdList)->fi()
@@ -364,7 +364,7 @@ class testcaseModel extends model
->andWhere('t1.deleted')->eq(0)
->andWhere('t2.version > t1.storyVersion')
->andWhere('t1.product')->eq($productID)
- ->beginIF($this->lang->navGroup->testcase != 'qa')->andWhere('t1.project')->eq($this->session->project)->fi()
+ ->beginIF($this->lang->navGroup->testcase != 'qa')->andWhere('t1.project')->eq($this->session->PRJ)->fi()
->beginIF($branch)->andWhere('t1.branch')->eq($branch)->fi()
->beginIF($modules)->andWhere('t1.module')->in($modules)->fi()
->beginIF($auto != 'unit')->andWhere('t1.auto')->ne('unit')->fi()
@@ -1124,7 +1124,7 @@ class testcaseModel extends model
}
else
{
- if($this->config->systemMode == 'new' && $this->lang->navGroup->testcase != 'qa') $caseData->project = $this->session->project;
+ if($this->config->systemMode == 'new' && $this->lang->navGroup->testcase != 'qa') $caseData->project = $this->session->PRJ;
$caseData->version = 1;
$caseData->openedBy = $this->app->user->account;
$caseData->openedDate = $now;
diff --git a/module/testreport/control.php b/module/testreport/control.php
index 7cb7b3ea3a..35b61ff0f5 100644
--- a/module/testreport/control.php
+++ b/module/testreport/control.php
@@ -422,7 +422,7 @@ class testreport extends control
{
$report = $this->testreport->getById($reportID);
if(!$report) die(js::error($this->lang->notFound) . js::locate('back'));
- $this->session->project = $report->project;
+ $this->session->PRJ = $report->project;
$execution = $this->execution->getById($report->execution);
if($from == 'product' and is_numeric($report->product))
@@ -535,7 +535,7 @@ class testreport extends control
{
if($objectType == 'product')
{
- $projectID = $this->lang->navGroup->testreport == 'qa' ? 0 : $this->session->project;
+ $projectID = $this->lang->navGroup->testreport == 'qa' ? 0 : $this->session->PRJ;
$this->products = $this->product->getProductPairsByProject($projectID);
if(empty($this->products)) die($this->locate($this->createLink('product', 'showErrorNone', "fromModule=testreport")));
$productID = $this->product->saveState($objectID, $this->products);
@@ -544,7 +544,7 @@ class testreport extends control
}
elseif($objectType == 'project')
{
- $this->executions = $this->execution->getPairs($this->session->project, 'all', 'nocode');
+ $this->executions = $this->execution->getPairs($this->session->PRJ, 'all', 'nocode');
$executionID = $this->execution->saveState($objectID, $this->executions);
$this->execution->setMenu($this->executions, $executionID);
$this->lang->testreport->menu = $this->lang->execution->menu;
diff --git a/module/testreport/model.php b/module/testreport/model.php
index 37d2f9e457..62f39b6a8e 100644
--- a/module/testreport/model.php
+++ b/module/testreport/model.php
@@ -23,7 +23,7 @@ class testreportModel extends model
public function setMenu($products, $productID, $branch = 0)
{
$this->loadModel('product')->setMenu($products, $productID, $branch);
- $selectHtml = $this->product->select($products, $productID, 'testreport', 'browse', $this->session->project, $branch);
+ $selectHtml = $this->product->select($products, $productID, 'testreport', 'browse', $this->session->PRJ, $branch);
/* Remove branch. */
if(strpos($selectHtml, 'currentBranch') !== false) $selectHtml = substr($selectHtml, 0, strrpos($selectHtml, "")) . '
';
@@ -57,7 +57,7 @@ class testreportModel extends model
{
$data = fixer::input('post')
->stripTags($this->config->testreport->editor->create['id'], $this->config->allowedTags)
- ->setIF($this->config->systemMode == 'new' and $this->lang->navGroup->testreport != 'qa', 'project', $this->session->project)
+ ->setIF($this->config->systemMode == 'new' and $this->lang->navGroup->testreport != 'qa', 'project', $this->session->PRJ)
->add('createdBy', $this->app->user->account)
->add('createdDate', helper::now())
->join('stories', ',')
@@ -149,7 +149,7 @@ class testreportModel extends model
{
$objectID = (int)$objectID;
return $this->dao->select('*')->from(TABLE_TESTREPORT)->where('deleted')->eq(0)
- ->beginIF($this->lang->navGroup->testreport != 'qa')->andWhere('project')->eq($this->session->project)->fi()
+ ->beginIF($this->lang->navGroup->testreport != 'qa')->andWhere('project')->eq($this->session->PRJ)->fi()
->beginIF($objectType == 'project')->andWhere('objectID')->eq($objectID)->andWhere('objectType')->eq('project')->fi()
->beginIF($objectType == 'product' and $extra)->andWhere('objectID')->eq((int)$extra)->andWhere('objectType')->eq('testtask')->fi()
->beginIF($objectType == 'product' and empty($extra))->andWhere('product')->eq($objectID)->fi()
diff --git a/module/testsuite/control.php b/module/testsuite/control.php
index 85330ab0de..845cae0030 100644
--- a/module/testsuite/control.php
+++ b/module/testsuite/control.php
@@ -69,7 +69,7 @@ class testsuite extends control
$this->session->set('testsuiteList', $this->app->getURI(true));
/* Set menu. */
- $projectID = $this->lang->navGroup->testreport == 'qa' ? 0 : $this->session->project;
+ $projectID = $this->lang->navGroup->testreport == 'qa' ? 0 : $this->session->PRJ;
$this->view->products = $this->products = $this->loadModel('product')->getProductPairsByProject($projectID);
if(empty($this->products)) die($this->locate($this->createLink('product', 'showErrorNone', "fromModule=testsuite")));
$productID = $this->product->saveState($productID, $this->products);
@@ -136,7 +136,7 @@ class testsuite extends control
}
/* Set menu. */
- $this->view->products = $this->products = $this->loadModel('product')->getProductPairsByProject($this->session->project);
+ $this->view->products = $this->products = $this->loadModel('product')->getProductPairsByProject($this->session->PRJ);
$productID = $this->product->saveState($productID, $this->products);
$this->testsuite->setMenu($this->products, $productID);
@@ -169,7 +169,7 @@ class testsuite extends control
if($suite->type == 'private' and $suite->addedBy != $this->app->user->account and !$this->app->user->admin) die(js::error($this->lang->error->accessDenied) . js::locate('back'));
$productID = $suite->product;
- $this->view->products = $this->products = $this->loadModel('product')->getProductPairsByProject($this->session->project);
+ $this->view->products = $this->products = $this->loadModel('product')->getProductPairsByProject($this->session->PRJ);
$this->testsuite->setMenu($this->products, $productID);
/* Save session. */
@@ -239,7 +239,7 @@ class testsuite extends control
if($suite->type == 'private' and $suite->addedBy != $this->app->user->account and !$this->app->user->admin) die(js::error($this->lang->error->accessDenied) . js::locate('back'));
/* Get suite info. */
- $this->view->products = $this->products = $this->loadModel('product')->getProductPairsByProject($this->session->project);
+ $this->view->products = $this->products = $this->loadModel('product')->getProductPairsByProject($this->session->PRJ);
$productID = $this->product->saveState($suite->product, $this->products);
/* Set menu. */
@@ -319,7 +319,7 @@ class testsuite extends control
$this->session->set('caseList', $this->app->getURI(true));
/* Get suite and product id. */
- $this->view->products = $this->products = $this->loadModel('product')->getProductPairsByProject($this->session->project);
+ $this->view->products = $this->products = $this->loadModel('product')->getProductPairsByProject($this->session->PRJ);
$suite = $this->testsuite->getById($suiteID);
$productID = $this->product->saveState($suite->product, $this->products);
diff --git a/module/testsuite/model.php b/module/testsuite/model.php
index 5380570eb4..1784547e8b 100644
--- a/module/testsuite/model.php
+++ b/module/testsuite/model.php
@@ -101,7 +101,7 @@ class testsuiteModel extends model
{
$suite = fixer::input('post')
->stripTags($this->config->testsuite->editor->create['id'], $this->config->allowedTags)
- ->setIF($this->config->systemMode == 'new' and $this->lang->navGroup->testsuite != 'qa', 'project', $this->session->project)
+ ->setIF($this->config->systemMode == 'new' and $this->lang->navGroup->testsuite != 'qa', 'project', $this->session->PRJ)
->add('product', (int)$productID)
->add('addedBy', $this->app->user->account)
->add('addedDate', helper::now())
@@ -133,7 +133,7 @@ class testsuiteModel extends model
{
return $this->dao->select("*")->from(TABLE_TESTSUITE)
->where('product')->eq((int)$productID)
- ->beginIF($this->config->systemMode == 'new' and $this->lang->navGroup->testsuite != 'qa')->andWhere('project')->eq($this->session->project)->fi()
+ ->beginIF($this->config->systemMode == 'new' and $this->lang->navGroup->testsuite != 'qa')->andWhere('project')->eq($this->session->PRJ)->fi()
->andWhere('deleted')->eq(0)
->andWhere("(`type` = 'public' OR (`type` = 'private' and addedBy = '{$this->app->user->account}'))")
->orderBy($orderBy)
@@ -242,7 +242,7 @@ class testsuiteModel extends model
$cases = $this->dao->select('t1.*,t2.version as caseVersion')->from(TABLE_CASE)->alias('t1')
->leftJoin(TABLE_SUITECASE)->alias('t2')->on('t1.id=t2.case')
->where('t2.suite')->eq($suiteID)
- ->beginIF($this->config->systemMode == 'new' and $this->lang->navGroup->testsuite != 'qa')->andWhere('t1.project')->eq($this->session->project)->fi()
+ ->beginIF($this->config->systemMode == 'new' and $this->lang->navGroup->testsuite != 'qa')->andWhere('t1.project')->eq($this->session->PRJ)->fi()
->andWhere('t1.product')->eq($suite->product)
->andWhere('t1.product')->eq($suite->product)
->andWhere('t1.deleted')->eq(0)
@@ -286,7 +286,7 @@ class testsuiteModel extends model
$linkedCases = $this->getLinkedCases($suite->id, 'id_desc', null, $append = false);
$cases = $this->dao->select('*')->from(TABLE_CASE)->where($query)
->andWhere('id')->notIN(array_keys($linkedCases))
- ->beginIF($this->config->systemMode == 'new' and $this->lang->navGroup->testsuite != 'qa')->andWhere('project')->eq($this->session->project)->fi()
+ ->beginIF($this->config->systemMode == 'new' and $this->lang->navGroup->testsuite != 'qa')->andWhere('project')->eq($this->session->PRJ)->fi()
->andWhere('deleted')->eq(0)
->orderBy('id desc')
->page($pager)
@@ -323,7 +323,7 @@ class testsuiteModel extends model
{
$importedCases = $this->dao->select('fromCaseID')->from(TABLE_CASE)
->where('product')->eq($productID)
- ->beginIF($this->config->systemMode == 'new' and $this->lang->navGroup->testsuite != 'qa')->andWhere('project')->eq($this->session->project)->fi()
+ ->beginIF($this->config->systemMode == 'new' and $this->lang->navGroup->testsuite != 'qa')->andWhere('project')->eq($this->session->PRJ)->fi()
->andWhere('lib')->eq($libID)
->andWhere('fromCaseID')->ne('')
->andWhere('deleted')->eq(0)
@@ -357,7 +357,7 @@ class testsuiteModel extends model
return $this->dao->select('*')->from(TABLE_CASE)->where('deleted')->eq(0)
->beginIF($browseType != 'bysearch')->andWhere('lib')->eq($libID)->fi()
->beginIF($browseType == 'bysearch')->andWhere($query)->fi()
- ->begin($this->config->systemMode == 'new' and $this->lang->navGroup->testsuite != 'qa')->andWhere('project')->eq($this->session->project)->fi()
+ ->begin($this->config->systemMode == 'new' and $this->lang->navGroup->testsuite != 'qa')->andWhere('project')->eq($this->session->PRJ)->fi()
->andWhere('product')->eq(0)
->andWhere('id')->notIN($importedCases)
->orderBy($orderBy)
diff --git a/module/testtask/control.php b/module/testtask/control.php
index 6e44e8f5e1..52fae1f206 100644
--- a/module/testtask/control.php
+++ b/module/testtask/control.php
@@ -190,7 +190,7 @@ class testtask extends control
/* Create testtask from testtask of test.*/
$productID = $productID ? $productID : key($this->products);
- $projectID = $this->lang->navGroup->testtask == 'qa' ? 0 : $this->session->project;
+ $projectID = $this->lang->navGroup->testtask == 'qa' ? 0 : $this->session->PRJ;
$executions = empty($productID) ? array() : $this->product->getExecutionPairsByProduct($productID, 0, 'id_desc', $projectID);
$builds = empty($productID) ? array() : $this->loadModel('build')->getProductBuildPairs($productID, 0, 'notrunk', true);
@@ -226,8 +226,8 @@ class testtask extends control
if(!$task) die(js::error($this->lang->notFound) . js::locate('back'));
/* When the session changes, you need to query the related products again. */
- if($this->session->project != $task->project) $this->view->products = $this->products = $this->product->getProductPairsByProject($task->project);
- $this->session->project = $task->project;
+ if($this->session->PRJ != $task->project) $this->view->products = $this->products = $this->product->getProductPairsByProject($task->project);
+ $this->session->PRJ = $task->project;
$productID = $task->product;
$buildID = $task->build;
@@ -624,7 +624,7 @@ class testtask extends control
/* Create testtask from testtask of test.*/
$productID = $productID ? $productID : key($this->products);
- $projectID = $this->lang->navGroup->testtask == 'qa' ? 0 : $this->session->project;
+ $projectID = $this->lang->navGroup->testtask == 'qa' ? 0 : $this->session->PRJ;
$executions = empty($productID) ? array() : $this->product->getExecutionPairsByProduct($productID, 0, 'id_desc', $projectID);
$builds = empty($productID) ? array() : $this->loadModel('build')->getProductBuildPairs($productID, 0, 'notrunk', true);
@@ -1195,7 +1195,7 @@ class testtask extends control
$this->app->loadLang('job');
$productID = $productID ? $productID : key($this->products);
- $projectID = $this->lang->navGroup->testtask == 'qa' ? 0 : $this->session->project;
+ $projectID = $this->lang->navGroup->testtask == 'qa' ? 0 : $this->session->PRJ;
$executions = empty($productID) ? array() : $this->product->getExecutionPairsByProduct($productID, 0, 'id_desc', $projectID);
$builds = empty($productID) ? array() : $this->loadModel('build')->getProductBuildPairs($productID, 0, 'notrunk');
diff --git a/module/testtask/model.php b/module/testtask/model.php
index 539500fd0c..e0a80f4760 100644
--- a/module/testtask/model.php
+++ b/module/testtask/model.php
@@ -28,7 +28,7 @@ class testtaskModel extends model
if($testtask and $this->app->viewType != 'mhtml')
{
- $testtasks = $this->getProductTasks($productID, 0, 'id_desc', null, array('local', 'totalStatus'), 0, 0, $this->session->project);
+ $testtasks = $this->getProductTasks($productID, 0, 'id_desc', null, array('local', 'totalStatus'), 0, 0, $this->session->PRJ);
if(!isset($testtasks[$testtask])) $testtasks[$testtask] = $this->getById($testtask);
$selectHtml .= "";
@@ -155,7 +155,7 @@ class testtaskModel extends model
{
$task = fixer::input('post')
->setDefault('build', '')
- ->setIF($this->config->systemMode == 'new' and $this->lang->navGroup->testtask != 'qa', 'project', $this->session->project)
+ ->setIF($this->config->systemMode == 'new' and $this->lang->navGroup->testtask != 'qa', 'project', $this->session->PRJ)
->stripTags($this->config->testtask->editor->create['id'], $this->config->allowedTags)
->join('mailto', ',')
->remove('uid,contactListMenu')
@@ -203,7 +203,7 @@ class testtaskModel extends model
->leftJoin(TABLE_PROJECTPRODUCT)->alias('t5')->on('t1.execution = t5.project and t1.product = t5.product')
->where('t1.deleted')->eq(0)
- ->beginIF($this->config->systemMode == 'new' and $this->lang->navGroup->testtask != 'qa')->andWhere('t1.project')->eq($this->session->project)->fi()
+ ->beginIF($this->config->systemMode == 'new' and $this->lang->navGroup->testtask != 'qa')->andWhere('t1.project')->eq($this->session->PRJ)->fi()
->andWhere('t1.auto')->ne('unit')
->beginIF(!$this->app->user->admin)->andWhere('t3.id')->in("0,{$this->app->user->view->sprints}")->fi()
->beginIF($scopeAndStatus[0] == 'local')->andWhere('t1.product')->eq((int)$productID)->fi()
@@ -239,7 +239,7 @@ class testtaskModel extends model
->leftJoin(TABLE_BUILD)->alias('t4')->on('t1.build = t4.id')
->where('t1.deleted')->eq(0)
->andWhere('t1.product')->eq($productID)
- ->beginIF($this->config->systemMode == 'new' and $this->lang->navGroup->testtask != 'qa')->andWhere('t1.project')->eq($this->session->project)->fi()
+ ->beginIF($this->config->systemMode == 'new' and $this->lang->navGroup->testtask != 'qa')->andWhere('t1.project')->eq($this->session->PRJ)->fi()
->andWhere('t1.auto')->eq('unit')
->beginIF($browseType != 'all' and $browseType != 'newest' and $beginAndEnd)
->andWhere('t1.end')->ge($beginAndEnd['begin'])
@@ -455,7 +455,7 @@ class testtaskModel extends model
{
return $this->dao->select('*')->from(TABLE_CASE)->where($query)
->andWhere('id')->notIN($linkedCases)
- ->beginIF($this->config->systemMode == 'new' and $this->lang->navGroup->testtask != 'qa')->andWhere('project')->eq($this->session->project)->fi()
+ ->beginIF($this->config->systemMode == 'new' and $this->lang->navGroup->testtask != 'qa')->andWhere('project')->eq($this->session->PRJ)->fi()
->andWhere('status')->ne('wait')
->andWhere('type')->ne('unit')
->beginIF($task->branch)->andWhere('branch')->in("0,$task->branch")->fi()
@@ -484,7 +484,7 @@ class testtaskModel extends model
{
$cases = $this->dao->select('*')->from(TABLE_CASE)
->where($query)
- ->beginIF($this->config->systemMode == 'new' and $this->lang->navGroup->testtask != 'qa')->andWhere('project')->eq($this->session->project)->fi()
+ ->beginIF($this->config->systemMode == 'new' and $this->lang->navGroup->testtask != 'qa')->andWhere('project')->eq($this->session->PRJ)->fi()
->andWhere('product')->eq($productID)
->andWhere('status')->ne('wait')
->beginIF($linkedCases)->andWhere('id')->notIN($linkedCases)->fi()
@@ -517,7 +517,7 @@ class testtaskModel extends model
if($bugs)
{
$cases = $this->dao->select('*')->from(TABLE_CASE)->where($query)
- ->beginIF($this->config->systemMode == 'new' and $this->lang->navGroup->testtask != 'qa')->andWhere('project')->eq($this->session->project)->fi()
+ ->beginIF($this->config->systemMode == 'new' and $this->lang->navGroup->testtask != 'qa')->andWhere('project')->eq($this->session->PRJ)->fi()
->andWhere('product')->eq($productID)
->andWhere('status')->ne('wait')
->beginIF($linkedCases)->andWhere('id')->notIN($linkedCases)->fi()
@@ -550,7 +550,7 @@ class testtaskModel extends model
return $this->dao->select('t1.*,t2.version as version')->from(TABLE_CASE)->alias('t1')
->leftJoin(TABLE_SUITECASE)->alias('t2')->on('t1.id=t2.case')
->where($query)
- ->beginIF($this->config->systemMode == 'new' and $this->lang->navGroup->testtask != 'qa')->andWhere('t1.project')->eq($this->session->project)->fi()
+ ->beginIF($this->config->systemMode == 'new' and $this->lang->navGroup->testtask != 'qa')->andWhere('t1.project')->eq($this->session->PRJ)->fi()
->andWhere('t2.suite')->eq((int)$suite)
->andWhere('t1.product')->eq($productID)
->andWhere('status')->ne('wait')
@@ -585,7 +585,7 @@ class testtaskModel extends model
->where($query)
->andWhere('t1.id')->notin($linkedCases)
->andWhere('t2.task')->eq($testTask)
- ->beginIF($this->config->systemMode == 'new' and $this->lang->navGroup->testtask != 'qa')->andWhere('t1.project')->eq($this->session->project)->fi()
+ ->beginIF($this->config->systemMode == 'new' and $this->lang->navGroup->testtask != 'qa')->andWhere('t1.project')->eq($this->session->PRJ)->fi()
->andWhere('t1.status')->ne('wait')
->page($pager)
->fetchAll();
diff --git a/module/testtask/view/create.html.php b/module/testtask/view/create.html.php
index 81f5ebe4e5..3d6608cf3f 100644
--- a/module/testtask/view/create.html.php
+++ b/module/testtask/view/create.html.php
@@ -14,7 +14,7 @@
-session->project);?>
+session->PRJ);?>
diff --git a/module/todo/control.php b/module/todo/control.php
index 06b55c6080..75ec16b32b 100644
--- a/module/todo/control.php
+++ b/module/todo/control.php
@@ -400,7 +400,7 @@ class todo extends control
}
$projects = $this->loadModel('project')->getPairs();
- if(!isset($this->session->project)) $this->session->set('project', key($projects));
+ if(!isset($this->session->PRJ)) $this->session->set('project', key($projects));
$this->view->title = $this->app->user->account == $todo->account ? "{$this->lang->todo->common} #$todo->id $todo->name" : $this->lang->todo->common ;
$this->view->position[] = $this->lang->todo->view;
@@ -411,9 +411,9 @@ class todo extends control
$this->view->actions = $this->loadModel('action')->getList('todo', $todoID);
$this->view->from = $from;
$this->view->projects = $projects;
- $this->view->executions = $this->loadModel('execution')->getPairs($this->session->project);
+ $this->view->executions = $this->loadModel('execution')->getPairs($this->session->PRJ);
$this->view->products = $this->loadModel('product')->getPairs();
- $this->view->projectProducts = $this->loadModel('product')->getProductPairsByProject($this->session->project);
+ $this->view->projectProducts = $this->loadModel('product')->getProductPairsByProject($this->session->PRJ);
$this->display();
}
diff --git a/module/tree/control.php b/module/tree/control.php
index 3a071bfcf4..0989edf5ba 100644
--- a/module/tree/control.php
+++ b/module/tree/control.php
@@ -98,7 +98,7 @@ class tree extends control
if($from == 'project')
{
$this->lang->navGroup->tree = 'project';
- $productPairs = $this->product->getProductPairsByProject($this->session->project);
+ $productPairs = $this->product->getProductPairsByProject($this->session->PRJ);
}
elseif($from == 'qa')
{
@@ -141,7 +141,7 @@ class tree extends control
if($from == 'project')
{
$this->lang->navGroup->tree = 'project';
- $productPairs = $this->product->getProductPairsByProject($this->session->project);
+ $productPairs = $this->product->getProductPairsByProject($this->session->PRJ);
}
elseif($from == 'qa')
{
@@ -210,7 +210,7 @@ class tree extends control
$this->lang->tree->menuOrder = $this->lang->project->menuOrder;
/* The project parameter needs to be present when the tree module belongs to the project grouping. */
- if($this->session->docList && $this->session->project && strpos($this->session->docList, 'project') === false) $this->session->set('docList', $this->session->docList . '?project=' . $this->session->project);
+ if($this->session->docList && $this->session->PRJ && strpos($this->session->docList, 'project') === false) $this->session->set('docList', $this->session->docList . '?project=' . $this->session->PRJ);
}
if($from == 'doc') $this->lang->navGroup->doc = 'doc';
@@ -226,7 +226,7 @@ class tree extends control
}
elseif($viewType == 'line')
{
- $products = $this->product->getPairs('', $this->session->project);
+ $products = $this->product->getPairs('', $this->session->PRJ);
$this->lang->set('menugroup.tree', 'product');
$this->product->setMenu($products, $rootID, $branch, 'line', '', 'line');
@@ -306,7 +306,7 @@ class tree extends control
$products = $this->execution->getProducts($rootID);
$this->view->products = $products;
- $executions = $this->execution->getPairs($this->session->project);
+ $executions = $this->execution->getPairs($this->session->PRJ);
/* Set menu. */
$this->lang->set('menugroup.tree', 'execution');