* only set image size when view a product plan.

This commit is contained in:
wangchunsheng
2012-04-30 06:03:54 +00:00
parent ff7e2ac48c
commit bdb9f884e3
2 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -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);
+3 -2
View File
@@ -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;
}