* finish task #2168.

This commit is contained in:
wangyidong
2014-12-09 08:22:38 +00:00
parent 7ae6a6838d
commit 9409592b73
+2
View File
@@ -646,6 +646,7 @@ class commonModel extends model
$preAndNextObject = new stdClass();
if(strpos('story, task, bug, testcase, doc', $type) === false) return $preAndNextObject;
if($this->session->{$type . 'PreAndNext'} and $this->session->{$type . 'PreAndNext'}['objectID'] == $objectID) return $this->session->{$type . 'PreAndNext'}['preAndNextObject'];
$table = $this->config->objectTables[$type];
/* Get objectIDs. */
@@ -692,6 +693,7 @@ class commonModel extends model
if($preObj !== true) $preObj = $object;
}
$this->session->set($type . 'PreAndNext', array('objectID' => $objectID, 'preAndNextObject' => $preAndNextObject));
return $preAndNextObject;
}