Merge branch 'sprint/zentaopms240' of https://gitlab.zcorp.cc/easycorp/zentaopms into sprint/zentaopms240

This commit is contained in:
wangyidong
2022-09-30 08:31:56 +08:00
4 changed files with 7 additions and 12 deletions
+1 -1
View File
@@ -24,7 +24,7 @@
<table class='table table-form'>
<tr>
<th class='text-top w-120px'><?php echo $lang->custom->mode;?></th>
<td class='w-200px'>
<td class='w-300px'>
<p>
<label class="radio-inline"><input type="radio" name="mode" value="lean" <?php echo $mode == 'lean'? "checked='checked'" : '';?> id="modelean"><?php echo $lang->upgrade->to18Mode['lean'];?></label>
<label class="radio-inline"><input type="radio" name="mode" value="new" <?php echo $mode == 'new'? "checked='checked'" : '';?> id="modenew"><?php echo $lang->upgrade->to18Mode['new'];?></label>
+1 -8
View File
@@ -69,14 +69,7 @@
<?php endif;?>
<td class='text-left'>
<?php
if($config->systemMode == 'new')
{
echo html::a($this->createLink('project', 'index', 'project=' . $project->id), $project->name);
}
else
{
echo html::a($this->createLink('execution', 'task', 'project=' . $project->id), $project->name);
}
echo html::a($this->createLink('project', 'index', 'project=' . $project->id), $project->name);
?>
</td>
<td class='padding-right'>
+1 -1
View File
@@ -171,7 +171,7 @@ class upgrade extends control
$this->upgrade->upgradeInProjectMode($programID, $systemMode);
$this->loadModel('custom')->disableFeaturesByMode($mode);
$this->loadModel('custom')->disableFeaturesByMode('lean');
$selectMode = false;
}
+4 -2
View File
@@ -7568,7 +7568,7 @@ class upgradeModel extends model
$project->acl = $sprint->acl == 'open' ? 'open' : 'private';
if($fromMode == 'classic') $project->multiple = '0';
$this->dao->insert(TABLE_PROJECT)->data($project)->check('name', 'unique', "type='project' AND parent=$programID AND deleted='0'")->exec();
$this->dao->insert(TABLE_PROJECT)->data($project)->exec();
if(dao::isError()) return false;
$projectID = $this->dao->lastInsertId();
@@ -7733,7 +7733,9 @@ class upgradeModel extends model
{
$this->dao->update(TABLE_PRODUCT)->set('program')->eq($programID)->where('program')->eq(0)->exec();
$this->dao->update(TABLE_PROJECT)->set("path = CONCAT(',{$programID}', path)")->set('grade = grade + 1')->where('type')->eq('project')->andWhere('parent')->eq(0)->andWhere('grade')->eq(1)->exec();
$this->dao->update(TABLE_MODULE)->set('root')->eq($programID)->where('type')->eq('line')->andWhere('root')->eq('0')->exec();
$this->dao->update(TABLE_PROJECT)->set('parent')->eq($programID)->set("path = CONCAT(',{$programID}', path)")->set('grade = grade + 1')->where('type')->eq('project')->andWhere('parent')->eq(0)->andWhere('grade')->eq(1)->exec();
return !dao::isError();
}