* only set image size when view a product plan.
This commit is contained in:
@@ -128,7 +128,7 @@ class productplan extends control
|
||||
{
|
||||
$this->session->set('storyList', $this->app->getURI(true));
|
||||
|
||||
$plan = $this->productplan->getByID($planID);
|
||||
$plan = $this->productplan->getByID($planID, true);
|
||||
if(!$plan) die(js::error($this->lang->notFound) . js::locate('back'));
|
||||
|
||||
$this->commonAction($plan->product);
|
||||
|
||||
@@ -17,13 +17,14 @@ class productplanModel extends model
|
||||
* Get plan by id.
|
||||
*
|
||||
* @param int $planID
|
||||
* @param bool $setImgSize
|
||||
* @access public
|
||||
* @return object
|
||||
*/
|
||||
public function getByID($planID)
|
||||
public function getByID($planID, $setImgSize = false)
|
||||
{
|
||||
$plan = $this->dao->findByID((int)$planID)->from(TABLE_PRODUCTPLAN)->fetch();
|
||||
$plan->desc = $this->loadModel('file')->setImgSize($plan->desc);
|
||||
if($setImgSize) $plan->desc = $this->loadModel('file')->setImgSize($plan->desc);
|
||||
return $plan;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user