Ignore:
Timestamp:
2012/03/26 21:44:52 (12 years ago)
Author:
Seasoft
Message:

#1613 (typo修正・ソース整形・ソースコメントの改善)

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  
    289289        // CSV項目毎の処理 
    290290        foreach ($arrCSVFrame as $item) { 
    291             if($item['status'] == CSV_COLUMN_STATUS_FLG_DISABLE) continue; 
     291            if ($item['status'] == CSV_COLUMN_STATUS_FLG_DISABLE) continue; 
    292292            //サブクエリ構造の場合は AS名 を使用 
    293293            if (preg_match_all('/\(.+\) as (.+)$/i', $item['col'], $match, PREG_SET_ORDER)) { 
     
    461461        */ 
    462462        // 親カテゴリIDの存在チェック 
    463         if(array_search('parent_category_id', $this->arrFormKeyList) !== FALSE 
    464                 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        ) { 
    468468            $arrErr['parent_category_id'] = '※ 指定の親カテゴリID(' . $item['parent_category_id'] . ')は、存在しません。'; 
    469469        } 
    470470        // 削除フラグのチェック 
    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        ) { 
    473474            if (!($item['del_flg'] == '0' or $item['del_flg'] == '1')) { 
    474475                $arrErr['del_flg'] = '※ 削除フラグは「0」(有効)、「1」(削除)のみが有効な値です。'; 
     
    476477        } 
    477478        // 重複チェック 同じカテゴリ内に同名の存在は許可されない 
    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        ) { 
    480482            $parent_category_id = $item['parent_category_id']; 
    481483            if ($parent_category_id == '') { 
     
    589591     */ 
    590592    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        ) { 
    595597            return false; 
    596598        } 
Note: See TracChangeset for help on using the changeset viewer.