Changeset 21481 for branches/version-2_12-dev/data/class/pages/admin/products/LC_Page_Admin_Products_UploadCSVCategory.php
- Timestamp:
- 2012/02/11 05:48:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_12-dev/data/class/pages/admin/products/LC_Page_Admin_Products_UploadCSVCategory.php
r21480 r21481 77 77 78 78 $masterData = new SC_DB_MasterData_Ex(); 79 $this->arrAllowedTag = $masterData->getMasterData( "mtb_allowed_tag");79 $this->arrAllowedTag = $masterData->getMasterData('mtb_allowed_tag'); 80 80 $this->arrTagCheckItem = array(); 81 81 } … … 374 374 // 同じidが存在すればupdate存在しなければinsert 375 375 $where = "category_id = ?"; 376 $category_exists = $objQuery->exists( "dtb_category", $where, array($sqlval['category_id']));376 $category_exists = $objQuery->exists('dtb_category', $where, array($sqlval['category_id'])); 377 377 if ($category_exists) { 378 378 // UPDATEの実行 379 379 $where = "category_id = ?"; 380 $objQuery->update( "dtb_category", $sqlval, $where, array($sqlval['category_id']));380 $objQuery->update('dtb_category', $sqlval, $where, array($sqlval['category_id'])); 381 381 } else { 382 382 $sqlval['create_date'] = $arrList['update_date']; … … 434 434 } 435 435 if ($sqlval['parent_category_id'] == "") { 436 $sqlval['parent_category_id'] = (string) "0";436 $sqlval['parent_category_id'] = (string)'0'; 437 437 } 438 438 return $sqlval; … … 457 457 if(array_search('parent_category_id', $this->arrFormKeyList) !== FALSE 458 458 and $item['parent_category_id'] != "" 459 and $item['parent_category_id'] != "0"459 and $item['parent_category_id'] != '0' 460 460 and !SC_Helper_DB_Ex::sfIsRecord('dtb_category', 'category_id', array($item['parent_category_id'])) 461 461 ) { … … 465 465 if(array_search('del_flg', $this->arrFormKeyList) !== FALSE 466 466 and $item['del_flg'] != "") { 467 if (!($item['del_flg'] == "0" or $item['del_flg'] == "1")) {467 if (!($item['del_flg'] == '0' or $item['del_flg'] == '1')) { 468 468 $arrErr['del_flg'] = "※ 削除フラグは「0」(有効)、「1」(削除)のみが有効な値です。"; 469 469 } … … 488 488 // 登録数上限チェック 489 489 $where = "del_flg = 0"; 490 $count = $objQuery->count( "dtb_category", $where);490 $count = $objQuery->count('dtb_category', $where); 491 491 if ($count >= CATEGORY_MAX) { 492 492 $item['category_name'] = "※ カテゴリの登録最大数を超えました。"; … … 495 495 if (array_search('parent_category_id', $this->arrFormKeyList) !== FALSE 496 496 and $item['parent_category_id'] != "") { 497 $level = $objQuery->get('level', "dtb_category", "category_id = ?", array($parent_category_id));497 $level = $objQuery->get('level', 'dtb_category', "category_id = ?", array($parent_category_id)); 498 498 if ($level >= LEVEL_MAX) { 499 499 $arrErr['parent_category_id'] = "※ " . LEVEL_MAX . "階層以上の登録はできません。"; … … 519 519 // ROOT階層で最大のランクを取得する。 520 520 $where = "parent_category_id = ?"; 521 $rank = $objQuery->max('rank', "dtb_category", $where, array($parent_category_id)) + 1;521 $rank = $objQuery->max('rank', 'dtb_category', $where, array($parent_category_id)) + 1; 522 522 } else { 523 523 // 親のランクを自分のランクとする。 524 524 $where = "category_id = ?"; 525 $rank = $objQuery->get('rank', "dtb_category", $where, array($parent_category_id));525 $rank = $objQuery->get('rank', 'dtb_category', $where, array($parent_category_id)); 526 526 // 追加レコードのランク以上のレコードを一つあげる。 527 527 $sqlup = "UPDATE dtb_category SET rank = (rank + 1) WHERE rank >= ?"; … … 531 531 $where = "category_id = ?"; 532 532 // 自分のレベルを取得する(親のレベル + 1) 533 $level = $objQuery->get('level', "dtb_category", $where, array($parent_category_id)) + 1;533 $level = $objQuery->get('level', 'dtb_category', $where, array($parent_category_id)) + 1; 534 534 535 535 $arrCategory = array(); … … 552 552 $arrCategory['category_id'] = $objQuery->nextVal('dtb_category_category_id'); 553 553 } 554 $objQuery->insert( "dtb_category", $arrCategory);554 $objQuery->insert('dtb_category', $arrCategory); 555 555 556 556 return $arrCategory['category_id'];
Note: See TracChangeset
for help on using the changeset viewer.