* adjust the upgrade feature.

This commit is contained in:
wangchunsheng
2011-05-01 06:46:59 +00:00
parent 03db5bbe0f
commit faa1e7a432
4 changed files with 21 additions and 5 deletions
+2 -1
View File
@@ -65,8 +65,9 @@ class common extends control
{
$this->app->loadLang('upgrade');
echo "<html><head><meta http-equiv='Content-Type' content='text/html; charset=utf-8' /></head><body>";
echo "<table align='center' style='margin-top:100px; border:1px solid gray; font-size:14px;'><tr><td>";
printf($this->lang->upgrade->setStatusFile, $statusFile, $statusFile, $statusFile);
die('</body></html>');
die('</td></tr></table></body></html>');
}
}
+3 -2
View File
@@ -24,10 +24,11 @@ EOT;
$lang->upgrade->setStatusFile = "For security reason, we will check file <strong>%s</strong><br />
$lang->upgrade->setStatusFile = "<p>For security reason, we will check file <strong>%s</strong><br />
But this file doesn't exist or out of date. You can use the flowing command to create(update)it <br />
For linux:<strong>touch %s;</strong> <br />
For windows:<strong>echo ok > %s</strong>";
For windows:<strong>echo ok > %s</strong></p>
I have done this work, <a href='upgrade.php'>continue upgrade</a>";
$lang->upgrade->selectVersion = 'Select version';
$lang->upgrade->noteVersion = "Must select the correct version";
$lang->upgrade->fromVersion = 'From version';
+3 -2
View File
@@ -24,10 +24,11 @@ $lang->upgrade->warnningContent = <<<EOT
要将上面红色的部分分别替换成对应的用户名和禅道系统的数据库名。<br />
比如: mysqldump -u root -p zentao >zentao.bak
EOT;
$lang->upgrade->setStatusFile = '基于安全考虑,升级之间需要检查这个文件:<strong>%s</strong><br />
$lang->upgrade->setStatusFile = '<p>基于安全考虑,升级之间需要检查这个文件:<strong>%s</strong><br />
该文件不存在或者已经过期,请用下面的命令来创建或者更新它。<br />
linux下面的命令:<strong>touch %s;</strong> <br />
windows下面的命令:<strong>echo ok > %s</strong>';
windows下面的命令:<strong>echo ok > %s</strong></p>
我已经完成上面的工作,<a href="upgrade.php">继续更新</a>';
$lang->upgrade->selectVersion = '选择版本';
$lang->upgrade->noteVersion = "务必选择正确的版本,否则会造成数据丢失。";
$lang->upgrade->fromVersion = '原来的版本';
+13
View File
@@ -45,6 +45,7 @@ class upgradeModel extends model
$this->upgradeFrom1_2To1_3();
$this->upgradeFrom1_3To1_4();
$this->upgradeFrom1_4To1_5();
$this->upgradeFrom1_5To2_0();
}
elseif($fromVersion == '0_4beta')
{
@@ -60,6 +61,7 @@ class upgradeModel extends model
$this->upgradeFrom1_2To1_3();
$this->upgradeFrom1_3To1_4();
$this->upgradeFrom1_4To1_5();
$this->upgradeFrom1_5To2_0();
}
elseif($fromVersion == '0_5beta')
{
@@ -74,6 +76,7 @@ class upgradeModel extends model
$this->upgradeFrom1_2To1_3();
$this->upgradeFrom1_3To1_4();
$this->upgradeFrom1_4To1_5();
$this->upgradeFrom1_5To2_0();
}
elseif($fromVersion == '0_6beta')
{
@@ -87,6 +90,7 @@ class upgradeModel extends model
$this->upgradeFrom1_2To1_3();
$this->upgradeFrom1_3To1_4();
$this->upgradeFrom1_4To1_5();
$this->upgradeFrom1_5To2_0();
}
elseif($fromVersion == '1_0beta')
{
@@ -99,6 +103,7 @@ class upgradeModel extends model
$this->upgradeFrom1_2To1_3();
$this->upgradeFrom1_3To1_4();
$this->upgradeFrom1_4To1_5();
$this->upgradeFrom1_5To2_0();
}
elseif($fromVersion == '1_0rc1')
{
@@ -110,6 +115,7 @@ class upgradeModel extends model
$this->upgradeFrom1_2To1_3();
$this->upgradeFrom1_3To1_4();
$this->upgradeFrom1_4To1_5();
$this->upgradeFrom1_5To2_0();
}
elseif($fromVersion == '1_0rc2')
{
@@ -120,6 +126,7 @@ class upgradeModel extends model
$this->upgradeFrom1_2To1_3();
$this->upgradeFrom1_3To1_4();
$this->upgradeFrom1_4To1_5();
$this->upgradeFrom1_5To2_0();
}
elseif($fromVersion == '1_0')
{
@@ -129,6 +136,7 @@ class upgradeModel extends model
$this->upgradeFrom1_2To1_3();
$this->upgradeFrom1_3To1_4();
$this->upgradeFrom1_4To1_5();
$this->upgradeFrom1_5To2_0();
}
elseif($fromVersion == '1_0_1')
{
@@ -137,6 +145,7 @@ class upgradeModel extends model
$this->upgradeFrom1_2To1_3();
$this->upgradeFrom1_3To1_4();
$this->upgradeFrom1_4To1_5();
$this->upgradeFrom1_5To2_0();
}
elseif($fromVersion == '1_1')
{
@@ -144,21 +153,25 @@ class upgradeModel extends model
$this->upgradeFrom1_2To1_3();
$this->upgradeFrom1_3To1_4();
$this->upgradeFrom1_4To1_5();
$this->upgradeFrom1_5To2_0();
}
elseif($fromVersion == '1_2')
{
$this->upgradeFrom1_2To1_3();
$this->upgradeFrom1_3To1_4();
$this->upgradeFrom1_4To1_5();
$this->upgradeFrom1_5To2_0();
}
elseif($fromVersion == '1_3')
{
$this->upgradeFrom1_3To1_4();
$this->upgradeFrom1_4To1_5();
$this->upgradeFrom1_5To2_0();
}
elseif($fromVersion == '1_4')
{
$this->upgradeFrom1_4To1_5();
$this->upgradeFrom1_5To2_0();
}
elseif($fromVersion == '1_5')
{