* change getStoryStages method name to batchGetStoryStage.
This commit is contained in:
@@ -166,7 +166,7 @@ class product extends control
|
||||
$this->view->moduleID = $moduleID;
|
||||
$this->view->branch = $branch;
|
||||
$this->view->branches = $this->loadModel('branch')->getPairs($productID);
|
||||
$this->view->storyStages = $this->product->getStoryStages($stories);
|
||||
$this->view->storyStages = $this->product->batchGetStoryStage($stories);
|
||||
$this->display();
|
||||
}
|
||||
|
||||
|
||||
@@ -385,19 +385,19 @@ class productModel extends model
|
||||
}
|
||||
|
||||
/**
|
||||
* Get story stages.
|
||||
* Batch get story stage.
|
||||
*
|
||||
* @param array $stories.
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getStoryStages($stories)
|
||||
public function batchGetStoryStage($stories)
|
||||
{
|
||||
/* Set story id list. */
|
||||
$storyIdList = array();
|
||||
foreach($stories as $story) $storyIdList[$story->id] = $story->id;
|
||||
|
||||
return $this->loadModel('story')->getStoryStages($storyIdList);
|
||||
return $this->loadModel('story')->batchGetStoryStage($storyIdList);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1598,13 +1598,13 @@ class storyModel extends model
|
||||
}
|
||||
|
||||
/**
|
||||
* Get story stages.
|
||||
* Batch get story stage.
|
||||
*
|
||||
* @param array $stories
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getStoryStages($stories)
|
||||
public function batchGetStoryStage($stories)
|
||||
{
|
||||
return $this->dao->select('*')->from(TABLE_STORYSTAGE)
|
||||
->where('story')->in($stories)
|
||||
|
||||
Reference in New Issue
Block a user