[Svn-src-all:1516] [version-2_5-dev 20412] refs #1038
shutta
admin @ mail.ec-cube.net
2011年 2月 25日 (金) 22:31:31 JST
Subversion committed to /home/svn/open 20412
http://svn.ec-cube.net/open_trac/changeset/20412
┌────────────────────────────┐
│更新者 : shutta │
│更新日時: 2011-02-25 22:31:31 +0900 (金, 25 2月 2011)│
└────────────────────────────┘
Log:
--------------------------------------------------------
refs #1038
r20391 への修正。
並び順の処理を直せていなかった。
Changed: [U:修正,A:追加,D:削除]
--------------------------------------------------------
U branches/version-2_5-dev/data/class/pages/admin/contents/LC_Page_Admin_Contents_RecommendSearch.php
変更: branches/version-2_5-dev/data/class/pages/admin/contents/LC_Page_Admin_Contents_RecommendSearch.php
===================================================================
--- branches/version-2_5-dev/data/class/pages/admin/contents/LC_Page_Admin_Contents_RecommendSearch.php 2011-02-25 12:44:58 UTC (rev 20411)
+++ branches/version-2_5-dev/data/class/pages/admin/contents/LC_Page_Admin_Contents_RecommendSearch.php 2011-02-25 13:31:31 UTC (rev 20412)
@@ -81,9 +81,6 @@
if (SC_Utils_Ex::isBlank($this->arrErr)) {
$objProduct = new SC_Product();
- $where = 'del_flg = 0';
- $order = "update_date DESC, product_id DESC";
-
$wheres = $this->createWhere($objFormParam,$objDb);
$this->tpl_linemax = $this->getLineCount($wheres,$objProduct);
@@ -95,9 +92,7 @@
$startno = $objNavi->start_row;
$arrProduct_id = $this->getProducts($wheres, $objProduct, $page_max, $startno);
- $productList = $this->getProductList($arrProduct_id,$objProduct);
- //取得している並び順で並び替え
- $this->arrProducts = $this->sortProducts($arrProduct_id,$productList);
+ $this->arrProducts = $this->getProductList($arrProduct_id,$objProduct);
}
break;
default:
@@ -210,8 +205,6 @@
$objQuery->setWhere($where);
// 取得範囲の指定(開始行番号、行数のセット)
$objQuery->setLimitOffset($page_max, $startno);
- // 表示順序
- $objQuery->setOrder($order);
// 検索結果の取得
return $objProduct->findProductIdsOrder($objQuery, $bind);
@@ -233,24 +226,10 @@
}
$objQuery =& SC_Query::getSingletonInstance();
$objQuery->setWhere($where);
+ // 表示順序
+ $order = "update_date DESC, product_id DESC";
+ $objQuery->setOrder($order);
return $objProduct->lists($objQuery, $arrProduct_id);
}
-
- /**
- * 取得している並び順で並び替え
- * @param $arrProduct_id
- * @param $productList
- */
- function sortProducts($arrProduct_id,$productList){
- $products = array();
- foreach($productList as $item) {
- $products[ $item['product_id'] ] = $item;
- }
- $arrProducts = array();
- foreach($arrProduct_id as $product_id) {
- $arrProducts[] = $products[$product_id];
- }
- return $arrProducts;
- }
}
?>
Svn-src-all メーリングリストの案内