Ignore:
Timestamp:
2007/09/05 14:26:24 (17 years ago)
Author:
nanasess
Message:

リファクタリング

  • 未定義変数の修正
  • 循環参照の修正
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/feature-module-update/data/class/pages/shopping/LC_Page_Shopping.php

    r15532 r15610  
    1414 * @package Page 
    1515 * @author LOCKON CO.,LTD. 
    16  * @version $Id$ 
     16 * @version $Id:LC_Page_Shopping.php 15532 2007-08-31 14:39:46Z nanasess $ 
    1717 */ 
    1818class LC_Page_Shopping extends LC_Page { 
     
    2323    var $objFormParam; 
    2424 
    25     // TODO 
    26     var $arrSession; 
     25    /** 年 */ 
     26    var $year; 
    2727 
    2828    // }}} 
     
    7979        } 
    8080 
     81        if (!isset($_POST['mode'])) $_POST['mode'] = ""; 
     82 
    8183        switch($_POST['mode']) { 
    8284        case 'nonmember_confirm': 
    83             $this = $this->lfSetNonMember($this); 
     85            $this->lfSetNonMember($this); 
    8486            // ※breakなし 
    8587        case 'confirm': 
     
    102104                $objSiteSess->setRegistFlag(); 
    103105                // お支払い方法選択ページへ移動 
    104                 $this->sendRedirect($this->getLocation(URL_SHOP_PAYMENT, array())); 
     106                $this->sendRedirect($this->getLocation(URL_SHOP_PAYMENT)); 
    105107                exit; 
    106108            } 
     
    110112        case 'return': 
    111113            // 確認ページへ移動 
    112             $this->sendRedirect($this->getLocation(URL_CART_TOP, array())); 
     114            $this->sendRedirect($this->getLocation(URL_CART_TOP)); 
    113115            exit; 
    114116            break; 
    115117        case 'nonmember': 
    116             $this = $this->lfSetNonMember($this); 
     118            $this->lfSetNonMember($this); 
    117119            // ※breakなし 
    118120        default: 
    119             if($_GET['from'] == 'nonmember') { 
    120                 $this = $this->lfSetNonMember($this); 
     121            if(isset($_GET['form']) && $_GET['from'] == 'nonmember') { 
     122                $this->lfSetNonMember($this); 
    121123            } 
    122124            // ユーザユニークIDの取得 
     
    125127            $where = "order_temp_id = ?"; 
    126128            $arrRet = $objQuery->select("*", "dtb_order_temp", $where, array($uniqid)); 
     129            if (empty($arrRet)) $arrRet = array( 
     130                                                array('order_email' => "", 
     131                                                      'order_birth' => "")); 
     132 
    127133            // DB値の取得 
    128134            $this->objFormParam->setParam($arrRet[0]); 
     
    151157        $this->arrForm = $this->objFormParam->getFormParamList(); 
    152158 
    153         if($this->arrForm['year']['value'] == ""){ 
     159        if(empty($this->arrForm['year']['value'])){ 
    154160            $this->arrForm['year']['value'] = '----'; 
    155161        } 
     
    171177 
    172178    /* 非会員入力ページのセット */ 
    173     function lfSetNonMember($objPage) { 
     179    function lfSetNonMember(&$objPage) { 
    174180        $objPage->tpl_mainpage = 'shopping/nonmember_input.tpl'; 
    175181        $objPage->tpl_css = array(); 
    176182        $objPage->tpl_css[] = URL_DIR.'css/layout/login/nonmember.css'; 
    177         return $objPage; 
    178183    } 
    179184 
Note: See TracChangeset for help on using the changeset viewer.