* Code for product order.
This commit is contained in:
@@ -1258,7 +1258,7 @@ class product extends control
|
||||
$pager = new pager($recTotal, $recPerPage, $pageID);
|
||||
|
||||
/* Process product structure. */
|
||||
if($this->config->systemMode == 'classic' and $orderBy == 'program_asc') $orderBy = 'order_desc';
|
||||
if($this->config->systemMode == 'classic' and $orderBy == 'program_asc') $orderBy = 'order_asc';
|
||||
$productStats = $this->product->getStats($orderBy, $pager, $browseType, '', 'story', '', $queryID);
|
||||
$productStructure = $this->product->statisticProgram($productStats);
|
||||
$productLines = $this->dao->select('*')->from(TABLE_MODULE)->where('type')->eq('line')->andWhere('deleted')->eq(0)->orderBy('`order` asc')->fetchAll();
|
||||
@@ -1270,7 +1270,7 @@ class product extends control
|
||||
$programLines[$productLine->root][$productLine->id] = $productLine->name;
|
||||
}
|
||||
|
||||
$actionURL = $this->createLink('product', 'all', "browseType=bySearch&orderBy=order_desc&queryID=myQueryID");
|
||||
$actionURL = $this->createLink('product', 'all', "browseType=bySearch&orderBy=order_asc&queryID=myQueryID");
|
||||
$this->product->buildProductSearchForm($param, $actionURL);
|
||||
|
||||
$this->view->title = $this->lang->product->common;
|
||||
|
||||
@@ -278,7 +278,7 @@ class productModel extends model
|
||||
->orWhere('t1.createdBy')->eq($this->app->user->account)
|
||||
->markRight(1)
|
||||
->fi()
|
||||
->orderBy('t2.order_asc, t1.line_desc, t1.order_desc')
|
||||
->orderBy('t2.order_asc, t1.line_desc, t1.order_asc')
|
||||
->beginIF($limit > 0)->limit($limit)->fi()
|
||||
->fetchAll('id');
|
||||
}
|
||||
@@ -351,7 +351,7 @@ class productModel extends model
|
||||
->beginIF(strpos($mode, 'noclosed') !== false)->andWhere('t1.status')->ne('closed')->fi()
|
||||
->beginIF(!$this->app->user->admin and $this->config->vision == 'rnd')->andWhere('t1.id')->in($views)->fi()
|
||||
->andWhere('t1.vision')->eq($this->config->vision)
|
||||
->orderBy('isClosed, t2.order_asc, t1.line_desc, t1.order_desc')
|
||||
->orderBy('isClosed, t2.order_asc, t1.line_desc, t1.order_asc')
|
||||
->fetchPairs('id', 'name');
|
||||
}
|
||||
else
|
||||
@@ -1675,7 +1675,7 @@ class productModel extends model
|
||||
$products = $this->dao->select('t1.id as id, t1.*')->from(TABLE_PRODUCT)->alias('t1')
|
||||
->leftJoin(TABLE_PROGRAM)->alias('t2')->on('t1.program = t2.id')
|
||||
->where('t1.id')->in($productKeys)
|
||||
->orderBy('t2.order_asc, t1.line_desc, t1.order_desc')
|
||||
->orderBy('t2.order_asc, t1.line_desc, t1.order_asc')
|
||||
->page($pager)
|
||||
->fetchAll('id');
|
||||
}
|
||||
|
||||
@@ -132,7 +132,7 @@ class program extends control
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function product($programID = 0, $browseType = 'noclosed', $orderBy = 'order_desc', $recTotal = 0, $recPerPage = 15, $pageID = 1)
|
||||
public function product($programID = 0, $browseType = 'noclosed', $orderBy = 'order_asc', $recTotal = 0, $recPerPage = 15, $pageID = 1)
|
||||
{
|
||||
$programPairs = $this->program->getPairs();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user