* Fix bug #3456.
This commit is contained in:
+34
-13
@@ -11,23 +11,44 @@
|
||||
*/
|
||||
class design extends control
|
||||
{
|
||||
/**
|
||||
* Browse designs.
|
||||
*
|
||||
* @param int $productID
|
||||
* @param string $type all|bySearch|HLDS|DDS|DBDS|ADS
|
||||
* @param string $param
|
||||
* @param string $orderBy
|
||||
* @param int $recTotal
|
||||
* @param int $recPerPage
|
||||
* @param int $pageID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public $products = array();
|
||||
|
||||
/**
|
||||
* Construct function, load module auto.
|
||||
*
|
||||
* @param string $moduleName
|
||||
* @param string $methodName
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function __construct($moduleName = '', $methodName = '')
|
||||
{
|
||||
parent::__construct($moduleName, $methodName);
|
||||
$products = array();
|
||||
$this->loadModel('product');
|
||||
$this->view->products = $this->products = $this->product->getPairs('nocode', $this->session->program);
|
||||
|
||||
if(empty($this->products)) die($this->locate($this->createLink('product', 'showErrorNone', "fromModule=design")));
|
||||
}
|
||||
|
||||
/**
|
||||
* Browse designs.
|
||||
*
|
||||
* @param int $productID
|
||||
* @param string $type all|bySearch|HLDS|DDS|DBDS|ADS
|
||||
* @param string $param
|
||||
* @param string $orderBy
|
||||
* @param int $recTotal
|
||||
* @param int $recPerPage
|
||||
* @param int $pageID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function browse($productID = 0, $type = 'all', $param = '', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
|
||||
{
|
||||
/* Save session for design list and process product id. */
|
||||
$this->session->set('designList', $this->app->getURI(true));
|
||||
$productID = $this->product->saveState($productID, $this->products);
|
||||
$this->design->setProductMenu($productID);
|
||||
|
||||
/* Build the search form. */
|
||||
|
||||
@@ -73,7 +73,7 @@ class designModel extends model
|
||||
if(!trim($name)) continue;
|
||||
|
||||
$design = new stdclass();
|
||||
$design->story = $data->story[$i];
|
||||
$design->story = isset($data->story[$i]) ? $data->story[$i] : '';
|
||||
$design->type = $data->type[$i];
|
||||
$design->name = $name;
|
||||
$design->product = $productID;
|
||||
|
||||
Reference in New Issue
Block a user