From f5b311cd0f71dec01ca9cc0684bca0d45db1a48c Mon Sep 17 00:00:00 2001 From: xia0ta0 Date: Thu, 30 Oct 2014 14:50:06 +0800 Subject: [PATCH] * fix bug: get stories of custom child module error. --- module/tree/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/tree/model.php b/module/tree/model.php index 6231c0c7d1..270c561a20 100644 --- a/module/tree/model.php +++ b/module/tree/model.php @@ -875,7 +875,7 @@ class treeModel extends model $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') + while(!empty($module) and $module->id and $module->type != 'story') { $module = $this->dao->select('id,type,parent')->from(TABLE_MODULE)->where('id')->eq($module->parent)->fetch(); }