From e0814cd74bc4028324aa3e17b631de70aa4750e9 Mon Sep 17 00:00:00 2001 From: liumengyi Date: Thu, 24 Feb 2022 16:15:08 +0800 Subject: [PATCH] * Change maxVersion bizVersion proVersion to edition. --- module/program/control.php | 2 +- module/program/view/browsebylist.html.php | 2 +- module/programplan/model.php | 6 +++--- module/programplan/view/create.html.php | 10 +++++----- module/project/config.php | 2 +- module/project/control.php | 4 ++-- module/project/model.php | 4 ++-- module/report/control.php | 2 +- module/report/view/blockreportlist.html.php | 2 +- module/report/view/bugassign.html.php | 2 +- module/report/view/bugcreate.html.php | 2 +- module/report/view/productsummary.html.php | 2 +- module/report/view/projectdeviation.html.php | 2 +- module/report/view/workload.html.php | 4 ++-- module/search/control.php | 2 +- module/search/model.php | 12 ++++++------ module/stakeholder/view/browse.html.php | 2 +- module/story/control.php | 2 +- module/story/model.php | 10 +++++----- module/story/view/track.html.php | 8 ++++---- module/story/view/view.html.php | 2 +- module/task/control.php | 2 +- module/task/model.php | 12 ++++++------ module/testcase/control.php | 2 +- module/testcase/model.php | 2 +- module/testtask/control.php | 2 +- module/testtask/model.php | 2 +- module/todo/control.php | 14 +++++++------- module/todo/model.php | 16 ++++++++-------- module/user/model.php | 2 +- module/user/view/execution.html.php | 2 +- module/user/view/featurebar.html.php | 2 +- module/weekly/model.php | 2 +- 33 files changed, 72 insertions(+), 72 deletions(-) diff --git a/module/program/control.php b/module/program/control.php index 5404e5a6c8..59a317c0ff 100644 --- a/module/program/control.php +++ b/module/program/control.php @@ -611,7 +611,7 @@ class program extends control } } - if(isset($this->config->bizVersion)) list($fields, $projectStats) = $this->loadModel('workflowfield')->appendDataFromFlow($fields, $projectStats); + if(isset($this->config->edition == 'biz')) list($fields, $projectStats) = $this->loadModel('workflowfield')->appendDataFromFlow($fields, $projectStats); $this->post->set('fields', $fields); $this->post->set('rows', $programs); diff --git a/module/program/view/browsebylist.html.php b/module/program/view/browsebylist.html.php index b2e464e598..94b860464d 100644 --- a/module/program/view/browsebylist.html.php +++ b/module/program/view/browsebylist.html.php @@ -53,7 +53,7 @@ type == 'program') $icon = ' icon-program'; - if($program->type == 'project') $icon = ' icon-common icon-' . (isset($this->config->maxVersion) ? $program->model : $program->type); + if($program->type == 'project') $icon = ' icon-common icon-' . ($this->config->edition == 'max' ? $program->model : $program->type); $class = $program->type == 'program' ? ' table-nest-toggle' : ''; ?> diff --git a/module/programplan/model.php b/module/programplan/model.php index 387e554187..6d3d4f1c54 100644 --- a/module/programplan/model.php +++ b/module/programplan/model.php @@ -516,7 +516,7 @@ class programplanModel extends model foreach($datas as $data) { /* Set planDuration and realDuration. */ - if(isset($this->config->maxVersion)) + if($this->config->edition == 'max') { $data->planDuration = $this->getDuration($data->begin, $data->end); $data->realDuration = $this->getDuration($data->realBegan, $data->realEnd); @@ -710,7 +710,7 @@ class programplanModel extends model } /* Set planDuration and realDuration. */ - if(isset($this->config->maxVersion)) + if($this->config->edition == 'max') { $plan->planDuration = $this->getDuration($plan->begin, $plan->end); $plan->realDuration = $this->getDuration($plan->realBegan, $plan->realEnd); @@ -779,7 +779,7 @@ class programplanModel extends model if($id == 'actions') $class .= ' c-actions'; echo ""; - if(isset($this->config->bizVersion)) $this->loadModel('flow')->printFlowCell('programplan', $plan, $id); + if($this->config->edition == 'biz') $this->loadModel('flow')->printFlowCell('programplan', $plan, $id); switch($id) { case 'id': diff --git a/module/programplan/view/create.html.php b/module/programplan/view/create.html.php index 6e76c9335c..e90d561390 100644 --- a/module/programplan/view/create.html.php +++ b/module/programplan/view/create.html.php @@ -66,7 +66,7 @@ programplan->end;?> '>programplan->realBegan;?> '>programplan->realEnd;?> - config->qcVersion)):?> + config->edition == 'max'):?> programplan->output;?> actions;?> @@ -92,7 +92,7 @@ > > - config->qcVersion)):?> + config->edition == 'max'):?> @@ -123,7 +123,7 @@ > > - config->qcVersion)):?> + config->edition == 'max'):?> output) ? 0 : explode(',', $plan->output);?> @@ -151,7 +151,7 @@ > > - config->qcVersion)):?> + config->edition == 'max'):?> @@ -193,7 +193,7 @@ > > - config->qcVersion)):?> + config->edition == 'max'):?> diff --git a/module/project/config.php b/module/project/config.php index a9d5dcbada..c073c70807 100644 --- a/module/project/config.php +++ b/module/project/config.php @@ -141,4 +141,4 @@ $config->project->excludedPriv['doc'] = array('browse', 'view', 'catalog' $config->project->excludedPriv['repo'] = array('edit', 'delete', 'maintain', 'setRules'); $config->project->excludedPriv['testreport'] = array('browse'); $config->project->excludedPriv['auditplan'] = array('delete'); -if(!isset($config->maxVersion)) $config->project->excludedPriv['stakeholder'] = array('issue', 'viewIssue', 'userIssue'); +if($this->config->edition != 'max') $config->project->excludedPriv['stakeholder'] = array('issue', 'viewIssue', 'userIssue'); diff --git a/module/project/control.php b/module/project/control.php index 2bf7da8198..1d2bc465d8 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -76,7 +76,7 @@ class project extends control } } - if(isset($this->config->bizVersion)) list($fields, $projectStats) = $this->loadModel('workflowfield')->appendDataFromFlow($fields, $projectStats); + if($this->config->edition == 'biz') list($fields, $projectStats) = $this->loadModel('workflowfield')->appendDataFromFlow($fields, $projectStats); $this->post->set('fields', $fields); $this->post->set('rows', $projects); @@ -832,7 +832,7 @@ class project extends control $this->session->set('testtaskList', $uri, 'qa'); $this->session->set('reportList', $uri, 'qa'); - if(isset($this->config->maxVersion)) + if($this->config->edition == 'max') { $this->session->set('riskList', $uri, 'project'); $this->session->set('issueList', $uri, 'project'); diff --git a/module/project/model.php b/module/project/model.php index 5be1157e6a..622bfecef5 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -1631,7 +1631,7 @@ class projectModel extends model if($id == 'surplus') $title = "title='{$project->hours->totalLeft} {$this->lang->execution->workHour}'"; echo ""; - if(isset($this->config->bizVersion)) $this->loadModel('flow')->printFlowCell('project', $project, $id); + if($this->config->edition == 'biz') $this->loadModel('flow')->printFlowCell('project', $project, $id); switch($id) { case 'id': @@ -2197,7 +2197,7 @@ class projectModel extends model public function checkCanChangeModel($projectID, $model) { $checkList = $this->config->project->checkList->$model; - if(isset($this->config->maxVersion)) $checkList = $this->config->project->maxCheckList->$model; + if($this->config->edition == 'max') $checkList = $this->config->project->maxCheckList->$model; foreach($checkList as $module) { if($module == '') continue; diff --git a/module/report/control.php b/module/report/control.php index a793b4ee35..18b4576200 100644 --- a/module/report/control.php +++ b/module/report/control.php @@ -33,7 +33,7 @@ class report extends control $this->projectID = isset($_GET['project']) ? $_GET['project'] : 0; if(!$this->projectID) $this->lang->navGroup->report = 'report'; - if((isset($this->config->proVersion) || isset($this->config->bizVersion)) && $this->lang->navGroup->report == 'report' && common::hasPriv('report', 'custom')) $this->lang->report->mainMenuAction = html::a(helper::createLink('report', 'custom'), $this->lang->crystal->custom, '', "class='btn btn-link'"); + if($this->config->edition != 'open' && $this->lang->navGroup->report == 'report' && common::hasPriv('report', 'custom')) $this->lang->report->mainMenuAction = html::a(helper::createLink('report', 'custom'), $this->lang->crystal->custom, '', "class='btn btn-link'"); } /** diff --git a/module/report/view/blockreportlist.html.php b/module/report/view/blockreportlist.html.php index 5fffb6e6d7..2554c07c84 100644 --- a/module/report/view/blockreportlist.html.php +++ b/module/report/view/blockreportlist.html.php @@ -21,7 +21,7 @@ - proVersion) and !isset($config->bizVersion) and !isset($config->maxVersion)):?> + config->edition == 'open'):?>
BIZ  isINT)) ? $lang->report->proVersionEn : $lang->report->proVersion;?> diff --git a/module/report/view/bugassign.html.php b/module/report/view/bugassign.html.php index f46c741884..b56b4a9661 100644 --- a/module/report/view/bugassign.html.php +++ b/module/report/view/bugassign.html.php @@ -1,5 +1,5 @@ -maxVersion) or isset($config->proVersion) or isset($config->bizVersion)):?> +config->edition != 'open'):?> diff --git a/module/report/view/bugcreate.html.php b/module/report/view/bugcreate.html.php index aecdbb183f..9c3b4e8589 100644 --- a/module/report/view/bugcreate.html.php +++ b/module/report/view/bugcreate.html.php @@ -1,6 +1,6 @@ -maxVersion) or isset($config->proVersion) or isset($config->bizVersion)):?> +config->edition != 'open'):?> diff --git a/module/report/view/productsummary.html.php b/module/report/view/productsummary.html.php index a0e07824e3..7130368d5e 100644 --- a/module/report/view/productsummary.html.php +++ b/module/report/view/productsummary.html.php @@ -2,7 +2,7 @@ -maxVersion) or isset($config->proVersion) or isset($config->bizVersion)):?> +config->edition != 'open'):?> diff --git a/module/report/view/projectdeviation.html.php b/module/report/view/projectdeviation.html.php index ea2a330a0e..09a741c41b 100644 --- a/module/report/view/projectdeviation.html.php +++ b/module/report/view/projectdeviation.html.php @@ -1,7 +1,7 @@ -maxVersion) or isset($config->proVersion) or isset($config->bizVersion)):?> +config->edition != 'open'):?> diff --git a/module/report/view/workload.html.php b/module/report/view/workload.html.php index 1928a1a320..df26260959 100644 --- a/module/report/view/workload.html.php +++ b/module/report/view/workload.html.php @@ -1,6 +1,6 @@ -maxVersion) or isset($config->proVersion) or isset($config->bizVersion)):?> +config->edition != 'open'):?> @@ -89,7 +89,7 @@ - $info) foreach($info['execution'] as $executionName => $executionInfo) $userCount ++;?> + $info) foreach($info['execution'] as $executionName => $executionInfo) $userCount ++;?> $info):?> diff --git a/module/search/control.php b/module/search/control.php index 75b12ab794..2e333ae320 100644 --- a/module/search/control.php +++ b/module/search/control.php @@ -20,7 +20,7 @@ class search extends control public function __construct($module = '', $method = '') { parent::__construct($module, $method); - if(!isset($this->config->maxVersion)) unset($this->lang->search->modules['effort']); + if($this->config->edition != 'max') unset($this->lang->search->modules['effort']); if($this->config->systemMode != 'new') unset($this->lang->search->modules['program'], $this->lang->search->modules['project']); } diff --git a/module/search/model.php b/module/search/model.php index eaaa6dd92c..42dc4457bb 100644 --- a/module/search/model.php +++ b/module/search/model.php @@ -24,7 +24,7 @@ class searchModel extends model public function setSearchParams($searchConfig) { $module = $searchConfig['module']; - if(isset($this->config->bizVersion)) + if($this->config->edition == 'biz') { $flowModule = $module; if($module == 'projectStory') $flowModule = 'story'; @@ -603,7 +603,7 @@ class searchModel extends model } elseif($module == 'issue') { - $issueField = isset($this->config->maxVersion)? 'id,project,owner,lib' : 'id,project,owner'; + $issueField = $this->config->edition == 'max' ? 'id,project,owner,lib' : 'id,project,owner'; $issue = $this->dao->select($issueField)->from(TABLE_ISSUE)->where('id')->eq($record->objectID)->fetch(); if(!empty($issue->lib)) { @@ -629,7 +629,7 @@ class searchModel extends model } elseif($module == 'story') { - $storyField = isset($this->config->maxVersion)? 'id,type,lib' : 'id,type'; + $storyField = $this->config->edition == 'max' ? 'id,type,lib' : 'id,type'; $story = $this->dao->select($storyField)->from(TABLE_STORY)->where('id')->eq($record->objectID)->fetch(); if(!empty($story->lib)) { @@ -643,7 +643,7 @@ class searchModel extends model $record->extraType = isset($story->type) ? $story->type : ''; } - elseif(($module == 'risk' or $module == 'opportunity') and isset($this->config->maxVersion)) + elseif(($module == 'risk' or $module == 'opportunity') and $this->config->edition == 'max') { $table = $this->config->objectTables[$module]; $object = $this->dao->select('id,lib')->from($table)->where('id')->eq($record->objectID)->fetch(); @@ -655,7 +655,7 @@ class searchModel extends model $record->url = helper::createLink($module, $method, "id={$record->objectID}", '', false, 0, true); } - elseif($module == 'doc' and isset($this->config->maxVersion)) + elseif($module == 'doc' and $this->config->edition == 'max') { $doc = $this->dao->select('id,assetLib,assetLibType')->from(TABLE_DOC)->where('id')->eq($record->objectID)->fetch(); if(!empty($doc->assetLib)) @@ -688,7 +688,7 @@ class searchModel extends model $fields = $this->config->search->fields->{$objectType}; if(empty($fields)) return true; - if($objectType == 'doc' && isset($this->config->bizVersion)) $object = $this->appendFiles($object); + if($objectType == 'doc' && $this->config->edition == 'biz') $object = $this->appendFiles($object); $index = new stdclass(); $index->objectID = $object->{$fields->id}; diff --git a/module/stakeholder/view/browse.html.php b/module/stakeholder/view/browse.html.php index 661e770a86..9647151380 100644 --- a/module/stakeholder/view/browse.html.php +++ b/module/stakeholder/view/browse.html.php @@ -78,7 +78,7 @@ id", $stakeholder, 'list', 'chat-line', '', 'iframe', 'yes'); common::printIcon('stakeholder', 'expect', "id=$stakeholder->id", $stakeholder, 'list', 'flag', '', 'iframe', 'yes'); - if(isset($config->maxVersion) and $stakeholder->projectModel == 'waterfall') common::printIcon('stakeholder', 'userIssue', "account=$stakeholder->id", $stakeholder, 'list', 'list-alt', '', 'iframe', 'yes'); + if($this->config->edition == 'max' and $stakeholder->projectModel == 'waterfall') common::printIcon('stakeholder', 'userIssue', "account=$stakeholder->id", $stakeholder, 'list', 'list-alt', '', 'iframe', 'yes'); common::printIcon('stakeholder', 'edit', "id=$stakeholder->id", $stakeholder, 'list', '', '', '', ''); $deleteClass = common::hasPriv('stakeholder', 'delete') ? 'btn' : 'btn disabled'; echo html::a($this->createLink('stakeholder', 'delete', "id=$stakeholder->id"), '', 'hiddenwin', "title='{$lang->stakeholder->delete}' class='{$deleteClass}'"); diff --git a/module/story/control.php b/module/story/control.php index ee195dc703..15c414ca19 100644 --- a/module/story/control.php +++ b/module/story/control.php @@ -2431,7 +2431,7 @@ class story extends control } if(!(in_array('platform', $productsType) or in_array('branch', $productsType))) unset($fields['branch']);// If products's type are normal, unset branch field. - if(isset($this->config->bizVersion)) list($fields, $stories) = $this->loadModel('workflowfield')->appendDataFromFlow($fields, $stories); + if($this->config->edition == 'biz') list($fields, $stories) = $this->loadModel('workflowfield')->appendDataFromFlow($fields, $stories); $this->post->set('fields', $fields); $this->post->set('rows', $stories); diff --git a/module/story/model.php b/module/story/model.php index 58c0d409f7..beffa1d615 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -2902,7 +2902,7 @@ class storyModel extends model ->beginIF($type == 'reviewedBy')->andWhere("CONCAT(',', reviewedBy, ',')")->like("%,$account,%")->fi() ->beginIF($type == 'closedBy')->andWhere('closedBy')->eq($account)->fi() ->fi() - ->beginIF($includeLibStories == false and isset($this->config->maxVersion))->andWhere('t1.lib')->eq('0')->fi() + ->beginIF($includeLibStories == false and $this->config->edition == 'max')->andWhere('t1.lib')->eq('0')->fi() ->orderBy($orderBy) ->page($pager) ->fetchAll('id'); @@ -3821,7 +3821,7 @@ class storyModel extends model } echo ""; - if(isset($this->config->bizVersion)) $this->loadModel('flow')->printFlowCell('story', $story, $id); + if($this->config->edition == 'biz') $this->loadModel('flow')->printFlowCell('story', $story, $id); switch($id) { case 'id': @@ -4119,7 +4119,7 @@ class storyModel extends model $stories[$id]->cases = $this->loadModel('testcase')->getStoryCases($id); $stories[$id]->bugs = $this->loadModel('bug')->getStoryBugs($id); $stories[$id]->tasks = $this->loadModel('task')->getStoryTasks($id); - if(isset($this->config->maxVersion)) + if($this->config->edition == 'max') { $stories[$id]->designs = $this->dao->select('id, name')->from(TABLE_DESIGN)->where('story')->eq($id)->fetchAll('id'); $stories[$id]->revisions = $this->dao->select('BID, extra')->from(TABLE_RELATION) @@ -4189,7 +4189,7 @@ class storyModel extends model $stories[$id]->cases = $this->loadModel('testcase')->getStoryCases($id); $stories[$id]->bugs = $this->loadModel('bug')->getStoryBugs($id); $stories[$id]->tasks = $this->loadModel('task')->getStoryTasks($id); - if(isset($this->config->maxVersion)) + if($this->config->edition == 'max') { $stories[$id]->designs = $this->dao->select('id, name')->from(TABLE_DESIGN)->where('story')->eq($id)->fetchAll('id'); $stories[$id]->revisions = $this->dao->select('BID, extra')->from(TABLE_RELATION) @@ -4229,7 +4229,7 @@ class storyModel extends model $track[$id]->bug = $this->loadModel('bug')->getStoryBugs($id); $track[$id]->story = $this->getByID($id); $track[$id]->task = $this->loadModel('task')->getStoryTasks($id); - if(isset($this->config->maxVersion)) + if($this->config->edition == 'max') { $track[$id]->design = $this->dao->select('id, name')->from(TABLE_DESIGN)->where('story')->eq($id)->fetchAll('id'); $track[$id]->revision = $this->dao->select('BID, extra')->from(TABLE_RELATION)->where('AType')->eq('design')->andWhere('BType')->eq('commit')->andWhere('AID')->in(array_keys($track[$id]->design))->fetchPairs(); diff --git a/module/story/view/track.html.php b/module/story/view/track.html.php index 2ab44014d9..bde9c55a86 100644 --- a/module/story/view/track.html.php +++ b/module/story/view/track.html.php @@ -42,11 +42,11 @@ story->story;?> story->tasks;?> - maxVersion)):?> + edition == 'max'):?> story->design;?> story->case;?> - maxVersion)):?> + edition == 'max'):?> story->repoCommit;?> story->bug;?> @@ -78,7 +78,7 @@ createLink('task', 'view', "taskID=$taskID"), $task->name, '', "title='$task->name'") . '
';?> - maxVersion)):?> + edition == 'max'):?> designs as $designID => $design):?> createLink('design', 'view', "designID=$designID"), $design->name, '', "title='$design->name'") . '
';?> @@ -90,7 +90,7 @@ createLink('testcase', 'view', "caseID=$caseID"), $case->title, '', "title='$case->title'") . '
';?> - maxVersion)):?> + edition == 'max'):?> revisions as $revision => $repoID):?> id", $story, 'button', '', '', 'iframe showinonlybody', true); common::printIcon('story', 'close', "storyID=$story->id", $story, 'button', '', '', 'iframe showinonlybody', true); common::printIcon('story', 'activate', "storyID=$story->id", $story, 'button', '', '', 'iframe showinonlybody', true); - if(isset($this->config->maxVersion) and $this->app->tab == 'project' and common::hasPriv('story', 'importToLib')) echo html::a('#importToLib', " " . $this->lang->story->importToLib, '', 'class="btn" data-toggle="modal"'); + if($this->config->edition == 'max' and $this->app->tab == 'project' and common::hasPriv('story', 'importToLib')) echo html::a('#importToLib', " " . $this->lang->story->importToLib, '', 'class="btn" data-toggle="modal"'); if($story->parent >= 0 and $story->type != 'requirement' and (common::hasPriv('testcase', 'create', $story) or common::hasPriv('testcase', 'batchCreate', $story))) { diff --git a/module/task/control.php b/module/task/control.php index 8e92364246..2f91e5983b 100644 --- a/module/task/control.php +++ b/module/task/control.php @@ -1920,7 +1920,7 @@ class task extends control } } } - if(isset($this->config->bizVersion)) list($fields, $tasks) = $this->loadModel('workflowfield')->appendDataFromFlow($fields, $tasks); + if($this->config->edition == 'biz') list($fields, $tasks) = $this->loadModel('workflowfield')->appendDataFromFlow($fields, $tasks); $this->post->set('fields', $fields); $this->post->set('rows', $tasks); diff --git a/module/task/model.php b/module/task/model.php index 4abeb523f7..a7d73b5086 100644 --- a/module/task/model.php +++ b/module/task/model.php @@ -2118,15 +2118,15 @@ class taskModel extends model if($task->parent > 0) $parents[$task->parent] = $task->parent; } $parents = $this->dao->select('*')->from(TABLE_TASK)->where('id')->in($parents)->fetchAll('id'); - + $lanes = array(); $cardsWhere = ''; - foreach($tasks as $task) + foreach($tasks as $task) { - if(empty($cardsWhere)) + if(empty($cardsWhere)) { $cardsWhere = "cards like '%,{$task->id},%'"; - } + } else { $cardsWhere .= " or cards like '%,{$task->id},%'"; @@ -2158,7 +2158,7 @@ class taskModel extends model $task->lane = ''; if(!empty($lanes)) { - foreach($lanes as $lane) + foreach($lanes as $lane) { if(strpos($lane->cards, $task->id) !== false) $task->lane = $lane->name; } @@ -3147,7 +3147,7 @@ class taskModel extends model } echo ""; - if(isset($this->config->bizVersion)) $this->loadModel('flow')->printFlowCell('task', $task, $id); + if($this->config->edition == 'biz') $this->loadModel('flow')->printFlowCell('task', $task, $id); switch($id) { case 'id': diff --git a/module/testcase/control.php b/module/testcase/control.php index d17c191571..777d78a1b0 100644 --- a/module/testcase/control.php +++ b/module/testcase/control.php @@ -1593,7 +1593,7 @@ class testcase extends control } } } - if(isset($this->config->bizVersion)) list($fields, $cases) = $this->loadModel('workflowfield')->appendDataFromFlow($fields, $cases); + if($this->config->edition == 'biz') list($fields, $cases) = $this->loadModel('workflowfield')->appendDataFromFlow($fields, $cases); $this->post->set('fields', $fields); $this->post->set('rows', $cases); diff --git a/module/testcase/model.php b/module/testcase/model.php index 365372313a..765842682d 100644 --- a/module/testcase/model.php +++ b/module/testcase/model.php @@ -1535,7 +1535,7 @@ class testcaseModel extends model if(strpos(',stage,precondition,keywords,story,', ",{$id},") !== false) $class .= ' text-ellipsis'; echo ""; - if(isset($this->config->bizVersion)) $this->loadModel('flow')->printFlowCell('testcase', $case, $id); + if($this->config->edition == 'biz') $this->loadModel('flow')->printFlowCell('testcase', $case, $id); switch($id) { case 'id': diff --git a/module/testtask/control.php b/module/testtask/control.php index c63bef95ac..5b140c4b6d 100644 --- a/module/testtask/control.php +++ b/module/testtask/control.php @@ -157,7 +157,7 @@ class testtask extends control $this->lang->scrum->menu->qa['subMenu']->testcase['subModule'] = 'testtask'; $this->lang->scrum->menu->qa['subMenu']->testtask['subModule'] = ''; - if(isset($this->config->maxVersion)) + if($this->config->edition == 'max') { $this->lang->waterfall->menu->qa['subMenu']->testcase['subModule'] = 'testtask'; $this->lang->waterfall->menu->qa['subMenu']->testtask['subModule'] = ''; diff --git a/module/testtask/model.php b/module/testtask/model.php index b9826d3377..c3cfdec606 100644 --- a/module/testtask/model.php +++ b/module/testtask/model.php @@ -1414,7 +1414,7 @@ class testtaskModel extends model if($id == 'actions') $class .= 'c-actions'; echo ""; - if(isset($this->config->bizVersion)) $this->loadModel('flow')->printFlowCell('testcase', $run, $id); + if($this->config->edition == 'biz') $this->loadModel('flow')->printFlowCell('testcase', $run, $id); switch ($id) { case 'id': diff --git a/module/todo/control.php b/module/todo/control.php index 710789c8f4..910cbca769 100644 --- a/module/todo/control.php +++ b/module/todo/control.php @@ -199,8 +199,8 @@ class todo extends control $bugs = $this->bug->getUserBugPairs($account); $tasks = $this->task->getUserTaskPairs($account, $status); $storys = $this->loadModel('story')->getUserStoryPairs($account); - if(isset($this->config->bizVersion) or isset($this->config->maxVersion)) $this->view->feedbacks = $this->loadModel('feedback')->getUserFeedbackPairs($account); - if(isset($this->config->maxVersion)) + if($this->config->edition != 'open') $this->view->feedbacks = $this->loadModel('feedback')->getUserFeedbackPairs($account); + if($this->config->edition == 'max') { $issues = $this->loadModel('issue')->getUserIssuePairs($account); $risks = $this->loadmodel('risk')->getUserRiskPairs($account); @@ -209,7 +209,7 @@ class todo extends control $testtasks = $this->loadModel('testtask')->getUserTestTaskPairs($account); $reviews = array(); - if(isset($this->config->qcVersion) or isset($this->config->maxVersion)) $reviews = $this->loadModel('review')->getUserReviewPairs($account); + if($this->config->edition == 'max') $reviews = $this->loadModel('review')->getUserReviewPairs($account); $allTodos = $this->todo->getList($type, $account, $status); if($this->post->todoIDList) $todoIDList = $this->post->todoIDList; @@ -243,7 +243,7 @@ class todo extends control $this->view->bugs = $bugs; $this->view->tasks = $tasks; $this->view->storys = $storys; - if(isset($this->config->maxVersion)) + if($this->config->edition == 'max') { $this->view->issues = $issues; $this->view->risks = $risks; @@ -577,7 +577,7 @@ class todo extends control $bugs = $this->loadModel('bug')->getUserBugPairs($account); $stories = $this->loadModel('story')->getUserStoryPairs($account, 100, 'story'); $tasks = $this->loadModel('task')->getUserTaskPairs($account); - if(isset($this->config->maxVersion)) + if($this->config->edition == 'max') { $issues = $this->loadModel('issue')->getUserIssuePairs($account); $risks = $this->loadModel('risk')->getUserRiskPairs($account); @@ -599,7 +599,7 @@ class todo extends control if($type == 'story') $todo->name = isset($stories[$todo->idvalue]) ? $stories[$todo->idvalue] . "(#$todo->idvalue)" : ''; if($type == 'task') $todo->name = isset($tasks[$todo->idvalue]) ? $tasks[$todo->idvalue] . "(#$todo->idvalue)" : ''; - if(isset($this->config->maxVersion)) + if($this->config->edition == 'max') { if($type == 'issue') $todo->name = isset($issues[$todo->idvalue]) ? $issues[$todo->idvalue] . "(#$todo->idvalue)" : ''; if($type == 'risk') $todo->name = isset($risks[$todo->idvalue]) ? $risks[$todo->idvalue] . "(#$todo->idvalue)" : ''; @@ -617,7 +617,7 @@ class todo extends control unset($todo->idvalue); unset($todo->private); } - if(isset($this->config->bizVersion)) list($fields, $todos) = $this->loadModel('workflowfield')->appendDataFromFlow($fields, $todos); + if($this->config->edition == 'biz') list($fields, $todos) = $this->loadModel('workflowfield')->appendDataFromFlow($fields, $todos); $this->post->set('fields', $fields); $this->post->set('rows', $todos); diff --git a/module/todo/model.php b/module/todo/model.php index f863864f26..6797d303ca 100644 --- a/module/todo/model.php +++ b/module/todo/model.php @@ -427,10 +427,10 @@ class todoModel extends model if($todo->type == 'story') $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_STORY)->fetch('title'); if($todo->type == 'task') $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_TASK)->fetch('name'); if($todo->type == 'bug') $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_BUG)->fetch('title'); - if($todo->type == 'issue' and isset($this->config->maxVersion)) $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_ISSUE)->fetch('title'); - if($todo->type == 'risk' and isset($this->config->maxVersion)) $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_RISK)->fetch('name'); - if($todo->type == 'opportunity' and isset($this->config->maxVersion)) $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_OPPORTUNITY)->fetch('name'); - if($todo->type == 'review' and isset($this->config->maxVersion)) $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_REVIEW)->fetch('title'); + if($todo->type == 'issue' and $this->config->edition == 'max') $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_ISSUE)->fetch('title'); + if($todo->type == 'risk' and $this->config->edition == 'max') $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_RISK)->fetch('name'); + if($todo->type == 'opportunity' and $this->config->edition == 'max') $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_OPPORTUNITY)->fetch('name'); + if($todo->type == 'review' and $this->config->edition == 'max') $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_REVIEW)->fetch('title'); if($todo->type == 'testtask') $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_TESTTASK)->fetch('name'); $todo->date = str_replace('-', '', $todo->date); return $todo; @@ -544,10 +544,10 @@ class todoModel extends model if($todo->type == 'task') $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_TASK)->fetch('name'); if($todo->type == 'bug') $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_BUG)->fetch('title'); if($todo->type == 'testtask') $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_TESTTASK)->fetch('name'); - if($todo->type == 'issue' && isset($this->config->maxVersion)) $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_ISSUE)->fetch('title'); - if($todo->type == 'risk' && isset($this->config->maxVersion)) $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_RISK)->fetch('name'); - if($todo->type == 'opportunity' && isset($this->config->maxVersion)) $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_OPPORTUNITY)->fetch('name'); - if($todo->type == 'review' && isset($this->config->maxVersion)) $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_REVIEW)->fetch('title'); + if($todo->type == 'issue' && $this->config->edition == 'max') $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_ISSUE)->fetch('title'); + if($todo->type == 'risk' && $this->config->edition == 'max') $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_RISK)->fetch('name'); + if($todo->type == 'opportunity' && $this->config->edition == 'max') $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_OPPORTUNITY)->fetch('name'); + if($todo->type == 'review' && $this->config->edition == 'max') $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_REVIEW)->fetch('title'); $todo->begin = date::formatTime($todo->begin); $todo->end = date::formatTime($todo->end); diff --git a/module/user/model.php b/module/user/model.php index b609bda207..919f7c08fd 100644 --- a/module/user/model.php +++ b/module/user/model.php @@ -2627,7 +2627,7 @@ class userModel extends model $personalData['createdBugs'] = $this->dao->select($count)->from(TABLE_BUG)->where('openedBy')->eq($account)->andWhere('deleted')->eq('0')->fetch('count'); $personalData['resolvedBugs'] = $this->dao->select($count)->from(TABLE_BUG)->where('resolvedBy')->eq($account)->andWhere('deleted')->eq('0')->fetch('count'); $personalData['createdCases'] = $this->dao->select($count)->from(TABLE_CASE)->where('openedBy')->eq($account)->andWhere('deleted')->eq('0')->andWhere('product')->ne(0)->fetch('count'); - if(isset($this->config->maxVersion)) + if($this->config->edition == 'max') { $personalData['createdRisks'] = $this->dao->select($count)->from(TABLE_RISK)->where('createdBy')->eq($account)->andWhere('deleted')->eq('0')->fetch('count'); $personalData['resolvedRisks'] = $this->dao->select($count)->from(TABLE_RISK)->where('resolvedBy')->eq($account)->andWhere('deleted')->eq('0')->fetch('count'); diff --git a/module/user/view/execution.html.php b/module/user/view/execution.html.php index 97c764cae4..6d5c6bd895 100644 --- a/module/user/view/execution.html.php +++ b/module/user/view/execution.html.php @@ -35,7 +35,7 @@ id);?> - maxVersion)):?> + config->edition == 'max'):?> user->executionTypeList, $execution->type);?> name);?> diff --git a/module/user/view/featurebar.html.php b/module/user/view/featurebar.html.php index 4fed34a2a6..6af3ff7ca7 100755 --- a/module/user/view/featurebar.html.php +++ b/module/user/view/featurebar.html.php @@ -46,7 +46,7 @@ common::printLink('user', 'execution', "userID={$user->id}", $label, '', "class='btn btn-link $active'"); } - if(isset($this->config->maxVersion)) + if($this->config->edition == 'max') { $label = "{$lang->user->issue}"; $active = $methodName == 'issue' ? ' btn-active-text' : ''; diff --git a/module/weekly/model.php b/module/weekly/model.php index a226fd041b..8312a0df98 100644 --- a/module/weekly/model.php +++ b/module/weekly/model.php @@ -462,7 +462,7 @@ class weeklyModel extends model $executions = $this->loadModel('execution')->getList($project, 'all', 'all', 0, 0, 0); $executionIdList = array_keys($executions); - if(isset($this->config->proVersion)) + if($this->config->edition == 'max') { $AC = $this->dao->select('sum(consumed) as consumed') ->from(TABLE_EFFORT)