diff --git a/api/v1/entries/user.php b/api/v1/entries/user.php index 123cb9f880..b3d9f377e8 100644 --- a/api/v1/entries/user.php +++ b/api/v1/entries/user.php @@ -298,7 +298,7 @@ class userEntry extends entry $info->issue = array('total' => 0, 'issues' => array()); if(!common::hasPriv('my', 'work')) break; - if($this->config->edition == 'max') + if($this->config->edition== 'max' or $this->config->edition == 'ipd') { global $app; $app->rawMethod = 'work'; @@ -318,7 +318,7 @@ class userEntry extends entry $info->risk = array('total' => 0, 'risks' => array()); if(!common::hasPriv('my', 'work')) break; - if($this->config->edition == 'max') + if($this->config->edition== 'max' or $this->config->edition == 'ipd') { global $app; $app->rawMethod = 'work'; @@ -338,7 +338,7 @@ class userEntry extends entry $info->meeting = array('total' => 0, 'meetings' => array()); if(!common::hasPriv('my', 'work')) break; - if($this->config->edition == 'max') + if($this->config->edition== 'max' or $this->config->edition == 'ipd') { global $app; $app->rawMethod = 'work'; diff --git a/config/config.php b/config/config.php index 8060f0d5c0..87dddb33b5 100644 --- a/config/config.php +++ b/config/config.php @@ -192,9 +192,11 @@ if($config->edition != 'open') { $config->version = $config->edition . $config->{$config->edition . 'Version'}; if($config->edition != 'max') unset($config->maxVersion); + if($config->edition != 'ipd') unset($config->ipdVersion); } else { unset($config->bizVersion); unset($config->maxVersion); + unset($config->ipdVersion); } diff --git a/module/block/control.php b/module/block/control.php index e1e85bb2f1..7583687a99 100755 --- a/module/block/control.php +++ b/module/block/control.php @@ -83,7 +83,7 @@ class block extends control { $this->get->set('dashboard', 'project'); - if($this->config->edition == 'max' and $this->app->tab == 'project') + if(($this->config->edition == 'max' or $this->config->edition == 'ipd') and $this->app->tab == 'project') { $project = $this->loadModel('project')->getByID($this->session->project); if(isset($project->model) and !helper::hasFeature("{$project->model}_issue")) @@ -957,7 +957,7 @@ class block extends control $count = isset($this->params->count) ? (int)$this->params->count : 15; /* Get projects. */ - $excludedModel = $this->config->edition == 'max' ? '' : 'waterfall'; + $excludedModel = ($this->config->edition == 'max' or $this->config->edition == 'ipd') ? '' : 'waterfall'; $projects = $this->project->getOverviewList('byStatus', $status, 'order_asc', $count, $excludedModel); if(empty($projects)) { @@ -1829,23 +1829,23 @@ class block extends control $hasMeeting = helper::hasFeature('meeting'); $hasViewPriv = array(); - if(common::hasPriv('todo', 'view')) $hasViewPriv['todo'] = true; - if(common::hasPriv('task', 'view')) $hasViewPriv['task'] = true; - if(common::hasPriv('bug', 'view') and $this->config->vision != 'lite') $hasViewPriv['bug'] = true; - if(common::hasPriv('story', 'view') and $this->config->vision != 'lite') $hasViewPriv['story'] = true; - if($this->config->URAndSR and common::hasPriv('story', 'view') and $this->config->vision != 'lite') $hasViewPriv['requirement'] = true; - if(common::hasPriv('risk', 'view') and $this->config->edition == 'max' and $this->config->vision != 'lite' && $hasRisk) $hasViewPriv['risk'] = true; - if(common::hasPriv('issue', 'view') and $this->config->edition == 'max' and $this->config->vision != 'lite' && $hasIssue) $hasViewPriv['issue'] = true; - if(common::hasPriv('meeting', 'view') and $this->config->edition == 'max' and $this->config->vision != 'lite' && $hasMeeting) $hasViewPriv['meeting'] = true; - if(common::hasPriv('feedback', 'view') and in_array($this->config->edition, array('max', 'biz'))) $hasViewPriv['feedback'] = true; - if(common::hasPriv('ticket', 'view') and in_array($this->config->edition, array('max', 'biz'))) $hasViewPriv['ticket'] = true; + if(common::hasPriv('todo', 'view')) $hasViewPriv['todo'] = true; + if(common::hasPriv('task', 'view')) $hasViewPriv['task'] = true; + if(common::hasPriv('bug', 'view') and $this->config->vision != 'lite') $hasViewPriv['bug'] = true; + if(common::hasPriv('story', 'view') and $this->config->vision != 'lite') $hasViewPriv['story'] = true; + if($this->config->URAndSR and common::hasPriv('story', 'view') and $this->config->vision != 'lite') $hasViewPriv['requirement'] = true; + if(common::hasPriv('risk', 'view') and ($this->config->edition == 'max' or $this->config->edition == 'ipd') and $this->config->vision != 'lite' && $hasRisk) $hasViewPriv['risk'] = true; + if(common::hasPriv('issue', 'view') and ($this->config->edition == 'max' or $this->config->edition == 'ipd') and $this->config->vision != 'lite' && $hasIssue) $hasViewPriv['issue'] = true; + if(common::hasPriv('meeting', 'view') and ($this->config->edition == 'max' or $this->config->edition == 'ipd') and $this->config->vision != 'lite' && $hasMeeting) $hasViewPriv['meeting'] = true; + if(common::hasPriv('feedback', 'view') and $this->config->edition != 'open') $hasViewPriv['feedback'] = true; + if(common::hasPriv('ticket', 'view') and $this->config->edition != 'open') $hasViewPriv['ticket'] = true; $params = $this->get->param; $params = json_decode(base64_decode($params)); $count = array(); $objectList = array('todo' => 'todos', 'task' => 'tasks', 'bug' => 'bugs', 'story' => 'stories', 'requirement' => 'requirements'); $objectCountList = array('todo' => 'todoCount', 'task' => 'taskCount', 'bug' => 'bugCount', 'story' => 'storyCount', 'requirement' => 'requirementCount'); - if($this->config->edition == 'max') + if($this->config->edition == 'max' or $this->config->edition == 'ipd') { if($hasRisk) { @@ -1987,7 +1987,7 @@ class block extends control $hasViewPriv['review'] = true; $count['review'] = count($reviews); $this->view->reviews = $reviews; - if($this->config->edition == 'max') + if($this->config->edition == 'max' or $this->config->edition == 'ipd') { $this->app->loadLang('approval'); $this->view->flows = $this->dao->select('module,name')->from(TABLE_WORKFLOW)->where('buildin')->eq(0)->fetchPairs('module', 'name'); diff --git a/module/block/model.php b/module/block/model.php index c47b36fe3d..239f4aa498 100644 --- a/module/block/model.php +++ b/module/block/model.php @@ -844,7 +844,7 @@ class blockModel extends model $params->bugCount['default'] = 20; $params->bugCount['control'] = 'input'; - if($this->config->edition == 'max') + if($this->config->edition == 'max' or $this->config->edition == 'ipd') { if(helper::hasFeature('risk')) { diff --git a/module/block/view/contribute.html.php b/module/block/view/contribute.html.php index 58afbe9e9d..43c923d63e 100644 --- a/module/block/view/contribute.html.php +++ b/module/block/view/contribute.html.php @@ -32,7 +32,7 @@
block->createdCases;?>
createLink('my', 'contribute', 'mode=testcase&type=openedbyme'), (int)$data['createdCases']);?>
- config->edition == 'max'):?> + config->edition == 'max' or $this->config->edition == 'ipd'):?>
block->createdRisks;?>
diff --git a/module/bug/control.php b/module/bug/control.php index 19af541ec4..9ac50e377f 100755 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -389,7 +389,7 @@ class bug extends control $this->dao->update(TABLE_TODO)->set('status')->eq('done')->where('id')->eq($output['todoID'])->exec(); $this->action->create('todo', $output['todoID'], 'finished', '', "BUG:$bugID"); - if($this->config->edition == 'biz' || $this->config->edition == 'max') + if($this->config->edition != 'open') { $todo = $this->dao->select('type, idvalue')->from(TABLE_TODO)->where('id')->eq($output['todoID'])->fetch(); if($todo->type == 'feedback' && $todo->idvalue) $this->loadModel('feedback')->updateStatus('todo', $todo->idvalue, 'done'); diff --git a/module/bug/model.php b/module/bug/model.php index 51cfe23452..f8088bf5ca 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -799,7 +799,7 @@ class bugModel extends model if($bug->execution and $bug->status != $oldBug->status) $this->loadModel('kanban')->updateLane($bug->execution, 'bug'); - if(($this->config->edition == 'biz' || $this->config->edition == 'max') && $oldBug->feedback) $this->loadModel('feedback')->updateStatus('bug', $oldBug->feedback, $bug->status, $oldBug->status); + if($this->config->edition != 'open' && $oldBug->feedback) $this->loadModel('feedback')->updateStatus('bug', $oldBug->feedback, $bug->status, $oldBug->status); $this->file->processFile4Object('bug', $oldBug, $bug); return common::createChanges($oldBug, $bug); @@ -911,9 +911,6 @@ class bugModel extends model unset($bug); } - $isBiz = $this->config->edition == 'biz'; - $isMax = $this->config->edition == 'max'; - /* Update bugs. */ foreach($bugs as $bugID => $bug) { @@ -936,7 +933,7 @@ class bugModel extends model $allChanges[$bugID] = common::createChanges($oldBug, $bug); - if(($isBiz || $isMax) && $oldBug->feedback && !isset($feedbacks[$oldBug->feedback])) + if($this->config->edition != 'open' && $oldBug->feedback && !isset($feedbacks[$oldBug->feedback])) { $feedbacks[$oldBug->feedback] = $oldBug->feedback; $this->loadModel('feedback')->updateStatus('bug', $oldBug->feedback, $bug->status, $oldBug->status); @@ -1241,7 +1238,7 @@ class bugModel extends model /* Link bug to build and release. */ $this->linkBugToBuild($bugID, $bug->resolvedBuild); - if(($this->config->edition == 'biz' || $this->config->edition == 'max') && $oldBug->feedback) $this->loadModel('feedback')->updateStatus('bug', $oldBug->feedback, $bug->status, $oldBug->status); + if($this->config->edition != 'open' && $oldBug->feedback) $this->loadModel('feedback')->updateStatus('bug', $oldBug->feedback, $bug->status, $oldBug->status); return common::createChanges($oldBug, $bug); } @@ -1367,9 +1364,6 @@ class bugModel extends model $modules = array(); while($module = $stmt->fetch()) $modules[$module->id] = $module; - $isBiz = $this->config->edition == 'biz'; - $isMax = $this->config->edition == 'max'; - $changes = array(); foreach($bugIDList as $i => $bugID) { @@ -1416,7 +1410,7 @@ class bugModel extends model if($oldBug->execution) $this->loadModel('kanban')->updateLane($oldBug->execution, 'bug'); $changes[$bugID] = common::createChanges($oldBug, $bug); - if(($isBiz || $isMax) && $oldBug->feedback && !isset($feedbacks[$oldBug->feedback])) + if($this->config->edition != 'open' && $oldBug->feedback && !isset($feedbacks[$oldBug->feedback])) { $feedbacks[$oldBug->feedback] = $oldBug->feedback; $this->loadModel('feedback')->updateStatus('bug', $oldBug->feedback, $bug->status, $oldBug->status); @@ -1531,7 +1525,7 @@ class bugModel extends model if(isset($output['toColID'])) $this->kanban->moveCard($bugID, $output['fromColID'], $output['toColID'], $output['fromLaneID'], $output['toLaneID']); } - if(($this->config->edition == 'biz' || $this->config->edition == 'max') && $oldBug->feedback) $this->loadModel('feedback')->updateStatus('bug', $oldBug->feedback, $bug->status, $oldBug->status); + if($this->config->edition != 'open' && $oldBug->feedback) $this->loadModel('feedback')->updateStatus('bug', $oldBug->feedback, $bug->status, $oldBug->status); return common::createChanges($oldBug, $bug); } diff --git a/module/bug/view/batchactivate.html.php b/module/bug/view/batchactivate.html.php index ad34430918..a379f02438 100644 --- a/module/bug/view/batchactivate.html.php +++ b/module/bug/view/batchactivate.html.php @@ -13,7 +13,7 @@ config->edition == 'biz' || $this->config->edition == 'max') +if($this->config->edition != 'open') { $action = $this->loadModel('workflowaction')->getByModuleAndAction('bug', 'batchactivate'); if($action->js) echo ""; diff --git a/module/chart/view/preview.html.php b/module/chart/view/preview.html.php index 1d68f0867f..244aeb333c 100644 --- a/module/chart/view/preview.html.php +++ b/module/chart/view/preview.html.php @@ -34,7 +34,7 @@ } ?>
- config->edition == 'biz' or $this->config->edition == 'max'):?> + config->edition != 'open'):?>
" . $lang->export, '', "class='btn btn-link btn-export' id='exportchart'");?> chart->toDesign, '', "class='btn btn-primary '");?> diff --git a/module/common/model.php b/module/common/model.php index 47449607fe..d23207c198 100644 --- a/module/common/model.php +++ b/module/common/model.php @@ -295,7 +295,7 @@ class commonModel extends model public function setApproval() { $this->config->openedApproval = false; - if($this->config->edition == 'max' && $this->config->vision == 'rnd') $this->config->openedApproval = true; + if(($this->config->edition == 'max' or $this->config->edition == 'ipd') && $this->config->vision == 'rnd') $this->config->openedApproval = true; } /** diff --git a/module/custom/model.php b/module/custom/model.php index 692f6933a4..cdfbdd7136 100644 --- a/module/custom/model.php +++ b/module/custom/model.php @@ -889,7 +889,7 @@ class customModel extends model $enabledScrumFeatures = array(); $disabledScrumFeatures = array(); - if($this->config->edition == 'max') + if($this->config->edition== 'max' or $this->config->edition == 'ipd') { foreach($this->config->custom->scrumFeatures as $scrumFeature) { @@ -1048,7 +1048,7 @@ class customModel extends model */ public function hasAssetlibData() { - if($this->config->edition == 'max') return $this->dao->select('*')->from(TABLE_ASSETLIB)->where('deleted')->eq(0)->count(); + if($this->config->edition== 'max' or $this->config->edition == 'ipd') return $this->dao->select('*')->from(TABLE_ASSETLIB)->where('deleted')->eq(0)->count(); return false; } @@ -1060,7 +1060,7 @@ class customModel extends model */ public function hasScrumIssueData() { - if($this->config->edition == 'max') + if($this->config->edition== 'max' or $this->config->edition == 'ipd') { return $this->dao->select('t1.*')->from(TABLE_ISSUE)->alias('t1') ->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id') @@ -1080,7 +1080,7 @@ class customModel extends model */ public function hasScrumRiskData() { - if($this->config->edition == 'max') + if($this->config->edition== 'max' or $this->config->edition == 'ipd') { return $this->dao->select('t1.*')->from(TABLE_RISK)->alias('t1') ->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id') @@ -1100,7 +1100,7 @@ class customModel extends model */ public function hasScrumOpportunityData() { - if($this->config->edition == 'max') + if($this->config->edition== 'max' or $this->config->edition == 'ipd') { return $this->dao->select('id')->from(TABLE_OPPORTUNITY)->where('execution')->ne('0')->andWhere('deleted')->eq('0')->count(); } @@ -1115,7 +1115,7 @@ class customModel extends model */ public function hasScrumMeetingData() { - if($this->config->edition == 'max') + if($this->config->edition== 'max' or $this->config->edition == 'ipd') { return $this->dao->select('id')->from(TABLE_PROJECT)->alias('t1') ->leftJoin(TABLE_MEETING)->alias('t2')->on('t1.id = t2.project') @@ -1135,7 +1135,7 @@ class customModel extends model */ public function hasScrumAuditplanData() { - if($this->config->edition == 'max') + if($this->config->edition== 'max' or $this->config->edition == 'ipd') { return $this->dao->select('id')->from(TABLE_PROJECT)->alias('t1') ->leftJoin(TABLE_AUDITPLAN)->alias('t2')->on('t1.id = t2.project') @@ -1155,7 +1155,7 @@ class customModel extends model */ public function hasScrumProcessData() { - if($this->config->edition == 'max') + if($this->config->edition== 'max' or $this->config->edition == 'ipd') { return $this->dao->select('id')->from(TABLE_PROGRAMACTIVITY)->where('execution')->ne('0')->andWhere('deleted')->eq('0')->count(); } diff --git a/module/doc/model.php b/module/doc/model.php index 4818a04613..11241fe2a9 100644 --- a/module/doc/model.php +++ b/module/doc/model.php @@ -1912,7 +1912,7 @@ class docModel extends model } elseif($type == 'project') { - if($this->config->edition == 'max') + if($this->config->edition== 'max' or $this->config->edition == 'ipd') { $issueIdList = $this->dao->select('id')->from(TABLE_ISSUE)->where('project')->eq($objectID)->andWhere('deleted')->eq('0')->andWhere('project')->in($this->app->user->view->projects)->get(); $meetingIdList = $this->dao->select('id')->from(TABLE_MEETING)->where('project')->eq($objectID)->andWhere('deleted')->eq('0')->andWhere('project')->in($this->app->user->view->projects)->get(); diff --git a/module/doc/view/content.html.php b/module/doc/view/content.html.php index 29f3c942db..bdc66c4f4d 100644 --- a/module/doc/view/content.html.php +++ b/module/doc/view/content.html.php @@ -216,7 +216,7 @@
-config->edition == 'max'):?> +config->edition== 'max' or $this->config->edition == 'ipd'):?>