diff --git a/module/build/model.php b/module/build/model.php index c3b06200cb..4dd05b93e9 100644 --- a/module/build/model.php +++ b/module/build/model.php @@ -144,21 +144,21 @@ class buildModel extends model $this->session->set('projectBuildForm', $query->form); } } - if($this->session->PRJBuildQuery == false) $this->session->set('projectBuildQuery', ' 1 = 1'); + if($this->session->projectBuildQuery == false) $this->session->set('projectBuildQuery', ' 1 = 1'); - $buildQuery = $this->session->PRJBuildQuery; + $buildQuery = $this->session->projectBuildQuery; /* Distinguish between repeated fields. */ $fields = array('id' => '`id`', 'name' => '`name`', 'product' => '`product`', 'desc' => '`desc`', 'project' => '`project`'); foreach($fields as $field) { - if(strpos($this->session->PRJBuildQuery, $field) !== false) + if(strpos($this->session->projectBuildQuery, $field) !== false) { $buildQuery = str_replace($field, "t1." . $field, $buildQuery); } } - return $this->getExecutionBuilds($executionID, 'bysearch', $buildQuery); + return $this->getProjectBuilds($projectID, 'bysearch', $buildQuery); } /** diff --git a/module/product/control.php b/module/product/control.php index d123044b39..821cfed376 100644 --- a/module/product/control.php +++ b/module/product/control.php @@ -941,7 +941,7 @@ class product extends control $moduleGroup = zget($this->lang->navGroup, $module); $moduleGroup = in_array($moduleGroup, array('product', 'qa'))? $moduleGroup : 'project'; - $products = $moduleGroup == 'project' ? $this->product->getProducts($this->session->PRJ, 'all', 'program desc, line desc, ') : $this->product->getList(0, 'all', 0, 0, 'program desc, line desc, '); + $products = $moduleGroup == 'project' ? $this->product->getProducts($this->session->PRJ) : $this->product->getList(); $this->view->link = $this->product->getProductLink($module, $method, $extra); $this->view->productID = $productID; diff --git a/module/product/model.php b/module/product/model.php index 9274c2bb98..c10a8542b4 100644 --- a/module/product/model.php +++ b/module/product/model.php @@ -258,7 +258,7 @@ class productModel extends model * @access public * @return array */ - public function getList($programID = 0, $status = 'all', $limit = 0, $line = 0, $orderBy = '') + public function getList($programID = 0, $status = 'all', $limit = 0, $line = 0) { return $this->dao->select('*')->from(TABLE_PRODUCT) ->where('deleted')->eq(0) @@ -274,7 +274,7 @@ class productModel extends model ->orWhere('createdBy')->eq($this->app->user->account) ->markRight(1) ->fi() - ->orderBy($orderBy . '`order` desc') + ->orderBy('program_asc,line_desc,order_asc') ->beginIF($limit > 0)->limit($limit)->fi() ->fetchAll('id'); } @@ -1342,7 +1342,7 @@ class productModel extends model $productKeys = array_keys($products); $products = $this->dao->select('*')->from(TABLE_PRODUCT) ->where('id')->in($productKeys) - ->orderBy($orderBy) + ->orderBy('program_asc,line_desc,' . $orderBy) ->page($pager) ->fetchAll('id'); diff --git a/module/program/model.php b/module/program/model.php index 2ab4671d90..0d8aac4ec9 100644 --- a/module/program/model.php +++ b/module/program/model.php @@ -33,7 +33,7 @@ class programModel extends model { $link = html::a(helper::createLink('program', 'browse'), "", '', "style='border: none;'"); $html = "
" . $link . "
"; - return common::hasPriv('program', 'pgmbrowse') ? $html : ''; + return common::hasPriv('program', 'browse') ? $html : ''; } /** @@ -464,7 +464,7 @@ class programModel extends model while($program = $stmt->fetch()) { - $link = $from == 'program' ? helper::createLink('program', 'pgmproduct', "programID=$program->id") : helper::createLink('product', 'all', "programID=$program->id" . $vars); + $link = $from == 'program' ? helper::createLink('program', 'product', "programID=$program->id") : helper::createLink('product', 'all', "programID=$program->id" . $vars); $linkHtml = html::a($link, html::icon($this->lang->icons[$program->type], 'icon icon-sm text-muted') . ' ' . $program->name, '', "id='program$program->id' class='text-ellipsis' title=$program->name"); if(isset($programMenu[$program->id]) and !empty($programMenu[$program->id])) diff --git a/module/program/view/ajaxgetdropmenu.html.php b/module/program/view/ajaxgetdropmenu.html.php index 2e39bd3053..c369546b4e 100644 --- a/module/program/view/ajaxgetdropmenu.html.php +++ b/module/program/view/ajaxgetdropmenu.html.php @@ -9,12 +9,12 @@ $programsPinYin = common::convert2Pinyin($programNames);