* code for task#1552.
This commit is contained in:
@@ -803,6 +803,24 @@ class treeModel extends model
|
||||
return $this->dao->select('name')->from(TABLE_PRODUCT)->where('id')->eq($module->root)->fetch();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the module that its type == 'story'.
|
||||
*
|
||||
* @param int $moduleID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function getStoryModule($moduleID)
|
||||
{
|
||||
$module = $this->dao->select('id,type,parent')->from(TABLE_MODULE)->where('id')->eq($moduleID)->fetch();
|
||||
while($module->id and $module->type != 'story')
|
||||
{
|
||||
$module = $this->dao->select('id,type,parent')->from(TABLE_MODULE)->where('id')->eq($module->parent)->fetch();
|
||||
}
|
||||
|
||||
return $module->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Update modules' order.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user