Ignore:
Timestamp:
2012/02/11 05:48:00 (12 years ago)
Author:
Seasoft
Message:

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

  • Zend Framework PHP 標準コーディング規約への準拠を高めた
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  
    7777 
    7878        $masterData = new SC_DB_MasterData_Ex(); 
    79         $this->arrAllowedTag = $masterData->getMasterData("mtb_allowed_tag"); 
     79        $this->arrAllowedTag = $masterData->getMasterData('mtb_allowed_tag'); 
    8080        $this->arrTagCheckItem = array(); 
    8181    } 
     
    374374            // 同じidが存在すればupdate存在しなければinsert 
    375375            $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'])); 
    377377            if ($category_exists) { 
    378378                // UPDATEの実行 
    379379                $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'])); 
    381381            } else { 
    382382                $sqlval['create_date'] = $arrList['update_date']; 
     
    434434        } 
    435435        if ($sqlval['parent_category_id'] == "") { 
    436             $sqlval['parent_category_id'] = (string)"0"; 
     436            $sqlval['parent_category_id'] = (string)'0'; 
    437437        } 
    438438        return $sqlval; 
     
    457457        if(array_search('parent_category_id', $this->arrFormKeyList) !== FALSE 
    458458                and $item['parent_category_id'] != "" 
    459                 and $item['parent_category_id'] != "0" 
     459                and $item['parent_category_id'] != '0' 
    460460                and !SC_Helper_DB_Ex::sfIsRecord('dtb_category', 'category_id', array($item['parent_category_id'])) 
    461461                ) { 
     
    465465        if(array_search('del_flg', $this->arrFormKeyList) !== FALSE 
    466466                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')) { 
    468468                $arrErr['del_flg'] = "※ 削除フラグは「0」(有効)、「1」(削除)のみが有効な値です。"; 
    469469            } 
     
    488488        // 登録数上限チェック 
    489489        $where = "del_flg = 0"; 
    490         $count = $objQuery->count("dtb_category", $where); 
     490        $count = $objQuery->count('dtb_category', $where); 
    491491        if ($count >= CATEGORY_MAX) { 
    492492            $item['category_name'] = "※ カテゴリの登録最大数を超えました。"; 
     
    495495        if (array_search('parent_category_id', $this->arrFormKeyList) !== FALSE 
    496496                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)); 
    498498            if ($level >= LEVEL_MAX) { 
    499499                $arrErr['parent_category_id'] = "※ " . LEVEL_MAX . "階層以上の登録はできません。"; 
     
    519519            // ROOT階層で最大のランクを取得する。 
    520520            $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; 
    522522        } else { 
    523523            // 親のランクを自分のランクとする。 
    524524            $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)); 
    526526            // 追加レコードのランク以上のレコードを一つあげる。 
    527527            $sqlup = "UPDATE dtb_category SET rank = (rank + 1) WHERE rank >= ?"; 
     
    531531        $where = "category_id = ?"; 
    532532        // 自分のレベルを取得する(親のレベル + 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; 
    534534 
    535535        $arrCategory = array(); 
     
    552552            $arrCategory['category_id'] = $objQuery->nextVal('dtb_category_category_id'); 
    553553        } 
    554         $objQuery->insert("dtb_category", $arrCategory); 
     554        $objQuery->insert('dtb_category', $arrCategory); 
    555555 
    556556        return $arrCategory['category_id']; 
Note: See TracChangeset for help on using the changeset viewer.