* refactory.

* mv objectTables to config/config.php from action/config.php.
This commit is contained in:
wangyidong
2013-01-08 08:03:02 +00:00
parent 848f20cd1f
commit 8ea3c3b1db
4 changed files with 23 additions and 31 deletions
+2 -9
View File
@@ -491,15 +491,8 @@ class commonModel extends model
{
$preAndNextObject = new stdClass();
switch($type)
{
case 'story' : $table = TABLE_STORY; break;
case 'task' : $table = TABLE_TASK; break;
case 'bug' : $table = TABLE_BUG; break;
case 'testcase' : $table = TABLE_CASE; break;
case 'doc' : $table = TABLE_DOC; break;
default : return $preAndNextObject;
}
if(strpos('story, task, bug, testcase, doc', $type) === false) return $preAndNextObject;
$table = $this->config->objectTables[$type];
$typeIDs = $type . 'IDs';
if($this->session->$typeIDs and strpos($this->session->$typeIDs, ',' . $objectID . ',') !== false)