Changeset 20412
- Timestamp:
- 2011/02/25 22:31:31 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_5-dev/data/class/pages/admin/contents/LC_Page_Admin_Contents_RecommendSearch.php
r20392 r20412 82 82 $objProduct = new SC_Product(); 83 83 84 $where = 'del_flg = 0';85 $order = "update_date DESC, product_id DESC";86 87 84 $wheres = $this->createWhere($objFormParam,$objDb); 88 85 $this->tpl_linemax = $this->getLineCount($wheres,$objProduct); … … 96 93 97 94 $arrProduct_id = $this->getProducts($wheres, $objProduct, $page_max, $startno); 98 $productList = $this->getProductList($arrProduct_id,$objProduct); 99 //取得している並び順で並び替え 100 $this->arrProducts = $this->sortProducts($arrProduct_id,$productList); 95 $this->arrProducts = $this->getProductList($arrProduct_id,$objProduct); 101 96 } 102 97 break; … … 211 206 // 取得範囲の指定(開始行番号、行数のセット) 212 207 $objQuery->setLimitOffset($page_max, $startno); 213 // 表示順序214 $objQuery->setOrder($order);215 208 216 209 // 検索結果の取得 … … 234 227 $objQuery =& SC_Query::getSingletonInstance(); 235 228 $objQuery->setWhere($where); 229 // 表示順序 230 $order = "update_date DESC, product_id DESC"; 231 $objQuery->setOrder($order); 236 232 return $objProduct->lists($objQuery, $arrProduct_id); 237 }238 239 /**240 * 取得している並び順で並び替え241 * @param $arrProduct_id242 * @param $productList243 */244 function sortProducts($arrProduct_id,$productList){245 $products = array();246 foreach($productList as $item) {247 $products[ $item['product_id'] ] = $item;248 }249 $arrProducts = array();250 foreach($arrProduct_id as $product_id) {251 $arrProducts[] = $products[$product_id];252 }253 return $arrProducts;254 233 } 255 234 }
Note: See TracChangeset
for help on using the changeset viewer.