diff --git a/module/branch/control.php b/module/branch/control.php
index f44b5ef748..dc4010110d 100644
--- a/module/branch/control.php
+++ b/module/branch/control.php
@@ -63,7 +63,7 @@ class branch extends control
{
$this->view->link = $this->loadModel('product')->getProductLink($module, $method, $extra, true);
$this->view->productID = $productID;
- $this->view->projectID = $this->session->PRJ;
+ $this->view->projectID = $this->session->project;
$this->view->module = $module;
$this->view->method = $method;
$this->view->extra = $extra;
diff --git a/module/bug/control.php b/module/bug/control.php
index def51c6a53..b5dfe64eb7 100644
--- a/module/bug/control.php
+++ b/module/bug/control.php
@@ -126,7 +126,6 @@ class bug extends control
$queryID = ($browseType == 'bysearch') ? (int)$param : 0;
/* Set menu and save session. */
- $this->bug->setMenu($this->products, $productID, $branch, $moduleID, $browseType, $orderBy);
$this->session->set('bugList', $this->app->getURI(true));
/* Set moduleTree. */
@@ -389,7 +388,7 @@ class bug extends control
$this->bug->setMenu($this->products, $productID, $branch);
/* Init vars. */
- $projectID = $this->session->PRJ ? $this->session->PRJ : 0;
+ $projectID = $this->session->project ? $this->session->project : 0;
$moduleID = 0;
$executionID = 0;
$taskID = 0;
@@ -630,7 +629,7 @@ class bug extends control
$showFields = trim($showFields, ',');
}
- $projectID = $this->lang->navGroup->bug == 'project' ? $this->session->PRJ : 0;
+ $projectID = $this->lang->navGroup->bug == 'project' ? $this->session->project : 0;
$this->view->customFields = $customFields;
$this->view->showFields = $showFields;
@@ -666,8 +665,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'));
- if($bug->project) $this->session->PRJ = $bug->project;
- $this->view->products = $this->products = $this->product->getProductPairsByProject($this->session->PRJ);
+ if($bug->project) $this->session->project = $bug->project;
+ $this->view->products = $this->products = $this->product->getProductPairsByProject($this->session->project);
$this->bug->checkBugExecutionPriv($bug);
@@ -682,7 +681,7 @@ class bug extends control
elseif($from == 'repo')
{
session_write_close();
- $repos = $this->loadModel('repo')->getRepoPairs($this->session->PRJ);
+ $repos = $this->loadModel('repo')->getRepoPairs($this->session->project);
$this->repo->setMenu($repos);
$this->lang->bug->menu = $this->lang->repo->menu;
}
@@ -813,7 +812,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->PRJ : 0;
+ $projectID = $this->lang->navGroup->bug == 'project' ? $this->session->project : 0;
$this->view->bug = $bug;
$this->view->productID = $productID;
@@ -1179,7 +1178,7 @@ class bug extends control
}
}
- $projectID = $this->lang->navGroup->bug == 'project' ? $this->session->PRJ : 0;
+ $projectID = $this->lang->navGroup->bug == 'project' ? $this->session->project : 0;
$bug = $this->bug->getById($bugID);
$productID = $bug->product;
$users = $this->user->getPairs('noclosed');
@@ -1835,7 +1834,7 @@ class bug extends control
foreach($this->config->qa->menuList as $menu) $this->lang->navGroup->$menu = 'qa';
}
- $products = $this->product->getProducts($this->session->PRJ, $this->config->CRProduct ? 'all' : 'noclosed', 'program desc, line desc, ');
+ $products = $this->product->getProducts($this->session->project, $this->config->CRProduct ? 'all' : 'noclosed', 'program desc, line desc, ');
$this->view->link = $this->product->getProductLink($module, $method, $extra);
$this->view->productID = $productID;
@@ -1843,7 +1842,7 @@ class bug extends control
$this->view->method = $method;
$this->view->extra = $extra;
$this->view->products = $products;
- $this->view->projectID = $this->session->PRJ;
+ $this->view->projectID = $this->session->project;
$this->view->programs = $this->loadModel('program')->getPairs(true);
$this->view->lines = $this->product->getLinePairs();
$this->display();
diff --git a/module/bug/model.php b/module/bug/model.php
index affbee0cdc..aacc669b46 100644
--- a/module/bug/model.php
+++ b/module/bug/model.php
@@ -61,7 +61,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->PRJ)
+ ->setIF($this->config->systemMode == 'new' && $this->lang->navGroup->bug != 'qa', 'project', $this->session->project)
->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))
@@ -227,7 +227,7 @@ class bugModel extends model
}
}
- if($this->config->systemMode == 'new' && $this->lang->navGroup->bug != 'qa') $bug->project = $this->session->PRJ;
+ if($this->config->systemMode == 'new' && $this->lang->navGroup->bug != 'qa') $bug->project = $this->session->project;
$this->dao->insert(TABLE_BUG)->data($bug)
->autoCheck()
->batchCheck($this->config->bug->create->requiredFields, 'notempty')
@@ -1230,7 +1230,7 @@ class bugModel extends model
*/
public function buildSearchForm($productID, $products, $queryID, $actionURL)
{
- $projectID = $this->lang->navGroup->bug == 'qa' ? 0 : $this->session->PRJ;
+ $projectID = $this->lang->navGroup->bug == 'qa' ? 0 : $this->session->project;
$productParams = $productID ? array($productID => $products[$productID]) : $products;
$productParams = $productParams + array('all' => $this->lang->bug->allProduct);
@@ -1248,7 +1248,7 @@ class bugModel extends model
$this->config->bug->search['params']['product']['values'] = $productParams;
$this->config->bug->search['params']['plan']['values'] = $this->loadModel('productplan')->getPairs($productID);
$this->config->bug->search['params']['module']['values'] = $modules;
- $this->config->bug->search['params']['execution']['values'] = $this->product->getExecutionPairsByProduct($productID, 0, 'id_desc', $projectID);
+ $this->config->bug->search['params']['execution']['values'] = $this->loadModel('product')->getExecutionPairsByProduct($productID, 0, 'id_desc', $projectID);
$this->config->bug->search['params']['severity']['values'] = array(0 => '') + $this->lang->bug->severityList; //Fix bug #939.
$this->config->bug->search['params']['openedBuild']['values'] = $this->loadModel('build')->getProductBuildPairs($productID, 0, $params = '');
$this->config->bug->search['params']['resolvedBuild']['values'] = $this->config->bug->search['params']['openedBuild']['values'];
@@ -1753,7 +1753,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->PRJ);
+ $executions = $this->loadModel('execution')->getPairs($this->session->project);
$maxLength = 12;
if(common::checkNotCN()) $maxLength = 22;
diff --git a/module/build/control.php b/module/build/control.php
index 8dc13ef88f..8aa3159699 100644
--- a/module/build/control.php
+++ b/module/build/control.php
@@ -132,7 +132,7 @@ class build extends control
$execution->name = '';
}
- $executions = $this->product->getExecutionPairsByProduct($build->product, $build->branch, 'id_desc', $this->session->PRJ);
+ $executions = $this->product->getExecutionPairsByProduct($build->product, $build->branch, 'id_desc', $this->session->project);
if(!isset($executions[$build->execution])) $executions[$build->execution] = $execution->name;
$productGroups = $this->execution->getProducts($build->execution);
@@ -182,7 +182,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->PRJ = $build->project;
+ $this->session->project = $build->project;
if($this->app->openApp == 'project')
{
@@ -224,7 +224,7 @@ class build extends control
/* Set menu. */
commonModel::setMenuVars('execution', $build->execution);
- $executions = $this->loadModel('execution')->getPairs($this->session->PRJ, 'all', 'empty');
+ $executions = $this->loadModel('execution')->getPairs($this->session->project, '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]);
@@ -552,7 +552,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->PRJ);
+ $this->config->bug->search['params']['execution']['values'] = $this->loadModel('product')->getExecutionPairsByProduct($build->product, 0, 'id_desc', $this->session->project);
$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 f18e6f96ad..9324f02051 100644
--- a/module/build/model.php
+++ b/module/build/model.php
@@ -353,7 +353,7 @@ class buildModel extends model
$build->bugs = '';
$build = fixer::input('post')
- ->setDefault('project', $this->session->PRJ)
+ ->setDefault('project', $this->session->project)
->setDefault('product', 0)
->setDefault('branch', 0)
->cleanInt('product,branch')
diff --git a/module/caselib/model.php b/module/caselib/model.php
index bae71b84ea..b7ffc352a4 100644
--- a/module/caselib/model.php
+++ b/module/caselib/model.php
@@ -222,7 +222,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->PRJ)
+ ->setIF($this->config->systemMode == 'new' and $this->lang->navGroup->caselib != 'qa', 'project', $this->session->project)
->add('addedBy', $this->app->user->account)
->add('addedDate', helper::now())
->remove('uid')
@@ -266,7 +266,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->PRJ)->fi()
+ ->beginIF($this->config->systemMode == 'new' and $this->lang->navGroup->caselib != 'qa')->andWhere('project')->eq($this->session->project)->fi()
->andWhere('product')->eq(0)
->beginIF($moduleIdList)->andWhere('module')->in($moduleIdList)->fi()
->beginIF($browseType == 'wait')->andWhere('status')->eq($browseType)->fi()
@@ -303,7 +303,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->PRJ)->fi()
+ ->beginIF($this->config->systemMode == 'new' and $this->lang->navGroup->caselib != 'qa')->andWhere('project')->eq($this->session->project)->fi()
->andWhere('product')->eq(0)
->andWhere('deleted')->eq(0)
->orderBy($sort)->page($pager)->fetchAll();
@@ -524,7 +524,7 @@ class caselibModel extends model
}
else
{
- $caseData->project = $this->session->PRJ;
+ $caseData->project = $this->session->project;
$caseData->version = 1;
$caseData->openedBy = $this->app->user->account;
$caseData->openedDate = $now;
@@ -618,7 +618,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->PRJ;
+ if($this->config->systemMode == 'new' and $this->lang->navGroup->caselib != 'qa') $data[$i]->project = $this->session->project;
$this->dao->insert(TABLE_CASE)->data($data[$i])
->autoCheck()
diff --git a/module/common/model.php b/module/common/model.php
index 5f0a4d1983..0f70729e32 100644
--- a/module/common/model.php
+++ b/module/common/model.php
@@ -477,7 +477,7 @@ class commonModel extends model
if(isset($lang->$model->dropMenu->$key))
{
$programDropMenu = $lang->$model->dropMenu->$key;
- $dropMenu = common::createDropMenu($programDropMenu, $app->session->PRJ);
+ $dropMenu = common::createDropMenu($programDropMenu, $app->session->project);
if(!empty($dropMenu))
{
@@ -1726,7 +1726,7 @@ EOD;
if(!defined('IN_UPGRADE') and $inProject)
{
/* Check program priv. */
- if($this->session->PRJ and strpos(",{$this->app->user->view->projects},", ",{$this->session->PRJ},") === false and !$this->app->user->admin) $this->loadModel('project')->accessDenied();
+ if($this->session->project and strpos(",{$this->app->user->view->projects},", ",{$this->session->project},") === false and !$this->app->user->admin) $this->loadModel('project')->accessDenied();
$this->resetProgramPriv($module, $method);
if(!commonModel::hasPriv($module, $method)) $this->deny($module, $method, false);
}
@@ -1763,7 +1763,7 @@ EOD;
/* If is the program admin, have all program privs. */
$inProject = isset($lang->navGroup->$module) && $lang->navGroup->$module == 'project';
- if($inProject && $app->session->PRJ && strpos(",{$app->user->rights['projects']},", ",{$app->session->PRJ},") !== false) return true;
+ if($inProject && $app->session->project && strpos(",{$app->user->rights['projects']},", ",{$app->session->project},") !== false) return true;
/* If module is project and method is execution, check for all execution privilege. */
if($module == 'project' and $method == 'execution')
@@ -1809,8 +1809,8 @@ EOD;
public function resetProgramPriv($module, $method)
{
/* Get user program priv. */
- if(!$this->app->session->PRJ) return;
- $program = $this->dao->findByID($this->app->session->PRJ)->from(TABLE_PROJECT)->fetch();
+ if(!$this->app->session->project) return;
+ $program = $this->dao->findByID($this->app->session->project)->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')
@@ -2331,7 +2331,7 @@ EOD;
public static function getProjectMainMenu($moduleName)
{
global $app, $lang, $dbh, $config;
- $project = $dbh->query("SELECT * FROM " . TABLE_PROJECT . " WHERE `id` = '{$app->session->PRJ}'")->fetch();
+ $project = $dbh->query("SELECT * FROM " . TABLE_PROJECT . " WHERE `id` = '{$app->session->project}'")->fetch();
if(empty($project)) return;
self::initProjectSubmenu();
diff --git a/module/doc/control.php b/module/doc/control.php
index 9466f4c39b..06eba5861c 100644
--- a/module/doc/control.php
+++ b/module/doc/control.php
@@ -123,7 +123,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->PRJ, 'all', 0, true), $lib->project);
+ $this->project->setMenu($this->project->getPairs($this->session->project, 'all', 0, true), $lib->project);
}
else
{
@@ -226,7 +226,7 @@ class doc extends control
}
}
- $projectID = $this->session->PRJ;
+ $projectID = $this->session->project;
$products = $this->product->getProductPairsByProject($projectID, 'noclosed');
$executions = $this->execution->getByProject($projectID, 'all', 0, true);
@@ -357,7 +357,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->PRJ, 'all', 0, true), $lib->project);
+ $this->project->setMenu($this->project->getPairs($this->session->project, 'all', 0, true), $lib->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%'") : '';
}
@@ -441,7 +441,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->getExecutionsByProject($this->session->PRJ, 'all', 0, true), $objectID);
+ $this->project->setMenu($this->project->getExecutionsByProject($this->session->project, 'all', 0, true), $objectID);
}
else
{
@@ -513,7 +513,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->PRJ, 'all', 0, true), $objectID);
+ $this->project->setMenu($this->project->getPairs($this->session->project, 'all', 0, true), $objectID);
}
else
{
@@ -920,7 +920,7 @@ class doc extends control
$table = $type == 'product' ? TABLE_PRODUCT : TABLE_PROJECT;
$object = $this->dao->select('id,name,status')->from($table)->where('id')->eq($objectID)->fetch();
- if(empty($object)) $this->locate($this->createLink($type, 'create', '', '', '', $this->session->PRJ));
+ if(empty($object)) $this->locate($this->createLink($type, 'create', '', '', '', $this->session->project));
$this->lang->noMenuModule[] = 'doc';
$from = $this->app->openApp;
diff --git a/module/doc/model.php b/module/doc/model.php
index d8533b34d7..a8dd6940bf 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->PRJ;
+ $projectID = $this->session->project;
if($type == 'product' or $type == 'project')
{
$idList = array();
@@ -796,8 +796,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->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']['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']['lib']['values'] = array(''=>'', $libID => ($libID ? $libs[$libID] : 0), 'all' => $this->lang->doclib->all);
/* Get the modules. */
@@ -1016,7 +1016,7 @@ class docModel extends model
$orderBy = '`order` desc, id desc';
if($type == 'execution')
{
- $project = $this->loadModel('project')->getByID($this->session->PRJ);
+ $project = $this->loadModel('project')->getByID($this->session->project);
$orderBy = (isset($project->model) and $project->model) == 'waterfall' ? 'begin_asc,id_asc' : 'begin_desc,id_desc';
}
@@ -1145,7 +1145,7 @@ class docModel extends model
}
$idList = array();
- $projectID = $this->session->PRJ;
+ $projectID = $this->session->project;
$executionStatus = strpos($this->config->doc->custom->showLibs, 'unclosed') !== false ? 'undone' : 'all';
/* If it is a extension module, query the extension related products. */
@@ -1604,7 +1604,7 @@ class docModel extends model
public function getStatisticInfo()
{
$libIdList = array();
- $libIdList = $this->getLibIdListByProject($this->session->PRJ);
+ $libIdList = $this->getLibIdListByProject($this->session->project);
$docIdList = $this->getPrivDocs($libIdList);
$today = date('Y-m-d');
diff --git a/module/execution/control.php b/module/execution/control.php
index 3c2631d1fa..77e1b56781 100644
--- a/module/execution/control.php
+++ b/module/execution/control.php
@@ -2928,7 +2928,7 @@ class execution extends control
}
$planStories = array_keys($planStory);
$this->execution->linkStory($executionID, $planStories, $planProducts);
- if($executionID != $this->session->PRJ) $this->execution->linkStory($this->session->PRJ, $planStories, $planProducts);
+ if($executionID != $this->session->project) $this->execution->linkStory($this->session->project, $planStories, $planProducts);
}
$moduleName = 'execution';
diff --git a/module/execution/model.php b/module/execution/model.php
index e8a1413c60..f84ac647bf 100644
--- a/module/execution/model.php
+++ b/module/execution/model.php
@@ -1991,7 +1991,7 @@ class executionModel extends model
$this->story->setStage($storyID);
$this->linkCases($executionID, (int)$products[$storyID], $storyID);
- $action = $executionID == $this->session->PRJ ? 'linked2project' : 'linked2execution';
+ $action = $executionID == $this->session->project ? 'linked2project' : 'linked2execution';
$this->action->create('story', $storyID, $action, '', $executionID);
}
}
@@ -2024,7 +2024,7 @@ class executionModel extends model
$this->dao->insert(TABLE_PROJECTCASE)->data($object)->exec();
- $action = $executionID == $this->session->PRJ ? 'linked2project' : 'linked2execution';
+ $action = $executionID == $this->session->project ? 'linked2project' : 'linked2execution';
$this->action->create('case', $caseID, $action, '', $executionID);
}
@@ -2069,7 +2069,7 @@ class executionModel extends model
}
}
$this->linkStory($executionID, $planStories, $planProducts);
- $this->linkStory($this->session->PRJ, $planStories, $planProducts);
+ $this->linkStory($this->session->project, $planStories, $planProducts);
if($count != 0) echo js::alert(sprintf($this->lang->execution->haveDraft, $count)) . js::locate(helper::createLink('execution', 'create', "productID=&executionID=$executionID"));
}
@@ -2102,7 +2102,7 @@ class executionModel extends model
$this->loadModel('story')->setStage($storyID);
$this->unlinkCases($executionID, $storyID);
- $objectType = $executionID == $this->session->PRJ ? unlinkedfromproject : unlinkedfromexecution;
+ $objectType = $executionID == $this->session->project ? unlinkedfromproject : unlinkedfromexecution;
$this->loadModel('action')->create('story', $storyID, $objectType, '', $executionID);
$tasks = $this->dao->select('id')->from(TABLE_TASK)->where('story')->eq($storyID)->andWhere('execution')->eq($executionID)->andWhere('status')->in('wait,doing')->fetchPairs('id');
@@ -2130,7 +2130,7 @@ class executionModel extends model
foreach($cases as $caseID => $case)
{
$this->dao->delete()->from(TABLE_PROJECTCASE)->where('project')->eq($executionID)->andWhere('`case`')->eq($caseID)->limit(1)->exec();
- $action = $executionID == $this->session->PRJ ? 'unlinkedfromproject' : 'unlinkedfromexecution';
+ $action = $executionID == $this->session->project ? 'unlinkedfromproject' : 'unlinkedfromexecution';
$this->action->create('case', $caseID, $action, '', $executionID);
}
diff --git a/module/personnel/control.php b/module/personnel/control.php
index e87e676011..dc4889630d 100644
--- a/module/personnel/control.php
+++ b/module/personnel/control.php
@@ -122,7 +122,7 @@ class personnel extends control
$pager = pager::init($recTotal, $recPerPage, $pageID);
/* Set back link. */
- $goback = $this->session->PRJBrowse ? $this->session->PRJBrowse : $this->createLink('program', 'whitelist', "projectID=$objectID");
+ $goback = $this->session->projectBrowse ? $this->session->projectBrowse : $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 27227d9095..141d2a6807 100644
--- a/module/product/control.php
+++ b/module/product/control.php
@@ -175,7 +175,7 @@ class product extends control
$browseType = 'unclosed';
if($this->app->rawModule == 'projectstory' and empty($productID))
{
- $moduleTree = $this->tree->getExecutionStoryTreeMenu($this->session->PRJ, 0, array('treeModel', 'createProjectStoryLink'));
+ $moduleTree = $this->tree->getExecutionStoryTreeMenu($this->session->project, 0, array('treeModel', 'createProjectStoryLink'));
}
else
{
@@ -186,7 +186,7 @@ class product extends control
{
if($this->app->rawModule == 'projectstory' and empty($productID))
{
- $moduleTree = $this->tree->getExecutionStoryTreeMenu($this->session->PRJ, 0, array('treeModel', 'createProjectStoryLink'));
+ $moduleTree = $this->tree->getExecutionStoryTreeMenu($this->session->project, 0, array('treeModel', 'createProjectStoryLink'));
}
else
{
@@ -214,12 +214,12 @@ class product extends control
if($this->app->rawModule == 'projectstory')
{
if(!empty($product)) $this->session->set('currentProductType', $product->type);
- $this->products = $this->loadModel('project')->getProducts($this->session->PRJ, false);
- $projectProducts = $this->product->getProducts($this->session->PRJ);
+ $this->products = $this->loadModel('project')->getProducts($this->session->project, false);
+ $projectProducts = $this->product->getProducts($this->session->project);
$productPlans = $this->execution->getPlans($projectProducts);
if($browseType == 'bybranch') $param = $branch;
- $stories = $this->story->getExecutionStories($this->session->PRJ, $productID, $branch, $sort, $browseType, $param, 'story', '', $pager);
+ $stories = $this->story->getExecutionStories($this->session->project, $productID, $branch, $sort, $browseType, $param, 'story', '', $pager);
}
else
{
@@ -926,7 +926,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->PRJ) : $this->product->getList();
+ $products = $moduleGroup == 'project' ? $this->product->getProducts($this->session->project) : $this->product->getList();
$this->view->link = $this->product->getProductLink($module, $method, $extra);
$this->view->productID = $productID;
@@ -934,7 +934,7 @@ class product extends control
$this->view->method = $method;
$this->view->extra = $extra;
$this->view->products = $products;
- $this->view->projectID = $moduleGroup == 'project' ? $this->session->PRJ : 0;
+ $this->view->projectID = $moduleGroup == 'project' ? $this->session->project : 0;
$this->view->programs = $this->loadModel('program')->getPairs(true);
$this->view->lines = $this->product->getLinePairs();
$this->view->openApp = $moduleGroup;
@@ -996,7 +996,7 @@ class product extends control
{
$this->app->loadLang($fromModule);
- $projectModel = $this->loadModel('project')->getByID($this->session->PRJ);
+ $projectModel = $this->loadModel('project')->getByID($this->session->project);
$this->lang->product->menu = $this->lang->menu->{$projectModel->model};
$this->lang->product->menuOrder = $this->lang->{$projectModel->model}->menuOrder;
@@ -1213,7 +1213,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->PRJ);
+ $this->products = $this->product->getPairs('', $this->session->project);
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 3c90ae399f..37da05371c 100644
--- a/module/product/view/browse.html.php
+++ b/module/product/view/browse.html.php
@@ -167,7 +167,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->PRJ}");
+ if($isProjectStory) $batchLink = $this->createLink('story', 'batchCreate', "productID=$productID&branch=$branch&moduleID=$moduleID&storyID=0&project={$this->session->project}");
echo html::a($batchLink, $lang->story->batchCreate, '', "data-group='$openApp'");
?>
diff --git a/module/product/view/showerrornone.html.php b/module/product/view/showerrornone.html.php
index 4af80ddd74..21ac1d8f65 100644
--- a/module/product/view/showerrornone.html.php
+++ b/module/product/view/showerrornone.html.php
@@ -13,7 +13,7 @@
-
product->noProduct;?> session->PRJ}", " " . $lang->project->manageProducts, '', "class='btn btn-info'");?>
+
product->noProduct;?> session->project}", " " . $lang->project->manageProducts, '', "class='btn btn-info'");?>
diff --git a/module/productplan/control.php b/module/productplan/control.php
index d687bdc59e..4434236d2d 100644
--- a/module/productplan/control.php
+++ b/module/productplan/control.php
@@ -264,7 +264,7 @@ class productplan extends control
$sort = $this->loadModel('common')->appendOrder($orderBy);
$this->commonAction($plan->product, $plan->branch);
- $products = $this->product->getProductPairsByProject($this->session->PRJ);
+ $products = $this->product->getProductPairsByProject($this->session->project);
$bugPager = new pager(0, $recPerPage, $type == 'bug' ? $pageID : 1);
$storyPager = new pager(0, $recPerPage, $type == 'story' ? $pageID : 1);
@@ -366,7 +366,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->PRJ);
+ $products = $this->product->getProductPairsByProject($this->session->project);
/* Load pager. */
$this->app->loadClass('pager', $static = true);
diff --git a/module/project/view/close.html.php b/module/project/view/close.html.php
index 5dbd4bb68d..4264552105 100644
--- a/module/project/view/close.html.php
+++ b/module/project/view/close.html.php
@@ -35,7 +35,7 @@
|
- | goback, $this->session->PRJList, 'self', '', 'btn btn-wide'); ?> |
+ goback, $this->session->projectList, 'self', '', 'btn btn-wide'); ?> |
diff --git a/module/projectrelease/control.php b/module/projectrelease/control.php
index 4872b667fe..71ed0393c0 100644
--- a/module/projectrelease/control.php
+++ b/module/projectrelease/control.php
@@ -28,7 +28,7 @@ class projectrelease extends control
$this->loadModel('product');
$this->loadModel('release');
$this->loadModel('project');
- $this->view->products = $this->products = $this->product->getProductPairsByProject($this->session->PRJ);
+ $this->view->products = $this->products = $this->product->getProductPairsByProject($this->session->project);
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->PRJ);
+ $products = $this->product->getProductPairsByProject($this->session->project);
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->project->getByID($this->session->PRJ);
+ $this->view->project = $this->project->getByID($this->session->project);
}
/**
@@ -68,7 +68,7 @@ class projectrelease extends control
public function browse($projectID = 0, $executionID = 0, $type = 'all')
{
$this->session->set('releaseList', $this->app->getURI(true));
- $execution = $this->loadModel('execution')->getById($this->session->PRJ);
+ $execution = $this->loadModel('execution')->getById($this->session->project);
if($projectID) $this->project->setMenu($projectID);
if($executionID) $this->loadModel('execution')->setMenu($executionID, $this->app->rawModule, $this->app->rawMethod);
@@ -76,7 +76,7 @@ class projectrelease extends control
$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->PRJ);
+ $this->view->products = $this->loadModel('product')->getProducts($this->session->project);
$this->view->releases = $this->projectrelease->getList($projectID, $type);
$this->view->projectID = $projectID;
$this->view->executionID = $executionID;
@@ -108,10 +108,10 @@ class projectrelease extends control
}
/* Get the builds that can select. */
- $productPairs = $this->loadModel('product')->getProductPairsByProject($this->session->PRJ);
+ $productPairs = $this->loadModel('product')->getProductPairsByProject($this->session->project);
$productIdList = array_keys($productPairs);
$builds = $this->loadModel('build')->getProductBuildPairs($productIdList, 0, 0, 'notrunk');
- $releaseBuilds = $this->projectrelease->getReleaseBuilds($this->session->PRJ);
+ $releaseBuilds = $this->projectrelease->getReleaseBuilds($this->session->project);
foreach($releaseBuilds as $build) unset($builds[$build]);
unset($builds['trunk']);
@@ -121,7 +121,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->PRJ);
+ $this->view->lastRelease = $this->projectrelease->getLast($this->session->project);
$this->display();
}
@@ -165,7 +165,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->PRJ, $release->product, $release->branch, 'notrunk|withbranch');
+ $this->view->builds = $this->loadModel('build')->getProjectBuildPairs($this->session->project, $release->product, $release->branch, 'notrunk|withbranch');
$this->display();
}
@@ -558,7 +558,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->PRJ);
+ $this->config->bug->search['params']['execution']['values'] = $this->loadModel('product')->getExecutionPairsByProduct($release->product, 0, 'id_desc', $this->session->project);
$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 bd373d9ecf..d8a7c3d3df 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->PRJ)
+ ->add('project', $this->session->project)
->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->PRJ;
+ $build->project = $this->session->project;
$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 8443347244..802b862b41 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->PRJ);
+ $this->products = $this->loadModel('product')->getProductPairsByProject($this->session->project);
if(empty($this->products)) die($this->locate($this->createLink('product', 'showErrorNone', 'fromModule=projectstory&moduleGroup=' . $this->lang->navGroup->projectstory . '&activeMenu=projectstory')));
}
@@ -81,7 +81,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->PRJ);
+ echo $this->fetch('story', 'view', "storyID=$storyID&version=$story->version¶m=" . $this->session->project);
}
/**
diff --git a/module/search/model.php b/module/search/model.php
index 093c0a245c..f8aa24abb1 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->PRJ);
- if($hasExecution) $executions = array('' => '') + $this->loadModel('execution')->getPairs($this->session->PRJ);
+ if($hasProduct) $products = array('' => '') + $this->loadModel('product')->getPairs('', $this->session->project);
+ if($hasExecution) $executions = array('' => '') + $this->loadModel('execution')->getPairs($this->session->project);
foreach($fields as $fieldName)
{
diff --git a/module/stakeholder/control.php b/module/stakeholder/control.php
index 85ec8a6640..644dcb7a01 100644
--- a/module/stakeholder/control.php
+++ b/module/stakeholder/control.php
@@ -72,7 +72,7 @@ class stakeholder extends control
}
else
{
- $this->view->members = $this->loadModel('execution')->getTeamMemberPairs($this->session->PRJ);
+ $this->view->members = $this->loadModel('execution')->getTeamMemberPairs($this->session->project);
}
$this->view->title = $this->lang->stakeholder->create;
@@ -105,11 +105,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->PRJ);
+ $this->view->project = $this->loadModel('project')->getByID($this->session->project);
$this->view->users = $this->user->getPairs('all|nodeleted|noclosed');
$this->view->deptUsers = $deptUsers;
$this->view->dept = $dept;
- $this->view->projectID = $this->session->PRJ;
+ $this->view->projectID = $this->session->project;
$this->view->depts = array('' => '') + $this->dept->getOptionMenu();
$this->view->stakeholders = $this->stakeholder->getStakeholders('all', 'id_desc');
$this->view->parentStakeholders = $this->loadModel('program')->getStakeholders($parentID, 't1.id_desc');
@@ -148,10 +148,10 @@ class stakeholder extends control
}
$users = array('' => '');
- if($stakeholder->type == 'team') $users = $this->loadModel('execution')->getTeamMemberPairs($this->session->PRJ);
+ if($stakeholder->type == 'team') $users = $this->loadModel('execution')->getTeamMemberPairs($this->session->project);
elseif($stakeholder->type == 'company')
{
- $members = $this->loadModel('execution')->getTeamMemberPairs($this->session->PRJ);
+ $members = $this->loadModel('execution')->getTeamMemberPairs($this->session->project);
$users = $this->loadModel('user')->getPairs('noclosed');
$users = array('' => '') + array_diff($users, $members);
}
@@ -175,7 +175,7 @@ class stakeholder extends control
*/
public function ajaxGetMembers($user = '', $programID = 0)
{
- $members = $programID == 0 ? $this->loadModel('execution')->getTeamMemberPairs($this->session->PRJ) : $this->loadModel('project')->getTeamMemberPairs($programID);
+ $members = $programID == 0 ? $this->loadModel('execution')->getTeamMemberPairs($this->session->project) : $this->loadModel('project')->getTeamMemberPairs($programID);
die(html::select('user', $members, $user, "class='form-control chosen'"));
}
@@ -189,7 +189,7 @@ class stakeholder extends control
*/
public function ajaxGetCompanyUser($user = '', $programID = 0)
{
- $members = $programID == 0 ? $this->loadModel('execution')->getTeamMemberPairs($this->session->PRJ) : $this->loadModel('project')->getTeamMemberPairs($programID);
+ $members = $programID == 0 ? $this->loadModel('execution')->getTeamMemberPairs($this->session->project) : $this->loadModel('project')->getTeamMemberPairs($programID);
$users = $this->loadModel('user')->getPairs('noclosed');
$companyUsers = array('' => '') + array_diff($users, $members);
@@ -269,7 +269,7 @@ class stakeholder extends control
else
{
$this->stakeholder->delete(TABLE_STAKEHOLDER, $userID);
- $this->loadModel('user')->updateUserView($this->session->PRJ, 'project');
+ $this->loadModel('user')->updateUserView($this->session->project, 'project');
die(js::reload('parent'));
}
}
@@ -288,7 +288,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->PRJ,'nodeleted');
+ $this->view->users = $this->loadModel('execution')->getTeamMemberPairs($this->session->project,'nodeleted');
$this->view->expects = $this->stakeholder->getExpectByUser($userID);
$this->display();
@@ -351,7 +351,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->PRJ,'nodeleted');
+ $this->view->users = $this->loadModel('execution')->getTeamMemberPairs($this->session->project,'nodeleted');
$this->display();
}
diff --git a/module/stakeholder/model.php b/module/stakeholder/model.php
index 01d5f758b7..c561ecf6fc 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->PRJ)
+ ->setIF($programID == 0, 'objectID', $this->session->project)
->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->PRJ);
+ $members = $this->loadModel('execution')->getTeamMemberPairs($this->session->project);
$accounts = array_unique($data['accounts']);
- $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();
+ $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();
foreach($accounts as $key => $account)
{
if(empty($account)) continue;
$stakeholder = new stdclass();
- $stakeholder->objectID = $this->session->PRJ;
+ $stakeholder->objectID = $this->session->project;
$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->PRJ, 'project', $changedAccounts);
+ $this->loadModel('user')->updateUserView($this->session->project, '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->PRJ)
+ ->andWhere('t1.objectID')->eq($this->session->project)
->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->PRJ)
+ ->andWhere('objectID')->eq($this->session->project)
->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->PRJ)
+ ->andWhere('t1.objectID')->eq($this->session->project)
->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->PRJ)
+ ->andWhere('t1.objectID')->eq($this->session->project)
->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->PRJ)
+ ->where('project')->eq($this->session->project)
->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->PRJ)
+ ->andWhere('project')->eq($this->session->project)
->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->PRJ)
+ ->andWhere('project')->eq($this->session->project)
->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->PRJ)
+ ->add('project', $this->session->project)
->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->PRJ)
+ ->where('t1.project')->eq($this->session->project)
->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->PRJ)
+ ->where('t1.objectID')->eq($this->session->project)
->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->PRJ)
+ ->where('t1.objectID')->eq($this->session->project)
->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->PRJ)
+ ->where('project')->eq($this->session->project)
->andWhere('owner')->eq($account)
->andWhere('deleted')->eq('0')
->orderBy('id_desc')
diff --git a/module/story/control.php b/module/story/control.php
index da386b6a47..6e39e781c0 100644
--- a/module/story/control.php
+++ b/module/story/control.php
@@ -127,8 +127,8 @@ class story extends control
if($objectID != 0)
{
- if($objectID != $this->session->PRJ) $this->loadModel('action')->create('story', $storyID, 'linked2project', '', $objectID);
- $this->loadModel('action')->create('story', $storyID, 'linked2project', '', $this->session->PRJ);
+ if($objectID != $this->session->project) $this->loadModel('action')->create('story', $storyID, 'linked2project', '', $objectID);
+ $this->loadModel('action')->create('story', $storyID, 'linked2project', '', $this->session->project);
}
if($todoID > 0)
@@ -386,7 +386,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->PRJ) $this->execution->linkStory($this->session->PRJ, $stories, $products);
+ if($executionID != $this->session->project) $this->execution->linkStory($this->session->project, $stories, $products);
}
/* If storyID not equal zero, subdivide this story to child stories and close it. */
@@ -653,7 +653,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->PRJ, 'all', 'nodeleted'), $executionID);
+ $this->execution->setMenu($this->execution->getPairs($this->session->project, 'all', 'nodeleted'), $executionID);
$this->lang->story->menuOrder = $this->lang->execution->menuOrder;
$execution = $this->execution->getByID($executionID);
@@ -1137,7 +1137,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->PRJ, 'all', 'nodeleted'), $executionID);
+ $this->execution->setMenu($this->execution->getPairs($this->session->project, 'all', 'nodeleted'), $executionID);
$execution = $this->execution->getByID($executionID);
$this->view->position[] = html::a($this->createLink('execution', 'story', "executionID=$execution->id"), $execution->name);
$this->view->title = $execution->name . $this->lang->colon . $this->lang->story->batchClose;
@@ -1207,7 +1207,7 @@ class story extends control
$response['result'] = 'success';
$response['message'] = $this->lang->story->successToTask;
- $this->story->batchToTask($executionID, $this->session->PRJ);
+ $this->story->batchToTask($executionID, $this->session->project);
if(dao::isError())
{
@@ -1388,7 +1388,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->PRJ);
+ if($this->app->rawModule == 'projectstory') $projectProducts = $this->product->getProducts($this->session->project);
$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 f349314805..1948f5347b 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->PRJ) $this->linkStory($this->session->PRJ, $this->post->product, $storyID);
+ if($executionID != $this->session->project) $this->linkStory($this->session->project, $this->post->product, $storyID);
}
if(is_array($this->post->URS))
@@ -3481,7 +3481,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->PRJ}&storyID=$story->id", '', 'list', 'unlink', 'hiddenwin');
+ if($this->app->rawModule == 'projectstory') common::printIcon('projectstory', 'unlinkStory', "projectID={$this->session->project}&storyID=$story->id", '', 'list', 'unlink', 'hiddenwin');
}
else
{
diff --git a/module/story/view/view.html.php b/module/story/view/view.html.php
index 766abc2f33..ed8f285c1b 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->PRJ}";
+ $otherParam = "storyID=&projectID={$this->session->project}";
$openGroup = 'project';
}
?>
diff --git a/module/task/control.php b/module/task/control.php
index 036b0c69b7..ba6002bb72 100644
--- a/module/task/control.php
+++ b/module/task/control.php
@@ -253,7 +253,7 @@ class task extends control
if($this->config->systemMode == 'new')
{
- $project = $this->project->getByID($this->session->PRJ);
+ $project = $this->project->getByID($this->session->project);
if($project->model == 'waterfall') $this->config->task->create->requiredFields .= ',estStarted,deadline';
}
@@ -644,7 +644,7 @@ class task extends control
{
$task = $this->task->getById($taskID, true);
if(!$task) die(js::error($this->lang->notFound) . js::locate('back'));
- $this->session->PRJ = $task->project;
+ $this->session->project = $task->project;
if($task->fromBug != 0)
{
diff --git a/module/testcase/control.php b/module/testcase/control.php
index ea5d8b20c8..f111ea4708 100644
--- a/module/testcase/control.php
+++ b/module/testcase/control.php
@@ -376,7 +376,7 @@ class testcase extends control
$stories = $this->story->getProductStoryPairs($productID, $branch, $modules, array_keys($storyStatus), 'id_desc', 50, 'null', 'story', false);
if($this->app->openApp != 'qa')
{
- $projectID = $this->app->openApp == 'project' ? $this->session->PRJ : $this->session->execution;
+ $projectID = $this->app->openApp == 'project' ? $this->session->project : $this->session->execution;
$stories = $this->story->getExecutionStoryPairs($projectID, $productID, $branch);
}
if($storyID and !isset($stories[$storyID])) $stories = $this->story->formatStories(array($storyID => $story)) + $stories;//Fix bug #2406.
diff --git a/module/testcase/model.php b/module/testcase/model.php
index 98fe6a9405..b8f4f1ce1b 100644
--- a/module/testcase/model.php
+++ b/module/testcase/model.php
@@ -47,7 +47,7 @@ class testcaseModel extends model
->add('fromBug', $bugID)
->setDefault('openedBy', $this->app->user->account)
->setDefault('openedDate', $now)
- ->setIF($this->config->systemMode == 'new' && $this->app->openApp == 'project', 'project', $this->session->PRJ)
+ ->setIF($this->config->systemMode == 'new' && $this->app->openApp == 'project', 'project', $this->session->project)
->setIF($this->post->story != false, 'storyVersion', $this->loadModel('story')->getVersion((int)$this->post->story))
->remove('steps,expects,files,labels,stepType,forceNotReview')
->setDefault('story', 0)
@@ -143,7 +143,7 @@ class testcaseModel extends model
$data[$i] = new stdclass();
$data[$i]->product = $productID;
- if($this->config->systemMode == 'new' && $this->lang->navGroup->testcase == 'project') $data[$i]->project = $this->session->PRJ;
+ if($this->config->systemMode == 'new' && $this->lang->navGroup->testcase == 'project') $data[$i]->project = $this->session->project;
$data[$i]->branch = $cases->branch[$i];
$data[$i]->module = $cases->module[$i];
$data[$i]->type = $cases->type[$i];
@@ -222,7 +222,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->PRJ)->fi()
+ ->beginIF($this->lang->navGroup->testcase != 'qa')->andWhere('t1.project')->eq($this->session->project)->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()
@@ -252,7 +252,7 @@ class testcaseModel extends model
->leftJoin(TABLE_PROJECTSTORY)->alias('t3')->on('t3.story=t2.story')
->leftJoin(TABLE_STORY)->alias('t4')->on('t3.story=t4.id')
->where('t2.product')->eq((int)$productID)
- ->beginIF($this->app->openApp == 'project')->andWhere('t1.project')->eq($this->session->PRJ)->fi()
+ ->beginIF($this->app->openApp == 'project')->andWhere('t1.project')->eq($this->session->project)->fi()
->beginIF($branch)->andWhere('t2.branch')->eq($branch)->fi()
->beginIF($moduleIdList)->andWhere('t2.module')->in($moduleIdList)->fi()
->beginIF($browseType == 'wait')->andWhere('t2.status')->eq($browseType)->fi()
@@ -327,7 +327,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->PRJ)->fi()
+ ->beginIF($this->lang->navGroup->testcase != 'qa')->andWhere('t1.project')->eq($this->session->project)->fi()
->andWhere('t3.suite')->eq((int)$suiteID)
->beginIF($branch)->andWhere('t1.branch')->eq($branch)->fi()
->beginIF($moduleIdList)->andWhere('t1.module')->in($moduleIdList)->fi()
@@ -428,7 +428,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->PRJ)->fi()
+ ->beginIF($this->lang->navGroup->testcase != 'qa')->andWhere('t1.project')->eq($this->session->project)->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()
@@ -1196,7 +1196,7 @@ class testcaseModel extends model
}
else
{
- if($this->config->systemMode == 'new' && $this->lang->navGroup->testcase != 'qa') $caseData->project = $this->session->PRJ;
+ if($this->config->systemMode == 'new' && $this->lang->navGroup->testcase != 'qa') $caseData->project = $this->session->project;
$caseData->version = 1;
$caseData->openedBy = $this->app->user->account;
$caseData->openedDate = $now;
@@ -1314,7 +1314,7 @@ class testcaseModel extends model
/* If under the project module, the cases is imported need linking to the project. */
if($this->lang->navGroup->testcase != 'qa')
{
- $lastOrder = (int)$this->dao->select('*')->from(TABLE_PROJECTCASE)->where('project')->eq($this->session->PRJ)->orderBy('order_desc')->limit(1)->fetch('order');
+ $lastOrder = (int)$this->dao->select('*')->from(TABLE_PROJECTCASE)->where('project')->eq($this->session->project)->orderBy('order_desc')->limit(1)->fetch('order');
$this->dao->insert(TABLE_PROJECTCASE)
->set('project')->eq($case->project)
@@ -1655,7 +1655,7 @@ class testcaseModel extends model
}
elseif($this->app->openApp == 'project' and empty($case->story))
{
- $projects = array($this->session->PRJ);
+ $projects = array($this->session->project);
}
elseif($this->app->openApp == 'execution' and empty($case->story))
{
diff --git a/module/testreport/control.php b/module/testreport/control.php
index 9d062b5833..aa78512433 100644
--- a/module/testreport/control.php
+++ b/module/testreport/control.php
@@ -426,7 +426,7 @@ class testreport extends control
{
$report = $this->testreport->getById($reportID);
if(!$report) die(js::error($this->lang->notFound) . js::locate('back'));
- $this->session->PRJ = $report->project;
+ $this->session->project = $report->project;
$execution = $this->execution->getById($report->execution);
if($from == 'product' and is_numeric($report->product))
@@ -539,7 +539,7 @@ class testreport extends control
{
if($objectType == 'product')
{
- $projectID = $this->lang->navGroup->testreport == 'qa' ? 0 : $this->session->PRJ;
+ $projectID = $this->lang->navGroup->testreport == 'qa' ? 0 : $this->session->project;
$this->products = $this->product->getProductPairsByProject($projectID);
if(empty($this->products)) die($this->locate($this->createLink('product', 'showErrorNone', 'fromModule=testreport&moduleGroup=' . $this->lang->navGroup->bug . '&activeMenu=report')));
$productID = $this->product->saveState($objectID, $this->products);
@@ -548,7 +548,7 @@ class testreport extends control
}
elseif($objectType == 'execution')
{
- $this->executions = $this->execution->getPairs($this->session->PRJ, 'all', 'nocode');
+ $this->executions = $this->execution->getPairs($this->session->project, '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 ebb194fb2d..120a1b313f 100644
--- a/module/testreport/model.php
+++ b/module/testreport/model.php
@@ -54,7 +54,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->PRJ)
+ ->setIF($this->config->systemMode == 'new' and $this->lang->navGroup->testreport != 'qa', 'project', $this->session->project)
->add('createdBy', $this->app->user->account)
->add('createdDate', helper::now())
->join('stories', ',')
@@ -146,7 +146,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->PRJ)->fi()
+ ->beginIF($this->lang->navGroup->testreport != 'qa')->andWhere('project')->eq($this->session->project)->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 706d01b5cd..9e889b875d 100644
--- a/module/testsuite/control.php
+++ b/module/testsuite/control.php
@@ -68,7 +68,7 @@ class testsuite extends control
$this->session->set('testsuiteList', $this->app->getURI(true));
/* Set menu. */
- $projectID = $this->lang->navGroup->testreport == 'qa' ? 0 : $this->session->PRJ;
+ $projectID = $this->lang->navGroup->testreport == 'qa' ? 0 : $this->session->project;
$this->view->products = $this->products = $this->loadModel('product')->getProductPairsByProject($projectID);
if(empty($this->products)) die($this->locate($this->createLink('product', 'showErrorNone', 'fromModule=testsuite&moduleGroup=' . $this->lang->navGroup->bug . '&activeMenu=testsuite')));
$productID = $this->product->saveState($productID, $this->products);
@@ -135,7 +135,7 @@ class testsuite extends control
}
/* Set menu. */
- $this->view->products = $this->products = $this->loadModel('product')->getProductPairsByProject($this->session->PRJ);
+ $this->view->products = $this->products = $this->loadModel('product')->getProductPairsByProject($this->session->project);
$productID = $this->product->saveState($productID, $this->products);
$this->loadModel('qa')->setMenu($this->products, $productID);
@@ -168,7 +168,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->PRJ);
+ $this->view->products = $this->products = $this->loadModel('product')->getProductPairsByProject($this->session->project);
$this->testsuite->setMenu($this->products, $productID);
/* Save session. */
@@ -238,7 +238,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->PRJ);
+ $this->view->products = $this->products = $this->loadModel('product')->getProductPairsByProject($this->session->project);
$productID = $this->product->saveState($suite->product, $this->products);
/* Set menu. */
@@ -318,7 +318,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->PRJ);
+ $this->view->products = $this->products = $this->loadModel('product')->getProductPairsByProject($this->session->project);
$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 694e8271a8..187cf5724c 100644
--- a/module/testsuite/model.php
+++ b/module/testsuite/model.php
@@ -61,7 +61,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->PRJ)
+ ->setIF($this->config->systemMode == 'new' and $this->lang->navGroup->testsuite != 'qa', 'project', $this->session->project)
->add('product', (int)$productID)
->add('addedBy', $this->app->user->account)
->add('addedDate', helper::now())
@@ -93,7 +93,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->PRJ)->fi()
+ ->beginIF($this->config->systemMode == 'new' and $this->lang->navGroup->testsuite != 'qa')->andWhere('project')->eq($this->session->project)->fi()
->andWhere('deleted')->eq(0)
->andWhere("(`type` = 'public' OR (`type` = 'private' and addedBy = '{$this->app->user->account}'))")
->orderBy($orderBy)
@@ -202,7 +202,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->PRJ)->fi()
+ ->beginIF($this->config->systemMode == 'new' and $this->lang->navGroup->testsuite != 'qa')->andWhere('t1.project')->eq($this->session->project)->fi()
->andWhere('t1.product')->eq($suite->product)
->andWhere('t1.product')->eq($suite->product)
->andWhere('t1.deleted')->eq(0)
@@ -246,7 +246,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->PRJ)->fi()
+ ->beginIF($this->config->systemMode == 'new' and $this->lang->navGroup->testsuite != 'qa')->andWhere('project')->eq($this->session->project)->fi()
->andWhere('deleted')->eq(0)
->orderBy('id desc')
->page($pager)
diff --git a/module/testtask/control.php b/module/testtask/control.php
index cc80de34a7..cbe72533d9 100644
--- a/module/testtask/control.php
+++ b/module/testtask/control.php
@@ -235,8 +235,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->PRJ != $task->project) $this->view->products = $this->products = $this->product->getProductPairsByProject($task->project);
- $this->session->PRJ = $task->project;
+ if($this->session->project != $task->project) $this->view->products = $this->products = $this->product->getProductPairsByProject($task->project);
+ $this->session->project = $task->project;
$productID = $task->product;
$buildID = $task->build;
@@ -633,7 +633,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->PRJ;
+ $projectID = $this->lang->navGroup->testtask == 'qa' ? 0 : $this->session->project;
$executions = empty($productID) ? array() : $this->product->getExecutionPairsByProduct($productID, 0, 'id_desc', $projectID);
$builds = empty($productID) ? array() : $this->loadModel('build')->getProductBuildPairs($productID, 0, 'notrunk', true);
@@ -1212,7 +1212,7 @@ class testtask extends control
$this->app->loadLang('job');
$productID = $productID ? $productID : key($this->products);
- $projectID = $this->lang->navGroup->testtask == 'qa' ? 0 : $this->session->PRJ;
+ $projectID = $this->lang->navGroup->testtask == 'qa' ? 0 : $this->session->project;
$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 6540a6e289..386d346ee7 100644
--- a/module/testtask/model.php
+++ b/module/testtask/model.php
@@ -24,7 +24,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->PRJ)
+ ->setIF($this->config->systemMode == 'new' and $this->lang->navGroup->testtask != 'qa', 'project', $this->session->project)
->stripTags($this->config->testtask->editor->create['id'], $this->config->allowedTags)
->join('mailto', ',')
->remove('uid,contactListMenu')
@@ -72,7 +72,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->PRJ)->fi()
+ ->beginIF($this->config->systemMode == 'new' and $this->lang->navGroup->testtask != 'qa')->andWhere('t1.project')->eq($this->session->project)->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()
@@ -108,7 +108,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->PRJ)->fi()
+ ->beginIF($this->config->systemMode == 'new' and $this->lang->navGroup->testtask != 'qa')->andWhere('t1.project')->eq($this->session->project)->fi()
->andWhere('t1.auto')->eq('unit')
->beginIF($browseType != 'all' and $browseType != 'newest' and $beginAndEnd)
->andWhere('t1.end')->ge($beginAndEnd['begin'])
@@ -374,7 +374,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->PRJ)->fi()
+ ->beginIF($this->config->systemMode == 'new' and $this->lang->navGroup->testtask != 'qa')->andWhere('project')->eq($this->session->project)->fi()
->andWhere('product')->eq($productID)
->andWhere('status')->ne('wait')
->beginIF($linkedCases)->andWhere('id')->notIN($linkedCases)->fi()
@@ -407,7 +407,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->PRJ)->fi()
+ ->beginIF($this->config->systemMode == 'new' and $this->lang->navGroup->testtask != 'qa')->andWhere('project')->eq($this->session->project)->fi()
->andWhere('product')->eq($productID)
->andWhere('status')->ne('wait')
->beginIF($linkedCases)->andWhere('id')->notIN($linkedCases)->fi()
@@ -440,7 +440,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->PRJ)->fi()
+ ->beginIF($this->config->systemMode == 'new' and $this->lang->navGroup->testtask != 'qa')->andWhere('t1.project')->eq($this->session->project)->fi()
->andWhere('t2.suite')->eq((int)$suite)
->andWhere('t1.product')->eq($productID)
->andWhere('status')->ne('wait')
@@ -475,7 +475,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->PRJ)->fi()
+ ->beginIF($this->config->systemMode == 'new' and $this->lang->navGroup->testtask != 'qa')->andWhere('t1.project')->eq($this->session->project)->fi()
->andWhere('t1.status')->ne('wait')
->page($pager)
->fetchAll();
@@ -861,7 +861,7 @@ class testtaskModel extends model
if($this->app->openApp != 'qa')
{
$lastOrder = (int)$this->dao->select('*')->from(TABLE_PROJECTCASE)->where('project')->eq($projectID)->orderBy('order_desc')->limit(1)->fetch('order');
- $project = $this->app->openApp == 'project' ? $this->session->PRJ : $this->session->execution;
+ $project = $this->app->openApp == 'project' ? $this->session->project : $this->session->execution;
$data = new stdclass();
$data->project = $project;
diff --git a/module/testtask/view/create.html.php b/module/testtask/view/create.html.php
index 3d6608cf3f..81f5ebe4e5 100644
--- a/module/testtask/view/create.html.php
+++ b/module/testtask/view/create.html.php
@@ -14,7 +14,7 @@
-session->PRJ);?>
+session->project);?>
diff --git a/module/todo/control.php b/module/todo/control.php
index 6cbee1dcb0..af81c577d8 100644
--- a/module/todo/control.php
+++ b/module/todo/control.php
@@ -398,7 +398,7 @@ class todo extends control
}
$projects = $this->loadModel('project')->getPairsByModel('all');
- if(!isset($this->session->PRJ)) $this->session->set('project', key($projects));
+ if(!isset($this->session->project)) $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;
@@ -409,9 +409,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->PRJ);
+ $this->view->executions = $this->loadModel('execution')->getPairs($this->session->project);
$this->view->products = $this->loadModel('product')->getPairs();
- $this->view->projectProducts = $this->loadModel('product')->getProductPairsByProject($this->session->PRJ);
+ $this->view->projectProducts = $this->loadModel('product')->getProductPairsByProject($this->session->project);
$this->display();
}
diff --git a/module/tree/control.php b/module/tree/control.php
index 293ebd4627..88053436c4 100644
--- a/module/tree/control.php
+++ b/module/tree/control.php
@@ -106,7 +106,7 @@ class tree extends control
if($from == 'project')
{
$this->lang->navGroup->tree = 'project';
- $productPairs = $this->product->getProductPairsByProject($this->session->PRJ);
+ $productPairs = $this->product->getProductPairsByProject($this->session->project);
}
elseif($from == 'qa')
{
@@ -147,7 +147,7 @@ class tree extends control
if($from == 'project')
{
$this->lang->navGroup->tree = 'project';
- $productPairs = $this->product->getProductPairsByProject($this->session->PRJ);
+ $productPairs = $this->product->getProductPairsByProject($this->session->project);
}
elseif($from == 'qa')
{
@@ -212,7 +212,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->PRJ && strpos($this->session->docList, 'project') === false) $this->session->set('docList', $this->session->docList . '?project=' . $this->session->PRJ);
+ 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($from == 'doc') $this->lang->navGroup->doc = 'doc';
@@ -227,7 +227,7 @@ class tree extends control
}
elseif($viewType == 'line')
{
- $products = $this->product->getPairs('', $this->session->PRJ);
+ $products = $this->product->getPairs('', $this->session->project);
$this->product->setMenu($products, $rootID, $branch, 'line', '', 'line');
$this->lang->tree->menu = $this->lang->product->menu;
@@ -303,7 +303,7 @@ class tree extends control
$products = $this->execution->getProducts($rootID);
$this->view->products = $products;
- $executions = $this->execution->getPairs($this->session->PRJ);
+ $executions = $this->execution->getPairs($this->session->project);
/* Set menu. */
$this->execution->setMenu($rootID);