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/SC_CartSession.php

    r21510 r21514  
    5252        // 1世代古いコピー情報は、削除しておく 
    5353        foreach ($_SESSION as $k => $val) { 
    54             if ($k != $this->key_tmp && preg_match("/^savecart_/", $k)) { 
     54            if ($k != $this->key_tmp && preg_match('/^savecart_/', $k)) { 
    5555                unset($this->cartSession[$productTypeId][$k]); 
    5656            } 
     
    6161    function getCancelPurchase($productTypeId) { 
    6262        $ret = isset($this->cartSession[$productTypeId]['cancel_purchase']) 
    63             ? $this->cartSession[$productTypeId]['cancel_purchase'] : ""; 
     63            ? $this->cartSession[$productTypeId]['cancel_purchase'] : ''; 
    6464        $this->cartSession[$productTypeId]['cancel_purchase'] = false; 
    6565        return $ret; 
     
    171171 
    172172            if (!isset($this->cartSession[$productTypeId][$i]['price'])) { 
    173                 $this->cartSession[$productTypeId][$i]['price'] = ""; 
     173                $this->cartSession[$productTypeId][$i]['price'] = ''; 
    174174            } 
    175175 
     
    177177 
    178178            if (!isset($this->cartSession[$productTypeId][$i]['quantity'])) { 
    179                 $this->cartSession[$productTypeId][$i]['quantity'] = ""; 
     179                $this->cartSession[$productTypeId][$i]['quantity'] = ''; 
    180180            } 
    181181            $quantity = $this->cartSession[$productTypeId][$i]['quantity']; 
     
    212212 
    213213                if (!isset($this->cartSession[$productTypeId][$i]['point_rate'])) { 
    214                     $this->cartSession[$productTypeId][$i]['point_rate'] = ""; 
     214                    $this->cartSession[$productTypeId][$i]['point_rate'] = ''; 
    215215                } 
    216216                $point_rate = $this->cartSession[$productTypeId][$i]['point_rate']; 
    217217 
    218218                if (!isset($this->cartSession[$productTypeId][$i]['id'][0])) { 
    219                     $this->cartSession[$productTypeId][$i]['id'][0] = ""; 
     219                    $this->cartSession[$productTypeId][$i]['id'][0] = ''; 
    220220                } 
    221221                $point = SC_Utils_Ex::sfPrePoint($price, $point_rate); 
     
    254254        // 前頁として記録しないページを指定する。 
    255255        $arrExclude = array( 
    256             "/shopping/" 
     256            '/shopping/' 
    257257        ); 
    258258        $arrExclude = array_merge($arrExclude, $excludePaths); 
     
    260260        // ページチェックを行う。 
    261261        foreach ($arrExclude as $val) { 
    262             if (preg_match("|" . preg_quote($val) . "|", $url)) { 
     262            if (preg_match('|' . preg_quote($val) . '|', $url)) { 
    263263                $exclude = true; 
    264264                break; 
     
    337337        for ($i = 0; $i <= $max; $i++) { 
    338338            if(isset($this->cartSession[$productTypeId][$i]['cart_no']) 
    339                && $this->cartSession[$productTypeId][$i]['cart_no'] != "") { 
     339               && $this->cartSession[$productTypeId][$i]['cart_no'] != '') { 
    340340 
    341341                // 商品情報は常に取得 
     
    392392        $max = $this->getMax($productTypeId); 
    393393        for ($i = 0; $i <= $max; $i++) { 
    394             if ($this->cartSession[$productTypeId][$i]['cart_no'] != "") { 
     394            if ($this->cartSession[$productTypeId][$i]['cart_no'] != '') { 
    395395                $arrRet[] = $this->cartSession[$productTypeId][$i]['id'][0]; 
    396396            } 
     
    408408        $max = $this->getMax($productTypeId); 
    409409        for ($i = 0; $i <= $max; $i++) { 
    410             if ($this->cartSession[$productTypeId][$i]['cart_no'] != "") { 
     410            if ($this->cartSession[$productTypeId][$i]['cart_no'] != '') { 
    411411                $arrRet[] = $this->cartSession[$productTypeId][$i]['id']; 
    412412            } 
     
    518518    function checkProducts($productTypeId) { 
    519519        $objProduct = new SC_Product_Ex(); 
    520         $tpl_message = ""; 
     520        $tpl_message = ''; 
    521521 
    522522        // カート内の情報を取得 
     
    538538                $arrDeliv = SC_Helper_Purchase_Ex::getDeliv($productTypeId); 
    539539                if (SC_Utils_Ex::isBlank($arrDeliv)) { 
    540                     $tpl_message .= "※「" . $product['name'] . "」はまだ配送の準備ができておりません。恐れ入りますがお問い合わせページよりお問い合わせください。\n"; 
     540                    $tpl_message .= '※「' . $product['name'] . "」はまだ配送の準備ができておりません。恐れ入りますがお問い合わせページよりお問い合わせください。\n"; 
    541541                    $this->delProduct($item['cart_no'], $productTypeId); 
    542542                } 
     
    550550                        $this->setProductValue($item['id'], 'quantity', $limit, $productTypeId); 
    551551                        $this->setProductValue($item['id'], 'total_inctax', SC_Helper_DB_Ex::sfCalcIncTax($item['price']) * $limit, $productTypeId); 
    552                         $tpl_message .= "※「" . $product['name'] . "」は販売制限(または在庫が不足)しております。一度に数量{$limit}を超える購入はできません。\n"; 
     552                        $tpl_message .= '※「' . $product['name'] . "」は販売制限(または在庫が不足)しております。一度に数量{$limit}を超える購入はできません。\n"; 
    553553                    } else { 
    554554                        $this->delProduct($item['cart_no'], $productTypeId); 
    555                         $tpl_message .= "※「" . $product['name'] . "」は売り切れました。\n"; 
     555                        $tpl_message .= '※「' . $product['name'] . "」は売り切れました。\n"; 
    556556                        continue; 
    557557                    } 
     
    618618     */ 
    619619    function calculate($productTypeId, &$objCustomer, $use_point = 0, 
    620                        $deliv_pref = "", $charge = 0, $discount = 0, $deliv_id = 0) { 
     620                       $deliv_pref = '', $charge = 0, $discount = 0, $deliv_id = 0) { 
    621621        $objDb = new SC_Helper_DB_Ex(); 
    622622 
     
    659659            $results['add_point'] = SC_Helper_DB_Ex::sfGetAddPoint($total_point, 
    660660                                                                   $use_point); 
    661             if ($objCustomer != "") { 
     661            if ($objCustomer != '') { 
    662662                // 誕生日月であった場合 
    663663                if ($objCustomer->isBirthMonth()) { 
Note: See TracChangeset for help on using the changeset viewer.