* Modify the lang file when merge data for upgrade.

This commit is contained in:
hufangzhou
2021-11-18 13:35:58 +08:00
parent 5c398e8545
commit 8b651bd59c
3 changed files with 8 additions and 1 deletions
+3
View File
@@ -137,4 +137,7 @@ $lang->upgrade->createExecutionTip = <<<EOT
<p>ZenTao will upgrade existing {$lang->projectCommon} as execution.</p>
<p>After the upgrade, the data of existing {$lang->projectCommon} will be in a Project - Execute of the new version .</p>
EOT;
$lang->upgrade->projectNameUnique = "『%s』has the same『%s』. Click {$lang->projectCommon} on the left and edit the name of {$lang->projectCommon}.";
include dirname(__FILE__) . '/version.php';
+3
View File
@@ -137,4 +137,7 @@ $lang->upgrade->createExecutionTip = <<<EOT
<p>系统会把历史的{$lang->projectCommon}作为执行进行升级。</p>
<p>升级后历史的{$lang->projectCommon}数据将对应新版本中项目下的执行。</p>
EOT;
$lang->upgrade->projectNameUnique = "『%s』已经有『%s』这条记录了。请至左侧{$lang->projectCommon}处修改该{$lang->projectCommon}名称。";
include dirname(__FILE__) . '/version.php';
+2 -1
View File
@@ -4416,11 +4416,12 @@ class upgradeModel extends model
else
{
/* Use historical projects as project upgrades. */
$projects = $this->dao->select('id,name,begin,end,status,PM,acl')->from(TABLE_PROJECT)->where('id')->in($projectIdList)->fetchAll('id');
$hasExistedProjects = $this->dao->select('name')->from(TABLE_PROJECT)->where('type')->eq('project')->fetchPairs('name');
$this->lang->error->unique = $this->lang->upgrade->projectNameUnique;
$nameList = array();
foreach($projectIdList as $projectID)
{