Ignore:
Timestamp:
2007/08/24 21:59:00 (17 years ago)
Author:
nanasess
Message:

リファクタリングと未定義変数の修正

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/feature-module-update/data/class/pages/products/LC_Page_Products_List.php

    r15344 r15354  
    5858    function process() { 
    5959        $conn = new SC_DBConn(); 
     60        $objDb = new SC_Helper_DB_Ex(); 
    6061 
    6162        //表示件数の選択 
     
    133134        $this = $layout->sfGetPageLayout($this, false, "products/list.php"); 
    134135 
    135         if(isset($_POST['mode']) && $_POST['mode'] == "cart"  
     136        if(isset($_POST['mode']) && $_POST['mode'] == "cart" 
    136137           && $_POST['product_id'] != "") { 
    137              
     138 
    138139            // 値の正当性チェック 
    139             if(!SC_Utils_Ex::sfIsInt($_POST['product_id']) || !SC_Utils_Ex::sfIsRecord("dtb_products", "product_id", $_POST['product_id'], "del_flg = 0 AND status = 1")) { 
     140            if(!SC_Utils_Ex::sfIsInt($_POST['product_id']) || !$objDb->sfIsRecord("dtb_products", "product_id", $_POST['product_id'], "del_flg = 0 AND status = 1")) { 
    140141                SC_Utils_Ex::sfDispSiteError(PRODUCT_NOT_FOUND); 
    141142            } else { 
     
    158159                    $objCartSess->setPrevURL($_SERVER['REQUEST_URI']); 
    159160                    $objCartSess->addProduct(array($_POST['product_id'], $classcategory_id1, $classcategory_id2), $_POST[$quantity]); 
    160                     header("Location: " . URL_CART_TOP); 
     161                    $this->sendRedirect($this->getLocation(URL_CART_TOP)); 
    161162                    exit; 
    162163                } 
    163164            } 
    164165        } 
    165  
    166166 
    167167        $this->tpl_subtitle = $tpl_subtitle; 
     
    228228        // カテゴリからのWHERE文字列取得 
    229229        if ( $category_id ) { 
    230             list($tmp_where, $arrval) = SC_Utils_Ex::sfGetCatWhere($category_id); 
     230            list($tmp_where, $arrval) = $objDb->sfGetCatWhere($category_id); 
    231231            if($tmp_where != "") { 
    232232                $where.= " AND $tmp_where"; 
Note: See TracChangeset for help on using the changeset viewer.