+ add version 1.0.1 and 1.1.
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>趨<EFBFBD><E8B6A8>*/
|
||||
$config->version = '1.0.1'; // <20>汾<EFBFBD>ţ<EFBFBD><C5A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ġ<DEB8>
|
||||
$config->version = '1.1'; // <20>汾<EFBFBD>ţ<EFBFBD><C5A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ġ<DEB8>
|
||||
$config->encoding = 'UTF-8'; // <20><>վ<EFBFBD>ı<EFBFBD><C4B1>롣
|
||||
$config->cookiePath = '/'; // cookie<69><65><EFBFBD><EFBFBD>Ч·<D0A7><C2B7><EFBFBD><EFBFBD>
|
||||
$config->cookieLife = time() + 2592000; // cookie<69><65><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڡ<EFBFBD>
|
||||
|
||||
2
db/update1.0.1.sql
Normal file
2
db/update1.0.1.sql
Normal file
@@ -0,0 +1,2 @@
|
||||
-- 2010-07-01 task table.
|
||||
ALTER TABLE `zt_task` ADD `mailto` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' AFTER `status`
|
||||
@@ -43,10 +43,12 @@ $lang->upgrade->toVersion = '升级到';
|
||||
$lang->upgrade->confirm = '确认要执行的SQL语句';
|
||||
$lang->upgrade->sureExecute = '确认执行';
|
||||
|
||||
$lang->upgrade->fromVersions['0_3beta'] = '0.3 BETA';
|
||||
$lang->upgrade->fromVersions['0_4beta'] = '0.4 BETA';
|
||||
$lang->upgrade->fromVersions['0_5beta'] = '0.5 BETA';
|
||||
$lang->upgrade->fromVersions['0_6beta'] = '0.6 BETA';
|
||||
$lang->upgrade->fromVersions['1_0beta'] = '1.0 BETA';
|
||||
$lang->upgrade->fromVersions['1_0rc1'] = '1.0 RC1';
|
||||
$lang->upgrade->fromVersions['1_0rc2'] = '1.0 RC2';
|
||||
$lang->upgrade->fromVersions['0_3beta'] = '0.3 BETA';
|
||||
$lang->upgrade->fromVersions['0_4beta'] = '0.4 BETA';
|
||||
$lang->upgrade->fromVersions['0_5beta'] = '0.5 BETA';
|
||||
$lang->upgrade->fromVersions['0_6beta'] = '0.6 BETA';
|
||||
$lang->upgrade->fromVersions['1_0beta'] = '1.0 BETA';
|
||||
$lang->upgrade->fromVersions['1_0rc1'] = '1.0 RC1';
|
||||
$lang->upgrade->fromVersions['1_0rc2'] = '1.0 RC2';
|
||||
$lang->upgrade->fromVersions['1_0stable'] = '1.0 STABLE';
|
||||
$lang->upgrade->fromVersions['1_0_1'] = '1.0.1';
|
||||
|
||||
@@ -39,6 +39,8 @@ class upgradeModel extends model
|
||||
$this->upgradeFrom1_0betaTo1_0rc1();
|
||||
$this->upgradeFrom1_0rc1To1_0rc2();
|
||||
$this->upgradeFrom1_0rc2To1_0stable();
|
||||
$this->upgradeFrom1_0stableTo1_0_1();
|
||||
$this->upgradeFrom1_0_1To1_1();
|
||||
}
|
||||
elseif($fromVersion == '0_4beta')
|
||||
{
|
||||
@@ -48,6 +50,8 @@ class upgradeModel extends model
|
||||
$this->upgradeFrom1_0betaTo1_0rc1();
|
||||
$this->upgradeFrom1_0rc1To1_0rc2();
|
||||
$this->upgradeFrom1_0rc2To1_0stable();
|
||||
$this->upgradeFrom1_0stableTo1_0_1();
|
||||
$this->upgradeFrom1_0_1To1_1();
|
||||
}
|
||||
elseif($fromVersion == '0_5beta')
|
||||
{
|
||||
@@ -56,6 +60,8 @@ class upgradeModel extends model
|
||||
$this->upgradeFrom1_0betaTo1_0rc1();
|
||||
$this->upgradeFrom1_0rc1To1_0rc2();
|
||||
$this->upgradeFrom1_0rc2To1_0stable();
|
||||
$this->upgradeFrom1_0stableTo1_0_1();
|
||||
$this->upgradeFrom1_0_1To1_1();
|
||||
}
|
||||
elseif($fromVersion == '0_6beta')
|
||||
{
|
||||
@@ -63,21 +69,38 @@ class upgradeModel extends model
|
||||
$this->upgradeFrom1_0betaTo1_0rc1();
|
||||
$this->upgradeFrom1_0rc1To1_0rc2();
|
||||
$this->upgradeFrom1_0rc2To1_0stable();
|
||||
$this->upgradeFrom1_0stableTo1_0_1();
|
||||
$this->upgradeFrom1_0_1To1_1();
|
||||
}
|
||||
elseif($fromVersion == '1_0beta')
|
||||
{
|
||||
$this->upgradeFrom1_0betaTo1_0rc1();
|
||||
$this->upgradeFrom1_0rc1To1_0rc2();
|
||||
$this->upgradeFrom1_0rc2To1_0stable();
|
||||
$this->upgradeFrom1_0stableTo1_0_1();
|
||||
$this->upgradeFrom1_0_1To1_1();
|
||||
}
|
||||
elseif($fromVersion == '1_0rc1')
|
||||
{
|
||||
$this->upgradeFrom1_0rc1To1_0rc2();
|
||||
$this->upgradeFrom1_0rc2To1_0stable();
|
||||
$this->upgradeFrom1_0stableTo1_0_1();
|
||||
$this->upgradeFrom1_0_1To1_1();
|
||||
}
|
||||
elseif($fromVersion == '1_0rc2')
|
||||
{
|
||||
$this->upgradeFrom1_0rc2To1_0stable();
|
||||
$this->upgradeFrom1_0stableTo1_0_1();
|
||||
$this->upgradeFrom1_0_1To1_1();
|
||||
}
|
||||
elseif($fromVersion == '1_0stable')
|
||||
{
|
||||
$this->upgradeFrom1_0stableTo1_0_1();
|
||||
$this->upgradeFrom1_0_1To1_1();
|
||||
}
|
||||
elseif($fromVersion == '1_0_1')
|
||||
{
|
||||
$this->upgradeFrom1_0_1To1_1();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -93,6 +116,7 @@ class upgradeModel extends model
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('0.6'));
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('1.0.beta'));
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('1.0.rc1'));
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('1.0.1'));
|
||||
}
|
||||
elseif($fromVersion == '0_4beta')
|
||||
{
|
||||
@@ -101,6 +125,7 @@ class upgradeModel extends model
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('0.6'));
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('1.0.beta'));
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('1.0.rc1'));
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('1.0.1'));
|
||||
}
|
||||
elseif($fromVersion == '0_5beta')
|
||||
{
|
||||
@@ -108,23 +133,31 @@ class upgradeModel extends model
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('0.6'));
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('1.0.beta'));
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('1.0.rc1'));
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('1.0.1'));
|
||||
}
|
||||
elseif($fromVersion == '0_6beta')
|
||||
{
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('0.6'));
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('1.0.beta'));
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('1.0.rc1'));
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('1.0.1'));
|
||||
}
|
||||
elseif($fromVersion == '1_0beta')
|
||||
{
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('1.0.beta'));
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('1.0.rc1'));
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('1.0.1'));
|
||||
}
|
||||
elseif($fromVersion == '1_0rc1')
|
||||
{
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('1.0.rc1'));
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('1.0.1'));
|
||||
}
|
||||
|
||||
elseif($fromVersion == '1_0stable' || $fromVersion == '1_0_1')
|
||||
{
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('1.0.1'));
|
||||
}
|
||||
|
||||
return str_replace('zt_', $this->config->db->prefix, $confirmContent);
|
||||
}
|
||||
|
||||
@@ -178,6 +211,19 @@ class upgradeModel extends model
|
||||
$this->updateVersion('1.0');
|
||||
}
|
||||
|
||||
/* 从1.0stable版本升级到1.0.1版本。*/
|
||||
private function upgradeFrom1_0stableTo1_0_1()
|
||||
{
|
||||
$this->updateVersion('1.0');
|
||||
}
|
||||
|
||||
/* 从1.0.1版本升级到1.1版本。*/
|
||||
private function upgradeFrom1_0_1To1_1()
|
||||
{
|
||||
$this->execSQL($this->getUpgradeFile('1.0.1'));
|
||||
if(!$this->isError()) $this->updateVersion('1.1');
|
||||
}
|
||||
|
||||
/* 更新每个表的company字段。*/
|
||||
private function updateCompany()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user