* fix a bug for batchcreate task.

This commit is contained in:
wyd621
2014-03-19 01:21:25 +00:00
parent 7ce1b3428d
commit 0c9211a2b1
5 changed files with 16 additions and 15 deletions

View File

@@ -827,7 +827,9 @@ class treeModel extends model
*/
public function getStoryModule($moduleID)
{
$module = $this->dao->select('id,type,parent')->from(TABLE_MODULE)->where('id')->eq($moduleID)->fetch();
$module = $this->dao->select('id,type,parent')->from(TABLE_MODULE)->where('id')->eq((int)$moduleID)->fetch();
if(empty($module)) return 0;
if($module->id and $module->type != 'story')
{
$module = $this->dao->select('id,type,parent')->from(TABLE_MODULE)->where('id')->eq($module->parent)->fetch();