Ignore:
Timestamp:
2013/07/07 16:48:59 (11 years ago)
Author:
kimoto
Message:

#2043 typo修正・ソース整形・ソースコメントの改善 for 2.13.0
不要な変数を削除
ソースの整形

Location:
branches/version-2_13-dev/data/class/pages/products
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_13-dev/data/class/pages/products/LC_Page_Products_Detail.php

    r22926 r22946  
    112112 
    113113        // プロダクトIDの正当性チェック 
    114         $product_id = $this->lfCheckProductId($this->objFormParam->getValue('admin'),$this->objFormParam->getValue('product_id')); 
     114        $product_id = $this->lfCheckProductId($this->objFormParam->getValue('admin'), $this->objFormParam->getValue('product_id')); 
    115115        $this->mode = $this->getMode(); 
    116116 
     
    149149        // モバイル用 規格選択セレクトボックスの作成 
    150150        if (SC_Display_Ex::detectDevice() == DEVICE_TYPE_MOBILE) { 
    151             $this->lfMakeSelectMobile($this, $product_id,$this->objFormParam->getValue('classcategory_id1')); 
     151            $this->lfMakeSelectMobile($this, $product_id, $this->objFormParam->getValue('classcategory_id1')); 
    152152        } 
    153153 
     
    224224            = SC_Utils_Ex::sfNoImageMain($this->arrProduct['main_image']); 
    225225 
    226         $this->subImageFlag = $this->lfSetFile($this->objUpFile,$this->arrProduct,$this->arrFile); 
     226        $this->subImageFlag = $this->lfSetFile($this->objUpFile, $this->arrProduct, $this->arrFile); 
    227227        //レビュー情報の取得 
    228228        $this->arrReview = $this->lfGetReviewData($product_id); 
     
    240240 
    241241    /* プロダクトIDの正当性チェック */ 
    242     function lfCheckProductId($admin_mode,$product_id) 
     242    function lfCheckProductId($admin_mode, $product_id) 
    243243    { 
    244244        // 管理機能からの確認の場合は、非公開の商品も表示する。 
     
    283283 
    284284    /* 規格選択セレクトボックスの作成(モバイル) */ 
    285     function lfMakeSelectMobile(&$objPage, $product_id,$request_classcategory_id1) 
     285    function lfMakeSelectMobile(&$objPage, $product_id, $request_classcategory_id1) 
    286286    { 
    287287        $classcat_find1 = false; 
     
    380380        $arrRecommendData = $objQuery->select('recommend_product_id, comment', 'dtb_recommend_products as t1 left join dtb_products as t2 on t1.recommend_product_id = t2.product_id', 't1.product_id = ? and t2.del_flg = 0 and t2.status = 1', array($product_id)); 
    381381 
    382         $arrRecommendProductId = array(); 
     382        $recommendProductIds = array(); 
    383383        foreach ($arrRecommendData as $recommend) { 
    384             $arrRecommendProductId[] = $recommend['recommend_product_id']; 
     384            $recommendProductIds[] = $recommend['recommend_product_id']; 
    385385        } 
    386386 
    387387        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    388         $arrProducts = $objProduct->getListByProductIds($objQuery, $arrRecommendProductId); 
    389  
    390         $arrRecommend = array(); 
     388        $arrProducts = $objProduct->getListByProductIds($objQuery, $recommendProductIds); 
     389 
    391390        foreach ($arrRecommendData as $key => $arrRow) { 
    392391            $arrRecommendData[$key] = array_merge($arrRow, $arrProducts[$arrRow['recommend_product_id']]); 
     
    397396 
    398397    /* 入力内容のチェック */ 
    399     function lfCheckError($mode,&$objFormParam,$tpl_classcat_find1 = null ,$tpl_classcat_find2 = null) 
     398    function lfCheckError($mode, &$objFormParam, $tpl_classcat_find1 = null , $tpl_classcat_find2 = null) 
    400399    { 
    401400        switch ($mode) { 
     
    429428 
    430429    //商品ごとのレビュー情報を取得する 
    431     function lfGetReviewData($id) 
     430    function lfGetReviewData($product_id) 
    432431    { 
    433432        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
     
    438437        $objQuery->setOrder('create_date DESC'); 
    439438        $objQuery->setLimit(REVIEW_REGIST_MAX); 
    440         $arrWhereVal = array($id); 
     439        $arrWhereVal = array($product_id); 
    441440        $arrReview = $objQuery->select($col, $from, $where, $arrWhereVal); 
    442441 
     
    448447     * @return $subImageFlag 
    449448     */ 
    450     function lfSetFile($objUpFile,$arrProduct,&$arrFile) 
     449    function lfSetFile($objUpFile, $arrProduct, &$arrFile) 
    451450    { 
    452451        // DBからのデータを引き継ぐ 
     
    470469     * @return void 
    471470     */ 
    472     function lfRegistFavoriteProduct($favorite_product_id,$customer_id) 
     471    function lfRegistFavoriteProduct($favorite_product_id, $customer_id) 
    473472    { 
    474473        // ログイン中のユーザが商品をお気に入りにいれる処理 
     
    604603    function doMobileSelect2() 
    605604    { 
    606         $this->arrErr = $this->lfCheckError($this->mode,$this->objFormParam,$this->tpl_classcat_find1,$this->tpl_classcat_find2); 
     605        $this->arrErr = $this->lfCheckError($this->mode, $this->objFormParam, $this->tpl_classcat_find1, $this->tpl_classcat_find2); 
    607606 
    608607        // 規格1が設定されていて、エラーを検出した場合 
  • branches/version-2_13-dev/data/class/pages/products/LC_Page_Products_List.php

    r22926 r22946  
    9494        $objProduct = new SC_Product_Ex(); 
    9595        // パラメーター管理クラス 
    96         $objFormParam = new SC_FormParam_Ex();         
     96        $objFormParam = new SC_FormParam_Ex(); 
    9797 
    9898        // パラメーター情報の初期化 
     
    139139        } 
    140140        $this->objNavi      = new SC_PageNavi_Ex($this->tpl_pageno, $this->tpl_linemax, $this->disp_number, 'fnNaviPage', NAVI_PMAX, $urlParam, SC_Display_Ex::detectDevice() !== DEVICE_TYPE_MOBILE); 
    141         $this->arrProducts  = $this->lfGetProductsList($arrSearchCondition, $this->disp_number, $this->objNavi->start_row, $this->tpl_linemax, $objProduct); 
     141        $this->arrProducts  = $this->lfGetProductsList($arrSearchCondition, $this->disp_number, $this->objNavi->start_row, $objProduct); 
    142142 
    143143        switch ($this->getMode()) { 
     
    156156    /** 
    157157     * パラメーター情報の初期化 
    158      *  
     158     * 
    159159     * @param array $objFormParam フォームパラメータークラス 
    160160     * @return void 
     
    207207 
    208208    /* 商品一覧の表示 */ 
    209     function lfGetProductsList($searchCondition, $disp_number, $startno, $linemax, &$objProduct) 
     209    function lfGetProductsList($searchCondition, $disp_number, $startno, &$objProduct) 
    210210    { 
    211211        $arrOrderVal = array(); 
     
    427427    { 
    428428        $js_fnOnLoad = ''; 
    429         foreach ($arrProducts as $key => $value) { 
     429        foreach (array_keys($arrProducts) as $key) { 
    430430            if ($arrProducts[$key]['product_id'] == $product_id) { 
    431431                $arrProducts[$key]['product_class_id']  = $arrForm['product_class_id']; 
     
    447447     * @return void 
    448448     */ 
    449     function lfAddCart($arrForm, $referer) 
     449    function lfAddCart($arrForm) 
    450450    { 
    451451        $objCartSess = new SC_CartSession_Ex(); 
     
    555555            $arrErr = $this->lfCheckError($objFormParam); 
    556556            if (empty($arrErr)) { 
    557                 $this->lfAddCart($this->arrForm, $_SERVER['HTTP_REFERER']); 
     557                $this->lfAddCart($this->arrForm); 
    558558 
    559559                // 開いているカテゴリーツリーを維持するためのパラメーター 
Note: See TracChangeset for help on using the changeset viewer.