diff --git a/module/project/control.php b/module/project/control.php index 33c2151570..52d6916bec 100755 --- a/module/project/control.php +++ b/module/project/control.php @@ -2241,8 +2241,7 @@ class project extends control $branchGroups = $this->loadModel('branch')->getByProducts(array_keys($allProducts), 'ignoreNormal|noclosed'); if($this->config->systemMode == 'ALM') { - $paths = explode(',', trim($project->path, ',')); - $topProgramID = count($paths) > 1 ? $this->program->getTopByPath($project->path) : 0; + $topProgramID = $project->parent ? $this->program->getTopByPath($project->path) : 0; $productsGroupByProgram = $this->product->getProductsGroupByProgram(); $currentProducts = array(); diff --git a/module/upgrade/control.php b/module/upgrade/control.php index d769a96719..ed04cffafa 100644 --- a/module/upgrade/control.php +++ b/module/upgrade/control.php @@ -187,12 +187,12 @@ class upgrade extends control $selectMode = false; } - if(version_compare($openVersion, '15_0', '>=') and $systemMode == 'new') + if(version_compare($openVersion, '15_0_rc1', '>=') and $systemMode == 'new') { $this->loadModel('setting')->setItem('system.common.global.mode', 'ALM'); $selectMode = false; } - if(version_compare($openVersion, '18_0', '>=')) $selectMode = false; + if(version_compare($openVersion, '18_0_beta1', '>=')) $selectMode = false; if($selectMode) $this->locate(inlink('to18Guide', "fromVersion=$fromVersion")); @@ -241,16 +241,9 @@ class upgrade extends control /* Set default program for product and project with no program. */ $this->upgrade->relateDefaultProgram($programID); - if(version_compare($openVersion, '15_0', '<')) $this->locate(inlink('selectMergeMode', "fromVersion=$fromVersion&mode=light")); - - $this->locate(inlink('afterExec', "fromVersion=$fromVersion")); } - if($mode == 'ALM') - { - if(version_compare($openVersion, '15_0', '<')) $this->locate(inlink('selectMergeMode', "fromVersion=$fromVersion&mode=ALM")); - $this->locate(inlink('afterExec', "fromVersion=$fromVersion")); - } + $this->locate(inlink('selectMergeMode', "fromVersion=$fromVersion&mode=$mode")); } list($disabledFeatures, $enabledScrumFeatures, $disabledScrumFeatures) = $this->loadModel('custom')->computeFeatures();