Changeset 21514 for branches/version-2_12-dev/data/class/pages/admin/products/LC_Page_Admin_Products_ProductRank.php
- Timestamp:
- 2012/02/15 19:56:17 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_12-dev/data/class/pages/admin/products/LC_Page_Admin_Products_ProductRank.php
r21481 r21514 90 90 case 'tree': 91 91 // カテゴリの切替は、ページ番号をクリアする。 92 $this->tpl_pageno = "";92 $this->tpl_pageno = ''; 93 93 break; 94 94 case 'renumber': … … 119 119 // FIXME SC_Product クラスを使用した実装 120 120 $objQuery =& SC_Query_Ex::getSingletonInstance(); 121 $col = "product_id, name, main_list_image, product_code_min, product_code_max, status";121 $col = 'product_id, name, main_list_image, product_code_min, product_code_max, status'; 122 122 $objProduct = new SC_Product(); 123 123 $table = $objProduct->alldtlSQL(); 124 $table.= " LEFT JOIN dtb_product_categories AS T5 USING(product_id)";125 $where = "del_flg = 0 AND category_id = ?";124 $table.= ' LEFT JOIN dtb_product_categories AS T5 USING(product_id)'; 125 $where = 'del_flg = 0 AND category_id = ?'; 126 126 127 127 // 行数の取得 … … 140 140 $objQuery->setLimitOffset(SEARCH_PMAX, $startno); 141 141 142 $objQuery->setOrder( "rank DESC, product_id DESC");142 $objQuery->setOrder('rank DESC, product_id DESC'); 143 143 144 144 $arrRet = $objQuery->select($col, $table, $where, array($category_id)); … … 175 175 176 176 function lfRankUp(&$objDb, $parent_category_id, $product_id) { 177 $where = "category_id = ". SC_Utils_Ex::sfQuoteSmart($parent_category_id);177 $where = 'category_id = ' . SC_Utils_Ex::sfQuoteSmart($parent_category_id); 178 178 $objDb->sfRankUp('dtb_product_categories', 'product_id', $product_id, $where); 179 179 } 180 180 181 181 function lfRankDown(&$objDb, $parent_category_id, $product_id) { 182 $where = "category_id = ". SC_Utils_Ex::sfQuoteSmart($parent_category_id);182 $where = 'category_id = ' . SC_Utils_Ex::sfQuoteSmart($parent_category_id); 183 183 $objDb->sfRankDown('dtb_product_categories', 'product_id', $product_id, $where); 184 184 } 185 185 186 186 function lfRankMove(&$objDb, $parent_category_id, $product_id) { 187 $key = "pos-".$product_id;187 $key = 'pos-'.$product_id; 188 188 $input_pos = mb_convert_kana($_POST[$key], 'n'); 189 189 if (SC_Utils_Ex::sfIsInt($input_pos)) { 190 $where = "category_id = ". SC_Utils_Ex::sfQuoteSmart($parent_category_id);190 $where = 'category_id = ' . SC_Utils_Ex::sfQuoteSmart($parent_category_id); 191 191 $objDb->sfMoveRank('dtb_product_categories', 'product_id', $product_id, $input_pos, $where); 192 192 }
Note: See TracChangeset
for help on using the changeset viewer.