Changeset 21684 for branches/version-2_12-dev/data/class/pages/admin/products/LC_Page_Admin_Products_UploadCSVCategory.php
- Timestamp:
- 2012/03/26 21:44:52 (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
r21591 r21684 289 289 // CSV項目毎の処理 290 290 foreach ($arrCSVFrame as $item) { 291 if ($item['status'] == CSV_COLUMN_STATUS_FLG_DISABLE) continue;291 if ($item['status'] == CSV_COLUMN_STATUS_FLG_DISABLE) continue; 292 292 //サブクエリ構造の場合は AS名 を使用 293 293 if (preg_match_all('/\(.+\) as (.+)$/i', $item['col'], $match, PREG_SET_ORDER)) { … … 461 461 */ 462 462 // 親カテゴリIDの存在チェック 463 if (array_search('parent_category_id', $this->arrFormKeyList) !== FALSE464 and$item['parent_category_id'] != ''465 and$item['parent_category_id'] != '0'466 and!SC_Helper_DB_Ex::sfIsRecord('dtb_category', 'category_id', array($item['parent_category_id']))467 463 if (array_search('parent_category_id', $this->arrFormKeyList) !== FALSE 464 && $item['parent_category_id'] != '' 465 && $item['parent_category_id'] != '0' 466 && !SC_Helper_DB_Ex::sfIsRecord('dtb_category', 'category_id', array($item['parent_category_id'])) 467 ) { 468 468 $arrErr['parent_category_id'] = '※ 指定の親カテゴリID(' . $item['parent_category_id'] . ')は、存在しません。'; 469 469 } 470 470 // 削除フラグのチェック 471 if(array_search('del_flg', $this->arrFormKeyList) !== FALSE 472 and $item['del_flg'] != '') { 471 if (array_search('del_flg', $this->arrFormKeyList) !== FALSE 472 && $item['del_flg'] != '' 473 ) { 473 474 if (!($item['del_flg'] == '0' or $item['del_flg'] == '1')) { 474 475 $arrErr['del_flg'] = '※ 削除フラグは「0」(有効)、「1」(削除)のみが有効な値です。'; … … 476 477 } 477 478 // 重複チェック 同じカテゴリ内に同名の存在は許可されない 478 if(array_search('category_name', $this->arrFormKeyList) !== FALSE 479 and $item['category_name'] != '') { 479 if (array_search('category_name', $this->arrFormKeyList) !== FALSE 480 && $item['category_name'] != '' 481 ) { 480 482 $parent_category_id = $item['parent_category_id']; 481 483 if ($parent_category_id == '') { … … 589 591 */ 590 592 function lfIsDbRecord($table, $keyname, $item) { 591 if (array_search($keyname, $this->arrFormKeyList) !== FALSE //入力対象である592 and$item[$keyname] != '' // 空ではない593 and!SC_Helper_DB_EX::sfIsRecord($table, $keyname, (array)$item[$keyname]) //DBに存在するか594 593 if (array_search($keyname, $this->arrFormKeyList) !== FALSE //入力対象である 594 && $item[$keyname] != '' // 空ではない 595 && !SC_Helper_DB_EX::sfIsRecord($table, $keyname, (array)$item[$keyname]) //DBに存在するか 596 ) { 595 597 return false; 596 598 }
Note: See TracChangeset
for help on using the changeset viewer.