Ignore:
Timestamp:
2012/02/15 19:56:17 (12 years ago)
Author:
Seasoft
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_12-dev/data/class/helper/SC_Helper_DB.php

    r21502 r21514  
    6464     *               引数 $add == false でカラムが存在しない場合 false 
    6565     */ 
    66     function sfColumnExists($table_name, $col_name, $col_type = "", $dsn = "", $add = false) { 
     66    function sfColumnExists($table_name, $col_name, $col_type = '', $dsn = '', $add = false) { 
    6767        $dbFactory = SC_DB_DBFactory_Ex::getInstance(); 
    6868        $dsn = $dbFactory->getDSN($dsn); 
     
    7575        // 正常に接続されている場合 
    7676        if (!$objQuery->isError()) { 
    77             list($db_type) = explode(":", $dsn); 
     77            list($db_type) = explode(':', $dsn); 
    7878 
    7979            // カラムリストを取得 
     
    104104     *               $add == false で, データが存在しない場合 false 
    105105     */ 
    106     function sfDataExists($table_name, $where, $arrval, $dsn = "", $sql = "", $add = false) { 
     106    function sfDataExists($table_name, $where, $arrval, $dsn = '', $sql = '', $add = false) { 
    107107        $dbFactory = SC_DB_DBFactory_Ex::getInstance(); 
    108108        $dsn = $dbFactory->getDSN($dsn); 
     
    128128     * @return array 店舗基本情報の配列 
    129129     */ 
    130     function sfGetBasisData($force = false, $col = "") { 
     130    function sfGetBasisData($force = false, $col = '') { 
    131131        static $data; 
    132132 
     
    134134            $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    135135 
    136             if ($col === "") { 
     136            if ($col === '') { 
    137137                $arrRet = $objQuery->select('*', 'dtb_baseinfo'); 
    138138            } else { 
     
    188188                if (count($category_id) > 0) { 
    189189                    $arrRet = $this->sfGetParents('dtb_category', 'parent_category_id', 'category_id', $category_id); 
    190                     $root_id = isset($arrRet[0]) ? $arrRet[0] : ""; 
     190                    $root_id = isset($arrRet[0]) ? $arrRet[0] : ''; 
    191191                } else { 
    192                     $root_id = ""; 
     192                    $root_id = ''; 
    193193                } 
    194194            } else { 
    195195                // ROOTカテゴリIDをなしに設定する 
    196                 $root_id = ""; 
     196                $root_id = ''; 
    197197            } 
    198198            $this->g_root_id = $root_id; 
     
    214214        $arrRet = $objQuery->select('customer_id', 'dtb_order', "order_id = ?", array($order_id)); 
    215215        $customer_id = $arrRet[0]['customer_id']; 
    216         if ($customer_id != "" && $customer_id >= 1) { 
     216        if ($customer_id != '' && $customer_id >= 1) { 
    217217            $arrRet = $objQuery->select('point', 'dtb_customer', "customer_id = ?", array($customer_id)); 
    218218            $point = $arrRet[0]['point']; 
     
    229229            } 
    230230        } else { 
    231             $rollback_point = ""; 
    232             $point = ""; 
     231            $rollback_point = ''; 
     232            $point = ''; 
    233233        } 
    234234        return array($point, $rollback_point); 
     
    244244    function sfGetCatTree($parent_category_id, $count_check = false) { 
    245245        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    246         $col = ""; 
    247         $col .= " cat.category_id,"; 
    248         $col .= " cat.category_name,"; 
    249         $col .= " cat.parent_category_id,"; 
    250         $col .= " cat.level,"; 
    251         $col .= " cat.rank,"; 
    252         $col .= " cat.creator_id,"; 
    253         $col .= " cat.create_date,"; 
    254         $col .= " cat.update_date,"; 
    255         $col .= " cat.del_flg, "; 
    256         $col .= " ttl.product_count"; 
    257         $from = "dtb_category as cat left join dtb_category_total_count as ttl on ttl.category_id = cat.category_id"; 
     246        $col = ''; 
     247        $col .= ' cat.category_id,'; 
     248        $col .= ' cat.category_name,'; 
     249        $col .= ' cat.parent_category_id,'; 
     250        $col .= ' cat.level,'; 
     251        $col .= ' cat.rank,'; 
     252        $col .= ' cat.creator_id,'; 
     253        $col .= ' cat.create_date,'; 
     254        $col .= ' cat.update_date,'; 
     255        $col .= ' cat.del_flg, '; 
     256        $col .= ' ttl.product_count'; 
     257        $from = 'dtb_category as cat left join dtb_category_total_count as ttl on ttl.category_id = cat.category_id'; 
    258258        // 登録商品数のチェック 
    259259        if ($count_check) { 
    260             $where = "del_flg = 0 AND product_count > 0"; 
     260            $where = 'del_flg = 0 AND product_count > 0'; 
    261261        } else { 
    262             $where = "del_flg = 0"; 
    263         } 
    264         $objQuery->setOption("ORDER BY rank DESC"); 
     262            $where = 'del_flg = 0'; 
     263        } 
     264        $objQuery->setOption('ORDER BY rank DESC'); 
    265265        $arrRet = $objQuery->select($col, $from, $where); 
    266266 
     
    312312    function sfGetMultiCatTree($product_id, $count_check = false) { 
    313313        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    314         $col = ""; 
    315         $col .= " cat.category_id,"; 
    316         $col .= " cat.category_name,"; 
    317         $col .= " cat.parent_category_id,"; 
    318         $col .= " cat.level,"; 
    319         $col .= " cat.rank,"; 
    320         $col .= " cat.creator_id,"; 
    321         $col .= " cat.create_date,"; 
    322         $col .= " cat.update_date,"; 
    323         $col .= " cat.del_flg, "; 
    324         $col .= " ttl.product_count"; 
    325         $from = "dtb_category as cat left join dtb_category_total_count as ttl on ttl.category_id = cat.category_id"; 
     314        $col = ''; 
     315        $col .= ' cat.category_id,'; 
     316        $col .= ' cat.category_name,'; 
     317        $col .= ' cat.parent_category_id,'; 
     318        $col .= ' cat.level,'; 
     319        $col .= ' cat.rank,'; 
     320        $col .= ' cat.creator_id,'; 
     321        $col .= ' cat.create_date,'; 
     322        $col .= ' cat.update_date,'; 
     323        $col .= ' cat.del_flg, '; 
     324        $col .= ' ttl.product_count'; 
     325        $from = 'dtb_category as cat left join dtb_category_total_count as ttl on ttl.category_id = cat.category_id'; 
    326326        // 登録商品数のチェック 
    327327        if ($count_check) { 
    328             $where = "del_flg = 0 AND product_count > 0"; 
     328            $where = 'del_flg = 0 AND product_count > 0'; 
    329329        } else { 
    330             $where = "del_flg = 0"; 
    331         } 
    332         $objQuery->setOption("ORDER BY rank DESC"); 
     330            $where = 'del_flg = 0'; 
     331        } 
     332        $objQuery->setOption('ORDER BY rank DESC'); 
    333333        $arrRet = $objQuery->select($col, $from, $where); 
    334334 
     
    362362        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    363363        $arrCatID = $this->sfGetParents('dtb_category', 'parent_category_id', 'category_id', $category_id); 
    364         $ConbName = ""; 
     364        $ConbName = ''; 
    365365 
    366366        // カテゴリ名称を取得する 
    367367        foreach ($arrCatID as $key => $val) { 
    368             $sql = "SELECT category_name FROM dtb_category WHERE category_id = ?"; 
     368            $sql = 'SELECT category_name FROM dtb_category WHERE category_id = ?'; 
    369369            $arrVal = array($val); 
    370370            $CatName = $objQuery->getOne($sql,$arrVal); 
     
    372372        } 
    373373        // 最後の | をカットする 
    374         $ConbName = substr_replace($ConbName, "", strlen($ConbName) - 2, 2); 
     374        $ConbName = substr_replace($ConbName, '', strlen($ConbName) - 2, 2); 
    375375 
    376376        return $ConbName; 
     
    407407 
    408408        // カテゴリ名称を取得する 
    409         $sql = "SELECT category_name FROM dtb_category WHERE category_id = ?"; 
     409        $sql = 'SELECT category_name FROM dtb_category WHERE category_id = ?'; 
    410410        $arrVal = array($arrRet['id']); 
    411411        $arrRet['name'] = $objQuery->getOne($sql,$arrVal); 
     
    424424     * @return array カテゴリツリーの配列 
    425425     */ 
    426     function sfGetCategoryList($addwhere = "", $products_check = false, $head = CATEGORY_HEAD) { 
    427         $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    428         $where = "del_flg = 0"; 
    429  
    430         if ($addwhere != "") { 
     426    function sfGetCategoryList($addwhere = '', $products_check = false, $head = CATEGORY_HEAD) { 
     427        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
     428        $where = 'del_flg = 0'; 
     429 
     430        if ($addwhere != '') { 
    431431            $where.= " AND $addwhere"; 
    432432        } 
    433433 
    434         $objQuery->setOption("ORDER BY rank DESC"); 
     434        $objQuery->setOption('ORDER BY rank DESC'); 
    435435 
    436436        if ($products_check) { 
    437             $col = "T1.category_id, category_name, level"; 
    438             $from = "dtb_category AS T1 LEFT JOIN dtb_category_total_count AS T2 ON T1.category_id = T2.category_id"; 
    439             $where .= " AND product_count > 0"; 
     437            $col = 'T1.category_id, category_name, level'; 
     438            $from = 'dtb_category AS T1 LEFT JOIN dtb_category_total_count AS T2 ON T1.category_id = T2.category_id'; 
     439            $where .= ' AND product_count > 0'; 
    440440        } else { 
    441             $col = "category_id, category_name, level"; 
     441            $col = 'category_id, category_name, level'; 
    442442            $from = 'dtb_category'; 
    443443        } 
     
    466466 
    467467        // カテゴリ名リストを取得 
    468         $col = "category_id, parent_category_id, category_name"; 
    469         $where = "del_flg = 0"; 
    470         $objQuery->setOption("ORDER BY level"); 
     468        $col = 'category_id, parent_category_id, category_name'; 
     469        $where = 'del_flg = 0'; 
     470        $objQuery->setOption('ORDER BY level'); 
    471471        $arrRet = $objQuery->select($col, 'dtb_category', $where); 
    472472        $arrCatName = array(); 
     
    474474            $arrCatName[$arrTmp['category_id']] = 
    475475                (($arrTmp['parent_category_id'] > 0)? 
    476                     $arrCatName[$arrTmp['parent_category_id']] : "") 
     476                    $arrCatName[$arrTmp['parent_category_id']] : '') 
    477477                . CATEGORY_HEAD . $arrTmp['category_name']; 
    478478        } 
    479479 
    480         $col = "category_id, parent_category_id, category_name, level"; 
    481         $where = "del_flg = 0"; 
    482         $objQuery->setOption("ORDER BY rank DESC"); 
     480        $col = 'category_id, parent_category_id, category_name, level'; 
     481        $where = 'del_flg = 0'; 
     482        $objQuery->setOption('ORDER BY rank DESC'); 
    483483        $arrRet = $objQuery->select($col, 'dtb_category', $where); 
    484484        $max = count($arrRet); 
     
    489489                    $arrValue[$cnt] = $arrRet[$cnt]['category_id']; 
    490490                } else { 
    491                     $arrValue[$cnt] = ""; 
     491                    $arrValue[$cnt] = ''; 
    492492                } 
    493493            } else { 
     
    511511    function sfGetCategoryId($product_id, $category_id = 0, $closed = false) { 
    512512        if ($closed) { 
    513             $status = ""; 
     513            $status = ''; 
    514514        } else { 
    515             $status = "status = 1"; 
     515            $status = 'status = 1'; 
    516516        } 
    517517        $category_id = (int) $category_id; 
     
    521521        } else if (SC_Utils_Ex::sfIsInt($product_id) && $product_id != 0 && SC_Helper_DB_Ex::sfIsRecord('dtb_products','product_id', $product_id, $status)) { 
    522522            $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    523             $where = "product_id = ?"; 
     523            $where = 'product_id = ?'; 
    524524            $category_id = $objQuery->getCol('category_id', 'dtb_product_categories', "product_id = ?", array($product_id)); 
    525525        } else { 
     
    545545 
    546546        // 現在の商品カテゴリを取得 
    547         $arrCat = $objQuery->select("product_id, category_id, rank", 
     547        $arrCat = $objQuery->select('product_id, category_id, rank', 
    548548                                    'dtb_product_categories', 
    549                                     "category_id = ?", 
     549                                    'category_id = ?', 
    550550                                    array($category_id)); 
    551551 
     
    577577 
    578578        // 現在の商品カテゴリを取得 
    579         $arrCat = $objQuery->select("product_id, category_id, rank", 
     579        $arrCat = $objQuery->select('product_id, category_id, rank', 
    580580                                    'dtb_product_categories', 
    581                                     "category_id = ?", 
     581                                    'category_id = ?', 
    582582                                    array($category_id)); 
    583583 
     
    605605        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    606606        $objQuery->delete('dtb_product_categories', 
    607                           "category_id = ? AND product_id = ?", array($category_id, $product_id)); 
     607                          'category_id = ? AND product_id = ?', array($category_id, $product_id)); 
    608608    } 
    609609 
     
    619619 
    620620        // 現在のカテゴリ情報を取得 
    621         $arrCurrentCat = $objQuery->select("product_id, category_id, rank", 
     621        $arrCurrentCat = $objQuery->select('product_id, category_id, rank', 
    622622                                           'dtb_product_categories', 
    623                                            "product_id = ?", 
     623                                           'product_id = ?', 
    624624                                           array($product_id)); 
    625625 
     
    739739            $sqlval['create_date'] = 'CURRENT_TIMESTAMP'; 
    740740            $sqlval['product_count'] = (string)$arrNew[$cid]; 
    741             if ($sqlval['product_count'] =="") { 
     741            if ($sqlval['product_count'] =='') { 
    742742                $sqlval['product_count'] = (string)'0'; 
    743743            } 
     
    773773            $arrval = array(); 
    774774            list($tmp_where, $tmp_arrval) = $this->sfGetCatWhere($category_id); 
    775             if ($tmp_where != "") { 
    776                 $sql_where_product_ids = "product_id IN (SELECT product_id FROM dtb_product_categories WHERE " . $tmp_where . ")"; 
     775            if ($tmp_where != '') { 
     776                $sql_where_product_ids = 'product_id IN (SELECT product_id FROM dtb_product_categories WHERE ' . $tmp_where . ')'; 
    777777                $arrval = array_merge((array)$tmp_arrval, (array)$tmp_arrval); 
    778778            } else { 
     
    795795            $sqlval['create_date'] = 'CURRENT_TIMESTAMP'; 
    796796            $sqlval['product_count'] = $count; 
    797             if ($sqlval['product_count'] =="") { 
     797            if ($sqlval['product_count'] =='') { 
    798798                $sqlval['product_count'] = (string)'0'; 
    799799            } 
     
    930930        $arrRet = SC_Helper_DB_Ex::sfGetChildrenArray('dtb_category', 'parent_category_id', 'category_id', $category_id); 
    931931 
    932         $where = "category_id IN (" . implode(',', array_fill(0, count($arrRet), '?')) . ")"; 
     932        $where = 'category_id IN (' . implode(',', array_fill(0, count($arrRet), '?')) . ")"; 
    933933 
    934934        return array($where, $arrRet); 
     
    948948        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    949949        $col = "$keyname, $valname"; 
    950         $objQuery->setWhere("del_flg = 0"); 
    951         $objQuery->setOrder("rank DESC"); 
     950        $objQuery->setWhere('del_flg = 0'); 
     951        $objQuery->setOrder('rank DESC'); 
    952952        $arrList = $objQuery->select($col, $table, $where, $arrVal); 
    953953        $count = count($arrList); 
     
    969969     * @return void 
    970970     */ 
    971     function sfRankUp($table, $colname, $id, $andwhere = "") { 
     971    function sfRankUp($table, $colname, $id, $andwhere = '') { 
    972972        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    973973        $objQuery->begin(); 
    974974        $where = "$colname = ?"; 
    975         if ($andwhere != "") { 
     975        if ($andwhere != '') { 
    976976            $where.= " AND $andwhere"; 
    977977        } 
     
    983983        if ($rank < $maxrank) { 
    984984            // ランクが一つ上のIDを取得する。 
    985             $where = "rank = ?"; 
    986             if ($andwhere != "") { 
     985            $where = 'rank = ?'; 
     986            if ($andwhere != '') { 
    987987                $where.= " AND $andwhere"; 
    988988            } 
     
    991991            // ランク入れ替えの実行 
    992992            $sqlup = "UPDATE $table SET rank = ? WHERE $colname = ?"; 
    993             if ($andwhere != "") { 
     993            if ($andwhere != '') { 
    994994                $sqlup.= " AND $andwhere"; 
    995995            } 
     
    10091009     * @return void 
    10101010     */ 
    1011     function sfRankDown($table, $colname, $id, $andwhere = "") { 
     1011    function sfRankDown($table, $colname, $id, $andwhere = '') { 
    10121012        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    10131013        $objQuery->begin(); 
    10141014        $where = "$colname = ?"; 
    1015         if ($andwhere != "") { 
     1015        if ($andwhere != '') { 
    10161016            $where.= " AND $andwhere"; 
    10171017        } 
     
    10221022        if ($rank > 1) { 
    10231023            // ランクが一つ下のIDを取得する。 
    1024             $where = "rank = ?"; 
    1025             if ($andwhere != "") { 
     1024            $where = 'rank = ?'; 
     1025            if ($andwhere != '') { 
    10261026                $where.= " AND $andwhere"; 
    10271027            } 
     
    10301030            // ランク入れ替えの実行 
    10311031            $sqlup = "UPDATE $table SET rank = ? WHERE $colname = ?"; 
    1032             if ($andwhere != "") { 
     1032            if ($andwhere != '') { 
    10331033                $sqlup.= " AND $andwhere"; 
    10341034            } 
     
    10491049     * @return void 
    10501050     */ 
    1051     function sfMoveRank($tableName, $keyIdColumn, $keyId, $pos, $where = "") { 
     1051    function sfMoveRank($tableName, $keyIdColumn, $keyId, $pos, $where = '') { 
    10521052        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    10531053        $objQuery->begin(); 
    10541054 
    10551055        // 自身のランクを取得する 
    1056         if ($where != "") { 
     1056        if ($where != '') { 
    10571057            $getWhere = "$keyIdColumn = ? AND " . $where; 
    10581058        } else { 
     
    10731073 
    10741074        //入れ替え先の順位が入れ換え元の順位より大きい場合 
    1075         if($position > $rank) $term = "rank - 1"; 
     1075        if($position > $rank) $term = 'rank - 1'; 
    10761076 
    10771077        //入れ替え先の順位が入れ換え元の順位より小さい場合 
    1078         if($position < $rank) $term = "rank + 1"; 
     1078        if($position < $rank) $term = 'rank + 1'; 
    10791079 
    10801080        // XXX 入れ替え先の順位が入れ替え元の順位と同じ場合 
     
    10831083        // 指定した順位の商品から移動させる商品までのrankを1つずらす 
    10841084        $sql = "UPDATE $tableName SET rank = $term WHERE rank BETWEEN ? AND ?"; 
    1085         if ($where != "") { 
     1085        if ($where != '') { 
    10861086            $sql.= " AND $where"; 
    10871087        } 
     
    10921092        // 指定した順位へrankを書き換える。 
    10931093        $sql  = "UPDATE $tableName SET rank = ? WHERE $keyIdColumn = ? "; 
    1094         if ($where != "") { 
     1094        if ($where != '') { 
    10951095            $sql.= " AND $where"; 
    10961096        } 
     
    11131113     * @return void 
    11141114     */ 
    1115     function sfDeleteRankRecord($table, $colname, $id, $andwhere = "", 
     1115    function sfDeleteRankRecord($table, $colname, $id, $andwhere = '', 
    11161116                                $delete = false) { 
    11171117        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
     
    11191119        // 削除レコードのランクを取得する。 
    11201120        $where = "$colname = ?"; 
    1121         if ($andwhere != "") { 
     1121        if ($andwhere != '') { 
    11221122            $where.= " AND $andwhere"; 
    11231123        } 
     
    11351135 
    11361136        // 追加レコードのランクより上のレコードを一つずらす。 
    1137         $where = "rank > ?"; 
    1138         if ($andwhere != "") { 
     1137        $where = 'rank > ?'; 
     1138        if ($andwhere != '') { 
    11391139            $where.= " AND $andwhere"; 
    11401140        } 
     
    11571157        $col = $col_name; 
    11581158        $len = count($arrId); 
    1159         $where = ""; 
     1159        $where = ''; 
    11601160 
    11611161        for ($cnt = 0; $cnt < $len; $cnt++) { 
    1162             if ($where == "") { 
     1162            if ($where == '') { 
    11631163                $where = "$id_name = ?"; 
    11641164            } else { 
     
    12431243     * @return bool レコードが存在する場合 true 
    12441244     */ 
    1245     function sfIsRecord($table, $col, $arrval, $addwhere = "") { 
    1246         $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    1247         $arrCol = preg_split("/[, ]/", $col); 
    1248  
    1249         $where = "del_flg = 0"; 
    1250  
    1251         if ($addwhere != "") { 
     1245    function sfIsRecord($table, $col, $arrval, $addwhere = '') { 
     1246        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
     1247        $arrCol = preg_split('/[, ]/', $col); 
     1248 
     1249        $where = 'del_flg = 0'; 
     1250 
     1251        if ($addwhere != '') { 
    12521252            $where.= " AND $addwhere"; 
    12531253        } 
    12541254 
    12551255        foreach ($arrCol as $val) { 
    1256             if ($val != "") { 
    1257                 if ($where == "") { 
     1256            if ($val != '') { 
     1257                if ($where == '') { 
    12581258                    $where = "$val = ?"; 
    12591259                } else { 
     
    12641264        $ret = $objQuery->get($col, $table, $where, $arrval); 
    12651265 
    1266         if ($ret != "") { 
     1266        if ($ret != '') { 
    12671267            return true; 
    12681268        } 
     
    12771277     */ 
    12781278    function sfCountMaker($objQuery) { 
    1279         $sql = ""; 
     1279        $sql = ''; 
    12801280 
    12811281        //テーブル内容の削除 
    1282         $objQuery->query("DELETE FROM dtb_maker_count"); 
     1282        $objQuery->query('DELETE FROM dtb_maker_count'); 
    12831283 
    12841284        //各メーカーの商品数を数えて格納 
    1285         $sql = " INSERT INTO dtb_maker_count(maker_id, product_count, create_date) "; 
    1286         $sql .= " SELECT T1.maker_id, count(T2.maker_id), CURRENT_TIMESTAMP "; 
    1287         $sql .= " FROM dtb_maker AS T1 LEFT JOIN dtb_products AS T2"; 
    1288         $sql .= " ON T1.maker_id = T2.maker_id "; 
    1289         $sql .= " WHERE T2.del_flg = 0 AND T2.status = 1 "; 
    1290         $sql .= " GROUP BY T1.maker_id, T2.maker_id "; 
     1285        $sql = ' INSERT INTO dtb_maker_count(maker_id, product_count, create_date) '; 
     1286        $sql .= ' SELECT T1.maker_id, count(T2.maker_id), CURRENT_TIMESTAMP '; 
     1287        $sql .= ' FROM dtb_maker AS T1 LEFT JOIN dtb_products AS T2'; 
     1288        $sql .= ' ON T1.maker_id = T2.maker_id '; 
     1289        $sql .= ' WHERE T2.del_flg = 0 AND T2.status = 1 '; 
     1290        $sql .= ' GROUP BY T1.maker_id, T2.maker_id '; 
    12911291        $objQuery->query($sql); 
    12921292    } 
     
    13021302    function sfGetMakerId($product_id, $maker_id = 0, $closed = false) { 
    13031303        if ($closed) { 
    1304             $status = ""; 
     1304            $status = ''; 
    13051305        } else { 
    1306             $status = "status = 1"; 
     1306            $status = 'status = 1'; 
    13071307        } 
    13081308 
     
    13151315            } else if (SC_Utils_Ex::sfIsInt($product_id) && $product_id != 0 && $this->sfIsRecord('dtb_products','product_id', $product_id, $status)) { 
    13161316                $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    1317                 $where = "product_id = ?"; 
     1317                $where = 'product_id = ?'; 
    13181318                $maker_id = $objQuery->getCol('maker_id', 'dtb_products', "product_id = ?", array($product_id)); 
    13191319                $this->g_maker_id = $maker_id; 
     
    13351335     * @return array カテゴリツリーの配列 
    13361336     */ 
    1337     function sfGetMakerList($addwhere = "", $products_check = false) { 
    1338         $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    1339         $where = "del_flg = 0"; 
    1340  
    1341         if ($addwhere != "") { 
     1337    function sfGetMakerList($addwhere = '', $products_check = false) { 
     1338        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
     1339        $where = 'del_flg = 0'; 
     1340 
     1341        if ($addwhere != '') { 
    13421342            $where.= " AND $addwhere"; 
    13431343        } 
    13441344 
    1345         $objQuery->setOption("ORDER BY rank DESC"); 
     1345        $objQuery->setOption('ORDER BY rank DESC'); 
    13461346 
    13471347        if ($products_check) { 
    1348             $col = "T1.maker_id, name"; 
    1349             $from = "dtb_maker AS T1 LEFT JOIN dtb_maker_count AS T2 ON T1.maker_id = T2.maker_id"; 
    1350             $where .= " AND product_count > 0"; 
     1348            $col = 'T1.maker_id, name'; 
     1349            $from = 'dtb_maker AS T1 LEFT JOIN dtb_maker_count AS T2 ON T1.maker_id = T2.maker_id'; 
     1350            $where .= ' AND product_count > 0'; 
    13511351        } else { 
    1352             $col = "maker_id, name"; 
     1352            $col = 'maker_id, name'; 
    13531353            $from = 'dtb_maker'; 
    13541354        } 
Note: See TracChangeset for help on using the changeset viewer.