diff --git a/module/program/model.php b/module/program/model.php index 193421e694..891e8851d7 100644 --- a/module/program/model.php +++ b/module/program/model.php @@ -458,6 +458,7 @@ class programModel extends model ->fi() ->beginIF($from == 'product') ->andWhere('type')->eq('program') + ->andWhere('grade')->eq(1) ->andWhere('id')->in($this->app->user->view->programs) ->fi() ->beginIF(!$this->cookie->showClosed)->andWhere('status')->ne('closed')->fi() diff --git a/module/project/control.php b/module/project/control.php index 61d135df3e..b0eee75d1d 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -2332,7 +2332,7 @@ class project extends control return $this->send(array('result' => 'fail')); } - $idList = explode(',', $this->post->projects); + $idList = explode(',', trim($this->post->projects, ',')); $projects = $this->dao->select('id, `order`')->from(TABLE_PROJECT) ->where('id')->in($idList) ->fetchPairs('id', 'order');