diff --git a/module/product/model.php b/module/product/model.php index 16f7959ddc..2c8dc934be 100644 --- a/module/product/model.php +++ b/module/product/model.php @@ -282,7 +282,7 @@ class productModel extends model { if(defined('TUTORIAL')) return $this->loadModel('tutorial')->getProductPairs(); - if(!empty($append) and is_array($append)) $append = implode($append, ','); + if(!empty($append) and is_array($append)) $append = implode(',', $append); $views = empty($append) ? $this->app->user->view->products : $this->app->user->view->products . ",$append"; $orderBy = !empty($this->config->product->orderBy) ? $this->config->product->orderBy : 'isClosed'; @@ -358,7 +358,7 @@ class productModel extends model return $this->loadModel('tutorial')->getExecutionProducts(); } - if(!empty($append) and is_array($append)) $append = implode($append, ','); + if(!empty($append) and is_array($append)) $append = implode(',', $append); $views = empty($append) ? $this->app->user->view->products : $this->app->user->view->products . ",$append"; $projectProducts = $this->dao->select('t1.branch, t1.plan, t2.*') diff --git a/module/program/model.php b/module/program/model.php index a041e8bf18..7720a4b932 100644 --- a/module/program/model.php +++ b/module/program/model.php @@ -81,7 +81,7 @@ class programModel extends model } /* When mode equals assign and programID equals 0, you can query the standalone product. */ - if(!empty($append) and is_array($append)) $append = implode($append, ','); + if(!empty($append) and is_array($append)) $append = implode(',', $append); $views = empty($append) ? $this->app->user->view->products : $this->app->user->view->products . ",$append"; $products = $this->dao->select('*')->from(TABLE_PRODUCT)