finish the model of upgrade module.
This commit is contained in:
@@ -49,6 +49,7 @@ class upgradeModel extends model
|
||||
$this->upgradeFrom2_0To2_1();
|
||||
$this->upgradeFrom2_1To2_2();
|
||||
$this->upgradeFrom2_2To2_3();
|
||||
$this->upgradeFrom2_3To2_4();
|
||||
}
|
||||
elseif($fromVersion == '0_4beta')
|
||||
{
|
||||
@@ -68,6 +69,7 @@ class upgradeModel extends model
|
||||
$this->upgradeFrom2_0To2_1();
|
||||
$this->upgradeFrom2_1To2_2();
|
||||
$this->upgradeFrom2_2To2_3();
|
||||
$this->upgradeFrom2_3To2_4();
|
||||
}
|
||||
elseif($fromVersion == '0_5beta')
|
||||
{
|
||||
@@ -85,6 +87,7 @@ class upgradeModel extends model
|
||||
$this->upgradeFrom2_0To2_1();
|
||||
$this->upgradeFrom2_1To2_2();
|
||||
$this->upgradeFrom2_2To2_3();
|
||||
$this->upgradeFrom2_3To2_4();
|
||||
}
|
||||
elseif($fromVersion == '0_6beta')
|
||||
{
|
||||
@@ -101,6 +104,7 @@ class upgradeModel extends model
|
||||
$this->upgradeFrom2_0To2_1();
|
||||
$this->upgradeFrom2_1To2_2();
|
||||
$this->upgradeFrom2_2To2_3();
|
||||
$this->upgradeFrom2_3To2_4();
|
||||
}
|
||||
elseif($fromVersion == '1_0beta')
|
||||
{
|
||||
@@ -117,6 +121,7 @@ class upgradeModel extends model
|
||||
$this->upgradeFrom2_0To2_1();
|
||||
$this->upgradeFrom2_1To2_2();
|
||||
$this->upgradeFrom2_2To2_3();
|
||||
$this->upgradeFrom2_3To2_4();
|
||||
}
|
||||
elseif($fromVersion == '1_0rc1')
|
||||
{
|
||||
@@ -132,6 +137,7 @@ class upgradeModel extends model
|
||||
$this->upgradeFrom2_0To2_1();
|
||||
$this->upgradeFrom2_1To2_2();
|
||||
$this->upgradeFrom2_2To2_3();
|
||||
$this->upgradeFrom2_3To2_4();
|
||||
}
|
||||
elseif($fromVersion == '1_0rc2')
|
||||
{
|
||||
@@ -146,6 +152,7 @@ class upgradeModel extends model
|
||||
$this->upgradeFrom2_0To2_1();
|
||||
$this->upgradeFrom2_1To2_2();
|
||||
$this->upgradeFrom2_2To2_3();
|
||||
$this->upgradeFrom2_3To2_4();
|
||||
}
|
||||
elseif($fromVersion == '1_0')
|
||||
{
|
||||
@@ -159,6 +166,7 @@ class upgradeModel extends model
|
||||
$this->upgradeFrom2_0To2_1();
|
||||
$this->upgradeFrom2_1To2_2();
|
||||
$this->upgradeFrom2_2To2_3();
|
||||
$this->upgradeFrom2_3To2_4();
|
||||
}
|
||||
elseif($fromVersion == '1_0_1')
|
||||
{
|
||||
@@ -171,6 +179,7 @@ class upgradeModel extends model
|
||||
$this->upgradeFrom2_0To2_1();
|
||||
$this->upgradeFrom2_1To2_2();
|
||||
$this->upgradeFrom2_2To2_3();
|
||||
$this->upgradeFrom2_3To2_4();
|
||||
}
|
||||
elseif($fromVersion == '1_1')
|
||||
{
|
||||
@@ -182,6 +191,7 @@ class upgradeModel extends model
|
||||
$this->upgradeFrom2_0To2_1();
|
||||
$this->upgradeFrom2_1To2_2();
|
||||
$this->upgradeFrom2_2To2_3();
|
||||
$this->upgradeFrom2_3To2_4();
|
||||
}
|
||||
elseif($fromVersion == '1_2')
|
||||
{
|
||||
@@ -192,6 +202,7 @@ class upgradeModel extends model
|
||||
$this->upgradeFrom2_0To2_1();
|
||||
$this->upgradeFrom2_1To2_2();
|
||||
$this->upgradeFrom2_2To2_3();
|
||||
$this->upgradeFrom2_3To2_4();
|
||||
}
|
||||
elseif($fromVersion == '1_3')
|
||||
{
|
||||
@@ -201,6 +212,7 @@ class upgradeModel extends model
|
||||
$this->upgradeFrom2_0To2_1();
|
||||
$this->upgradeFrom2_1To2_2();
|
||||
$this->upgradeFrom2_2To2_3();
|
||||
$this->upgradeFrom2_3To2_4();
|
||||
}
|
||||
elseif($fromVersion == '1_4')
|
||||
{
|
||||
@@ -209,6 +221,7 @@ class upgradeModel extends model
|
||||
$this->upgradeFrom2_0To2_1();
|
||||
$this->upgradeFrom2_1To2_2();
|
||||
$this->upgradeFrom2_2To2_3();
|
||||
$this->upgradeFrom2_3To2_4();
|
||||
}
|
||||
elseif($fromVersion == '1_5')
|
||||
{
|
||||
@@ -216,21 +229,30 @@ class upgradeModel extends model
|
||||
$this->upgradeFrom2_0To2_1();
|
||||
$this->upgradeFrom2_1To2_2();
|
||||
$this->upgradeFrom2_2To2_3();
|
||||
$this->upgradeFrom2_3To2_4();
|
||||
}
|
||||
elseif($fromVersion == '2_0')
|
||||
{
|
||||
$this->upgradeFrom2_0To2_1();
|
||||
$this->upgradeFrom2_1To2_2();
|
||||
$this->upgradeFrom2_2To2_3();
|
||||
$this->upgradeFrom2_3To2_4();
|
||||
}
|
||||
elseif($fromVersion == '2_1')
|
||||
{
|
||||
$this->upgradeFrom2_1To2_2();
|
||||
$this->upgradeFrom2_2To2_3();
|
||||
$this->upgradeFrom2_3To2_4();
|
||||
}
|
||||
elseif($fromVersion == '2_2')
|
||||
{
|
||||
$this->upgradeFrom2_2To2_3();
|
||||
$this->upgradeFrom2_3To2_4();
|
||||
}
|
||||
elseif($fromVersion == '2_2')
|
||||
{
|
||||
$this->upgradeFrom2_2To2_3();
|
||||
$this->upgradeFrom2_3To2_4();
|
||||
}
|
||||
|
||||
$this->deletePatch();
|
||||
@@ -264,6 +286,7 @@ class upgradeModel extends model
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('2.0'));
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('2.1'));
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('2.2'));
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('2.3'));
|
||||
}
|
||||
elseif($fromVersion == '0_4beta')
|
||||
{
|
||||
@@ -281,6 +304,7 @@ class upgradeModel extends model
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('2.0'));
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('2.1'));
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('2.2'));
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('2.3'));
|
||||
}
|
||||
elseif($fromVersion == '0_5beta')
|
||||
{
|
||||
@@ -297,6 +321,7 @@ class upgradeModel extends model
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('2.0'));
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('2.1'));
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('2.2'));
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('2.3'));
|
||||
}
|
||||
elseif($fromVersion == '0_6beta')
|
||||
{
|
||||
@@ -312,6 +337,7 @@ class upgradeModel extends model
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('2.0'));
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('2.1'));
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('2.2'));
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('2.3'));
|
||||
}
|
||||
elseif($fromVersion == '1_0beta')
|
||||
{
|
||||
@@ -326,6 +352,7 @@ class upgradeModel extends model
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('2.0'));
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('2.1'));
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('2.2'));
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('2.3'));
|
||||
}
|
||||
elseif($fromVersion == '1_0rc1')
|
||||
{
|
||||
@@ -339,6 +366,7 @@ class upgradeModel extends model
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('2.0'));
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('2.1'));
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('2.2'));
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('2.3'));
|
||||
}
|
||||
elseif($fromVersion == '1_0rc2' || $fromVersion == '1_0' || $fromVersion == '1_0_1')
|
||||
{
|
||||
@@ -351,6 +379,7 @@ class upgradeModel extends model
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('2.0'));
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('2.1'));
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('2.2'));
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('2.3'));
|
||||
}
|
||||
elseif($fromVersion == '1_1')
|
||||
{
|
||||
@@ -362,6 +391,7 @@ class upgradeModel extends model
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('2.0'));
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('2.1'));
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('2.2'));
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('2.3'));
|
||||
}
|
||||
elseif($fromVersion == '1_2')
|
||||
{
|
||||
@@ -372,6 +402,7 @@ class upgradeModel extends model
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('2.0'));
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('2.1'));
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('2.2'));
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('2.3'));
|
||||
}
|
||||
elseif($fromVersion == '1_3')
|
||||
{
|
||||
@@ -381,6 +412,7 @@ class upgradeModel extends model
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('2.0'));
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('2.1'));
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('2.2'));
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('2.3'));
|
||||
}
|
||||
elseif($fromVersion == '1_4')
|
||||
{
|
||||
@@ -389,6 +421,7 @@ class upgradeModel extends model
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('2.0'));
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('2.1'));
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('2.2'));
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('2.3'));
|
||||
}
|
||||
elseif($fromVersion == '1_5')
|
||||
{
|
||||
@@ -396,21 +429,29 @@ class upgradeModel extends model
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('2.0'));
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('2.1'));
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('2.2'));
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('2.3'));
|
||||
}
|
||||
elseif($fromVersion == '2_0')
|
||||
{
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('2.0'));
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('2.1'));
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('2.2'));
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('2.3'));
|
||||
}
|
||||
elseif($fromVersion == '2_1')
|
||||
{
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('2.1'));
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('2.2'));
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('2.3'));
|
||||
}
|
||||
elseif($fromVersion == '2_2')
|
||||
{
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('2.2'));
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('2.3'));
|
||||
}
|
||||
elseif($fromVersion == '2_3')
|
||||
{
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('2.3'));
|
||||
}
|
||||
|
||||
return str_replace('zt_', $this->config->db->prefix, $confirmContent);
|
||||
@@ -625,6 +666,18 @@ class upgradeModel extends model
|
||||
if(!$this->isError()) $this->setting->updateVersion('2.3');
|
||||
}
|
||||
|
||||
/**
|
||||
* Upgrade from 2.3 to 2.4.
|
||||
*
|
||||
* @access private
|
||||
* @return void
|
||||
*/
|
||||
private function upgradeFrom2_3To2_4()
|
||||
{
|
||||
$this->execSQL($this->getUpgradeFile('2.3'));
|
||||
if(!$this->isError()) $this->setting->updateVersion('2.4');
|
||||
}
|
||||
|
||||
/**
|
||||
* Update company field.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user