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/pages/admin/products/LC_Page_Admin_Products_ProductSelect.php

    r21481 r21514  
    4646        $this->tpl_mainpage = 'products/product_select.tpl'; 
    4747        $this->tpl_mainno = 'products'; 
    48         $this->tpl_subno = ""; 
     48        $this->tpl_subno = ''; 
    4949        $this->tpl_maintitle = '商品管理'; 
    5050        $this->tpl_subtitle = '商品選択'; 
     
    107107     */ 
    108108    function lfInitParam(&$objFormParam) { 
    109         $objFormParam->addParam("カテゴリ", 'search_category_id', STEXT_LEN, 'n'); 
    110         $objFormParam->addParam("商品名", 'search_name', STEXT_LEN, 'KVa'); 
    111         $objFormParam->addParam("商品コード", 'search_product_code', STEXT_LEN, 'KVa'); 
     109        $objFormParam->addParam('カテゴリ', 'search_category_id', STEXT_LEN, 'n'); 
     110        $objFormParam->addParam('商品名', 'search_name', STEXT_LEN, 'KVa'); 
     111        $objFormParam->addParam('商品コード', 'search_product_code', STEXT_LEN, 'KVa'); 
    112112    } 
    113113 
    114114    /* 商品検索結果取得 */ 
    115115    function lfGetProducts(&$objDb) { 
    116         $where = "del_flg = 0"; 
     116        $where = 'del_flg = 0'; 
    117117 
    118118        /* 入力エラーなし */ 
    119119        foreach ($this->arrForm AS $key=>$val) { 
    120             if($val == "") continue; 
     120            if($val == '') continue; 
    121121 
    122122            switch ($key) { 
    123123            case 'search_name': 
    124                 $where .= " AND name ILIKE ?"; 
     124                $where .= ' AND name ILIKE ?'; 
    125125                $arrval[] = "%$val%"; 
    126126                break; 
    127127            case 'search_category_id': 
    128128                list($tmp_where, $tmp_arrval) = $objDb->sfGetCatWhere($val); 
    129                 if ($tmp_where != "") { 
    130                     $where.= " AND product_id IN (SELECT product_id FROM dtb_product_categories WHERE " . $tmp_where . ")"; 
     129                if ($tmp_where != '') { 
     130                    $where.= ' AND product_id IN (SELECT product_id FROM dtb_product_categories WHERE ' . $tmp_where . ')'; 
    131131                    $arrval = array_merge((array)$arrval, (array)$tmp_arrval); 
    132132                } 
    133133                break; 
    134134            case 'search_product_code': 
    135                 $where .= " AND product_id IN (SELECT product_id FROM dtb_products_class WHERE product_code LIKE ? GROUP BY product_id)"; 
     135                $where .= ' AND product_id IN (SELECT product_id FROM dtb_products_class WHERE product_code LIKE ? GROUP BY product_id)'; 
    136136                $arrval[] = "$val%"; 
    137137                break; 
     
    141141        } 
    142142 
    143         $order = "update_date DESC, product_id DESC "; 
     143        $order = 'update_date DESC, product_id DESC '; 
    144144 
    145145        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
     
    166166        // 検索結果の取得 
    167167        // FIXME 商品コードの表示 
    168         $arrProducts = $objQuery->select("*", SC_Product_Ex::alldtlSQL(), $where, $arrval); 
     168        $arrProducts = $objQuery->select('*', SC_Product_Ex::alldtlSQL(), $where, $arrval); 
    169169        return $arrProducts; 
    170170    } 
Note: See TracChangeset for help on using the changeset viewer.