* finish the upgrade(form 2.2 to 2.3) and fix confirm of Bug.

This commit is contained in:
shiyangyangwork@yahoo.cn
2011-10-19 06:40:11 +00:00
parent f9985a2222
commit 5b9cf0e484
3 changed files with 79 additions and 2 deletions
+2
View File
@@ -7,3 +7,5 @@
.active4 {background:#FFF100;}
.resolved a, .active1 a, .active2 a, .active3 a{color:white; text-decoration:none}
.active4 a {color:blue; text-decoration:none}
.confirm0 {color:red}
.confirm1 {color:green}
+3 -2
View File
@@ -104,10 +104,11 @@ var customed = <?php echo (int)$customed;?>;
<td><?php echo $lang->bug->severityList[$bug->severity]?></td>
<td><?php echo $lang->bug->priList[$bug->pri]?></td>
<td class='a-left nobr'><?php echo html::a($bugLink, $bug->title);?></td>
<?php $class = 'confirm' . $bug->confirm;?>
<td class='a-left nobr <?php echo $class;?>'><?php echo '[' . $lang->bug->confirmList[$bug->confirm] . ']'; echo html::a($bugLink, $bug->title);?></td>
<?php if($this->cookie->windowWidth >= $this->config->wideSize):?>
<td><?php echo $lang->bug->statusList[$bug->status];echo '[' . $lang->bug->confirmList[$bug->confirm] . ']';?></td>
<td><?php echo $lang->bug->statusList[$bug->status];?></td>
<?php endif;?>
<?php if($browseType == 'needconfirm'):?>
+74
View File
@@ -48,6 +48,7 @@ class upgradeModel extends model
$this->upgradeFrom1_5To2_0();
$this->upgradeFrom2_0To2_1();
$this->upgradeFrom2_1To2_2();
$this->upgradeFrom2_2To2_3();
}
elseif($fromVersion == '0_4beta')
{
@@ -66,6 +67,7 @@ class upgradeModel extends model
$this->upgradeFrom1_5To2_0();
$this->upgradeFrom2_0To2_1();
$this->upgradeFrom2_1To2_2();
$this->upgradeFrom2_2To2_3();
}
elseif($fromVersion == '0_5beta')
{
@@ -82,6 +84,7 @@ class upgradeModel extends model
$this->upgradeFrom1_4To1_5();
$this->upgradeFrom2_0To2_1();
$this->upgradeFrom2_1To2_2();
$this->upgradeFrom2_2To2_3();
}
elseif($fromVersion == '0_6beta')
{
@@ -97,6 +100,7 @@ class upgradeModel extends model
$this->upgradeFrom1_4To1_5();
$this->upgradeFrom2_0To2_1();
$this->upgradeFrom2_1To2_2();
$this->upgradeFrom2_2To2_3();
}
elseif($fromVersion == '1_0beta')
{
@@ -112,6 +116,7 @@ class upgradeModel extends model
$this->upgradeFrom1_5To2_0();
$this->upgradeFrom2_0To2_1();
$this->upgradeFrom2_1To2_2();
$this->upgradeFrom2_2To2_3();
}
elseif($fromVersion == '1_0rc1')
{
@@ -126,6 +131,7 @@ class upgradeModel extends model
$this->upgradeFrom1_5To2_0();
$this->upgradeFrom2_0To2_1();
$this->upgradeFrom2_1To2_2();
$this->upgradeFrom2_2To2_3();
}
elseif($fromVersion == '1_0rc2')
{
@@ -139,6 +145,7 @@ class upgradeModel extends model
$this->upgradeFrom1_5To2_0();
$this->upgradeFrom2_0To2_1();
$this->upgradeFrom2_1To2_2();
$this->upgradeFrom2_2To2_3();
}
elseif($fromVersion == '1_0')
{
@@ -151,6 +158,7 @@ class upgradeModel extends model
$this->upgradeFrom1_5To2_0();
$this->upgradeFrom2_0To2_1();
$this->upgradeFrom2_1To2_2();
$this->upgradeFrom2_2To2_3();
}
elseif($fromVersion == '1_0_1')
{
@@ -162,6 +170,7 @@ class upgradeModel extends model
$this->upgradeFrom1_5To2_0();
$this->upgradeFrom2_0To2_1();
$this->upgradeFrom2_1To2_2();
$this->upgradeFrom2_2To2_3();
}
elseif($fromVersion == '1_1')
{
@@ -172,6 +181,7 @@ class upgradeModel extends model
$this->upgradeFrom1_5To2_0();
$this->upgradeFrom2_0To2_1();
$this->upgradeFrom2_1To2_2();
$this->upgradeFrom2_2To2_3();
}
elseif($fromVersion == '1_2')
{
@@ -181,6 +191,7 @@ class upgradeModel extends model
$this->upgradeFrom1_5To2_0();
$this->upgradeFrom2_0To2_1();
$this->upgradeFrom2_1To2_2();
$this->upgradeFrom2_2To2_3();
}
elseif($fromVersion == '1_3')
{
@@ -189,6 +200,7 @@ class upgradeModel extends model
$this->upgradeFrom1_5To2_0();
$this->upgradeFrom2_0To2_1();
$this->upgradeFrom2_1To2_2();
$this->upgradeFrom2_2To2_3();
}
elseif($fromVersion == '1_4')
{
@@ -196,21 +208,29 @@ class upgradeModel extends model
$this->upgradeFrom1_5To2_0();
$this->upgradeFrom2_0To2_1();
$this->upgradeFrom2_1To2_2();
$this->upgradeFrom2_2To2_3();
}
elseif($fromVersion == '1_5')
{
$this->upgradeFrom1_5To2_0();
$this->upgradeFrom2_0To2_1();
$this->upgradeFrom2_1To2_2();
$this->upgradeFrom2_2To2_3();
}
elseif($fromVersion == '2_0')
{
$this->upgradeFrom2_0To2_1();
$this->upgradeFrom2_1To2_2();
$this->upgradeFrom2_2To2_3();
}
elseif($fromVersion == '2_1')
{
$this->upgradeFrom2_1To2_2();
$this->upgradeFrom2_2To2_3();
}
elseif($fromVersion == '2_2')
{
$this->upgradeFrom2_2To2_3();
}
$this->setting->setSN();
@@ -241,6 +261,8 @@ class upgradeModel extends model
$confirmContent .= file_get_contents($this->getUpgradeFile('1.4'));
$confirmContent .= file_get_contents($this->getUpgradeFile('1.5'));
$confirmContent .= file_get_contents($this->getUpgradeFile('2.0'));
$confirmContent .= file_get_contents($this->getUpgradeFile('2.1'));
$confirmContent .= file_get_contents($this->getUpgradeFile('2.2'));
}
elseif($fromVersion == '0_4beta')
{
@@ -256,6 +278,8 @@ class upgradeModel extends model
$confirmContent .= file_get_contents($this->getUpgradeFile('1.4'));
$confirmContent .= file_get_contents($this->getUpgradeFile('1.5'));
$confirmContent .= file_get_contents($this->getUpgradeFile('2.0'));
$confirmContent .= file_get_contents($this->getUpgradeFile('2.1'));
$confirmContent .= file_get_contents($this->getUpgradeFile('2.2'));
}
elseif($fromVersion == '0_5beta')
{
@@ -270,6 +294,8 @@ class upgradeModel extends model
$confirmContent .= file_get_contents($this->getUpgradeFile('1.4'));
$confirmContent .= file_get_contents($this->getUpgradeFile('1.5'));
$confirmContent .= file_get_contents($this->getUpgradeFile('2.0'));
$confirmContent .= file_get_contents($this->getUpgradeFile('2.1'));
$confirmContent .= file_get_contents($this->getUpgradeFile('2.2'));
}
elseif($fromVersion == '0_6beta')
{
@@ -283,6 +309,8 @@ class upgradeModel extends model
$confirmContent .= file_get_contents($this->getUpgradeFile('1.4'));
$confirmContent .= file_get_contents($this->getUpgradeFile('1.5'));
$confirmContent .= file_get_contents($this->getUpgradeFile('2.0'));
$confirmContent .= file_get_contents($this->getUpgradeFile('2.1'));
$confirmContent .= file_get_contents($this->getUpgradeFile('2.2'));
}
elseif($fromVersion == '1_0beta')
{
@@ -295,6 +323,8 @@ class upgradeModel extends model
$confirmContent .= file_get_contents($this->getUpgradeFile('1.4'));
$confirmContent .= file_get_contents($this->getUpgradeFile('1.5'));
$confirmContent .= file_get_contents($this->getUpgradeFile('2.0'));
$confirmContent .= file_get_contents($this->getUpgradeFile('2.1'));
$confirmContent .= file_get_contents($this->getUpgradeFile('2.2'));
}
elseif($fromVersion == '1_0rc1')
{
@@ -306,6 +336,8 @@ class upgradeModel extends model
$confirmContent .= file_get_contents($this->getUpgradeFile('1.4'));
$confirmContent .= file_get_contents($this->getUpgradeFile('1.5'));
$confirmContent .= file_get_contents($this->getUpgradeFile('2.0'));
$confirmContent .= file_get_contents($this->getUpgradeFile('2.1'));
$confirmContent .= file_get_contents($this->getUpgradeFile('2.2'));
}
elseif($fromVersion == '1_0rc2' || $fromVersion == '1_0' || $fromVersion == '1_0_1')
{
@@ -316,6 +348,8 @@ class upgradeModel extends model
$confirmContent .= file_get_contents($this->getUpgradeFile('1.4'));
$confirmContent .= file_get_contents($this->getUpgradeFile('1.5'));
$confirmContent .= file_get_contents($this->getUpgradeFile('2.0'));
$confirmContent .= file_get_contents($this->getUpgradeFile('2.1'));
$confirmContent .= file_get_contents($this->getUpgradeFile('2.2'));
}
elseif($fromVersion == '1_1')
{
@@ -325,6 +359,8 @@ class upgradeModel extends model
$confirmContent .= file_get_contents($this->getUpgradeFile('1.4'));
$confirmContent .= file_get_contents($this->getUpgradeFile('1.5'));
$confirmContent .= file_get_contents($this->getUpgradeFile('2.0'));
$confirmContent .= file_get_contents($this->getUpgradeFile('2.1'));
$confirmContent .= file_get_contents($this->getUpgradeFile('2.2'));
}
elseif($fromVersion == '1_2')
{
@@ -333,6 +369,8 @@ class upgradeModel extends model
$confirmContent .= file_get_contents($this->getUpgradeFile('1.4'));
$confirmContent .= file_get_contents($this->getUpgradeFile('1.5'));
$confirmContent .= file_get_contents($this->getUpgradeFile('2.0'));
$confirmContent .= file_get_contents($this->getUpgradeFile('2.1'));
$confirmContent .= file_get_contents($this->getUpgradeFile('2.2'));
}
elseif($fromVersion == '1_3')
{
@@ -340,25 +378,38 @@ class upgradeModel extends model
$confirmContent .= file_get_contents($this->getUpgradeFile('1.4'));
$confirmContent .= file_get_contents($this->getUpgradeFile('1.5'));
$confirmContent .= file_get_contents($this->getUpgradeFile('2.0'));
$confirmContent .= file_get_contents($this->getUpgradeFile('2.1'));
$confirmContent .= file_get_contents($this->getUpgradeFile('2.2'));
}
elseif($fromVersion == '1_4')
{
$confirmContent .= file_get_contents($this->getUpgradeFile('1.4'));
$confirmContent .= file_get_contents($this->getUpgradeFile('1.5'));
$confirmContent .= file_get_contents($this->getUpgradeFile('2.0'));
$confirmContent .= file_get_contents($this->getUpgradeFile('2.1'));
$confirmContent .= file_get_contents($this->getUpgradeFile('2.2'));
}
elseif($fromVersion == '1_5')
{
$confirmContent .= file_get_contents($this->getUpgradeFile('1.5'));
$confirmContent .= file_get_contents($this->getUpgradeFile('2.0'));
$confirmContent .= file_get_contents($this->getUpgradeFile('2.1'));
$confirmContent .= file_get_contents($this->getUpgradeFile('2.2'));
}
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'));
}
elseif($fromVersion == '2_1')
{
$confirmContent .= file_get_contents($this->getUpgradeFile('2.1'));
$confirmContent .= file_get_contents($this->getUpgradeFile('2.2'));
}
elseif($fromVersion == '2_2')
{
$confirmContent .= file_get_contents($this->getUpgradeFile('2.2'));
}
return str_replace('zt_', $this->config->db->prefix, $confirmContent);
@@ -559,6 +610,18 @@ class upgradeModel extends model
if(!$this->isError()) $this->setting->updateVersion('2.2');
}
/**
* Upgrade from 2.2 to 2.3.
*
* @access private
* @return void
*/
private function upgradeFrom2_2To2_3()
{
$this->execSQL($this->getUpgradeFile('2.2'));
if(!$this->isError()) $this->setting->updateVersion('2.3');
}
/**
* Update company field.
*
@@ -799,6 +862,17 @@ class upgradeModel extends model
}
}
/**
* Update confirm of Bug.
*
* @access public
* @return void
*/
public function updateConfirmOfBug()
{
$this->dao->update(TABLE_BUG)->set('confirm')->eq(1)->where('status')->eq('resolved')->exec();
}
/**
* Get the upgrade sql file.
*