Changeset 16598
- Timestamp:
- 2007/10/29 20:29:57 (16 years ago)
- Location:
- branches/feature-module-update/data/class
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/feature-module-update/data/class/helper/SC_Helper_DB.php
r16582 r16598 1149 1149 // 自身のランクを取得する 1150 1150 $rank = $objQuery->get($tableName, "rank", "$keyIdColumn = ?", array($keyId)); 1151 $max = $objQuery->max($tableName, "rank", $where, array($keyId)); 1151 1152 $max = $objQuery->max($tableName, "rank", $where); 1152 1153 1153 1154 // 値の調整(逆順) … … 1160 1161 } 1161 1162 1162 if( $position > $rank ) $term = "rank - 1"; //入れ替え先の順位が入れ換え元の順位より大きい場合 1163 if( $position < $rank ) $term = "rank + 1"; //入れ替え先の順位が入れ換え元の順位より小さい場合 1163 //入れ替え先の順位が入れ換え元の順位より大きい場合 1164 if( $position > $rank ) $term = "rank - 1"; 1165 1166 //入れ替え先の順位が入れ換え元の順位より小さい場合 1167 if( $position < $rank ) $term = "rank + 1"; 1168 1169 // XXX 入れ替え先の順位が入れ替え元の順位と同じ場合 1170 if (!isset($term)) $term = "rank"; 1164 1171 1165 1172 // 指定した順位の商品から移動させる商品までのrankを1つずらす -
branches/feature-module-update/data/class/pages/admin/products/LC_Page_Admin_Products_ProductRank.php
r16582 r16598 69 69 // 通常時は親カテゴリを0に設定する。 70 70 $this->arrForm['parent_category_id'] = 71 isset($_POST['parent_category_id']) ? $_POST['parent_category_id'] : "";71 isset($_POST['parent_category_id']) ? $_POST['parent_category_id'] : 0; 72 72 73 73 if (!isset($_POST['mode'])) $_POST['mode'] = ""; … … 86 86 if(SC_Utils_Ex::sfIsInt($input_pos)) { 87 87 $where = "category_id = " . SC_Utils_Ex::sfQuoteSmart($_POST['parent_category_id']); 88 $objDb->sfMoveRank("dtb_product_categories", "product_id", $_POST['product_id'], $input_pos, "category_id = ?");88 $objDb->sfMoveRank("dtb_product_categories", "product_id", $_POST['product_id'], $input_pos, $where); 89 89 } 90 90 break; … … 137 137 $objQuery->setorder("rank DESC"); 138 138 139 // viewも絞込みをかける(mysql用)140 //sfViewWhere("&&noncls_where&&", $where, array($category_id), $objQuery->order . " " . $objQuery->setlimitoffset(SEARCH_PMAX, $startno, true)); TODO141 142 139 $arrRet = $objQuery->select($col, $table, $where, array($category_id)); 143 140 return $arrRet;
Note: See TracChangeset
for help on using the changeset viewer.