* finish the task #544.

This commit is contained in:
shiyangyangwork@yahoo.cn
2011-10-12 03:32:43 +00:00
parent c4d240615f
commit 98dc79b954
+20
View File
@@ -779,6 +779,26 @@ class upgradeModel extends model
/* Update action name. */
}
/**
* Update activated count of Bug.
*
* @access public
* @return void
*/
private function updateActivatedCountOfBug()
{
$bugActivatedActions = $this->dao->select('*')->from(TABLE_ACTION)->where('action')->eq('activated')->andWhere('objectType')->eq('bug')->fetchAll();
foreach($bugActivatedActions as $action)
{
if(!isset($counts[$action->objectID])) $counts[$action->objectID] = 0;
$counts[$action->objectID] ++;
}
foreach($counts as $key => $count)
{
$this->dao->update(TABLE_BUG)->set('activatedCount')->eq($count)->where('id')->eq($key)->exec();
}
}
/**
* Get the upgrade sql file.
*