Ignore:
Timestamp:
2012/02/06 11:05:15 (12 years ago)
Author:
Seasoft
Message:

#1613 (ソース整形・ソースコメントの改善)

  • Zend Framework PHP 標準コーディング規約への準拠を高めた
Location:
branches/version-2_12-dev/data/class/pages/admin/order
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_12-dev/data/class/pages/admin/order/LC_Page_Admin_Order.php

    r21420 r21441  
    9898        $this->arrForm = $objFormParam->getFormParamList(); 
    9999 
    100         switch($this->getMode()) { 
     100        switch ($this->getMode()) { 
    101101        // 削除 
    102102        case 'delete': 
     
    119119                $where = "del_flg = 0"; 
    120120                foreach ($arrParam as $key => $val) { 
    121                     if($val == "") { 
     121                    if ($val == "") { 
    122122                        continue; 
    123123                    } 
     
    130130                 * 処理を実行 
    131131                 * ----------------------------------------------- */ 
    132                 switch($this->getMode()) { 
     132                switch ($this->getMode()) { 
    133133                // CSVを送信する。 
    134134                case 'csv': 
     
    290290        case 'search_order_sex': 
    291291            $tmp_where = ""; 
    292             foreach($objFormParam->getValue($key) as $element) { 
    293                 if($element != "") { 
    294                     if(SC_Utils_Ex::isBlank($tmp_where)) { 
     292            foreach ($objFormParam->getValue($key) as $element) { 
     293                if ($element != "") { 
     294                    if (SC_Utils_Ex::isBlank($tmp_where)) { 
    295295                        $tmp_where .= " AND (order_sex = ?"; 
    296296                    } else { 
     
    301301            } 
    302302 
    303             if(!SC_Utils_Ex::isBlank($tmp_where)) { 
     303            if (!SC_Utils_Ex::isBlank($tmp_where)) { 
    304304                $tmp_where .= ")"; 
    305305                $where .= " $tmp_where "; 
     
    316316        case 'search_payment_id': 
    317317            $tmp_where = ""; 
    318             foreach($objFormParam->getValue($key) as $element) { 
    319                 if($element != "") { 
    320                     if($tmp_where == "") { 
     318            foreach ($objFormParam->getValue($key) as $element) { 
     319                if ($element != "") { 
     320                    if ($tmp_where == "") { 
    321321                        $tmp_where .= " AND (payment_id = ?"; 
    322322                    } else { 
     
    327327            } 
    328328 
    329             if(!SC_Utils_Ex::isBlank($tmp_where)) { 
     329            if (!SC_Utils_Ex::isBlank($tmp_where)) { 
    330330                $tmp_where .= ")"; 
    331331                $where .= " $tmp_where "; 
     
    417417    function doOutputCSV($where, $arrVal, $order) { 
    418418        require_once CLASS_EX_REALDIR . 'helper_extends/SC_Helper_CSV_Ex.php'; 
    419         if($where != "") { 
     419        if ($where != "") { 
    420420            $where = " WHERE $where "; 
    421421        } 
  • branches/version-2_12-dev/data/class/pages/admin/order/LC_Page_Admin_Order_Edit.php

    r21420 r21441  
    152152        $this->arrSearchHidden = $objFormParam->getSearchArray(); 
    153153 
    154         switch($this->getMode()) { 
     154        switch ($this->getMode()) { 
    155155        case 'pre_edit': 
    156156        case 'order_id': 
     
    564564        $totalpoint = 0; 
    565565        $totaltax = 0; 
    566         for($i = 0; $i < $max; $i++) { 
     566        for ($i = 0; $i < $max; $i++) { 
    567567            // 小計の計算 
    568568            $subtotal += SC_Helper_DB_Ex::sfCalcIncTax($arrValues['price'][$i]) * $arrValues['quantity'][$i]; 
     
    665665        $k = 0; 
    666666        $arrStockData = array(); 
    667         for($i = 0; $i < $max; $i++) { 
     667        for ($i = 0; $i < $max; $i++) { 
    668668            if (!empty($arrDetail[$i]['product_id'])) { 
    669669                $arrPreDetail = $objQuery->select('*', "dtb_order_detail", "order_id = ? AND product_class_id = ?", array($order_id, $arrDetail[$i]['product_class_id'])); 
  • branches/version-2_12-dev/data/class/pages/admin/order/LC_Page_Admin_Order_Mail.php

    r21420 r21441  
    8484        $this->arrSearchHidden = $objFormParam->getSearchArray(); 
    8585 
    86         switch($this->getMode()) { 
     86        switch ($this->getMode()) { 
    8787            case 'pre_edit': 
    8888                break; 
     
    9191            case 'send': 
    9292                $sendStatus = $this->doSend($objFormParam); 
    93                 if($sendStatus === true){ 
     93                if ($sendStatus === true) { 
    9494                    SC_Response_Ex::sendRedirect(ADMIN_ORDER_URLPATH); 
    9595                    exit; 
    96                 }else{ 
     96                } else { 
    9797                    $this->arrErr = $sendStatus; 
    9898                } 
    9999            case 'confirm': 
    100100                $status = $this->confirm($objFormParam); 
    101                 if($status === true){ 
     101                if ($status === true) { 
    102102                    $this->arrHidden = $objFormParam->getHashArray(); 
    103103                    return ; 
    104                 }else{ 
     104                } else { 
    105105                    $this->arrErr = $status; 
    106106                } 
     
    111111        } 
    112112 
    113         if(SC_Utils_Ex::sfIsInt($objFormParam->getValue('order_id'))) { 
     113        if (SC_Utils_Ex::sfIsInt($objFormParam->getValue('order_id'))) { 
    114114            $this->arrMailHistory = $this->getMailHistory($objFormParam->getValue('order_id')); 
    115115        } 
     
    185185     */ 
    186186    function changeData(&$objFormParam){ 
    187         if(SC_Utils_Ex::sfIsInt($objFormParam->getValue('template_id'))) { 
     187        if (SC_Utils_Ex::sfIsInt($objFormParam->getValue('template_id'))) { 
    188188            $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    189189            $where = "template_id = ?"; 
    190190            $mailTemplates = $objQuery->select("subject, header, footer", "dtb_mailtemplate", $where, array($objFormParam->getValue('template_id'))); 
    191             if(!is_null($mailTemplates )){ 
    192                 foreach(array('subject','header','footer') as $key){ 
     191            if (!is_null($mailTemplates )) { 
     192                foreach (array('subject','header','footer') as $key) { 
    193193                    $objFormParam->setValue($key,$mailTemplates[$key]); 
    194194                } 
    195195            } 
    196196            $objFormParam->setParam($mailTemplates[0]); 
    197         }else{ 
    198             foreach(array('subject','header','footer') as $key){ 
     197        } else { 
     198            foreach (array('subject','header','footer') as $key) { 
    199199                $objFormParam->setValue($key,""); 
    200200            } 
  • branches/version-2_12-dev/data/class/pages/admin/order/LC_Page_Admin_Order_MailView.php

    r21420 r21441  
    6666    function action() { 
    6767        $send_id = $_GET['send_id']; 
    68         if(SC_Utils_Ex::sfIsInt($send_id)) { 
     68        if (SC_Utils_Ex::sfIsInt($send_id)) { 
    6969            $mailHistory = $this->getMailHistory($send_id); 
    7070            $this->tpl_subject = $mailHistory[0]['subject']; 
  • branches/version-2_12-dev/data/class/pages/admin/order/LC_Page_Admin_Order_Pdf.php

    r21420 r21441  
    9494        // どんな状態の時に isset($arrRet) == trueになるんだ? これ以前に$arrRet無いが、、、、 
    9595        if (!isset($arrRet)) $arrRet = array(); 
    96         switch($this->getMode()) { 
     96        switch ($this->getMode()) { 
    9797            case 'confirm': 
    9898                $status = $this->createPdf($this->objFormParam); 
    99                 if($status === true){ 
     99                if ($status === true) { 
    100100                    exit; 
    101                 }else{ 
     101                } else { 
    102102                    $this->arrErr = $status; 
    103103                } 
     
    131131 
    132132        // 注文番号があったら、セットする 
    133         if(SC_Utils_Ex::sfIsInt($order_id)) { 
     133        if (SC_Utils_Ex::sfIsInt($order_id)) { 
    134134            $arrForm['order_id'][0] = $order_id; 
    135135        } elseif (is_array($pdf_order_id)) { 
     
    164164            $objFpdf->createPdf(); 
    165165            return true; 
    166         }else{ 
     166        } else { 
    167167            return $arrErr; 
    168168        } 
     
    211211 
    212212        $year = $objFormParam->getValue('year'); 
    213         if(!is_numeric($year)){ 
     213        if (!is_numeric($year)) { 
    214214            $arrErr['year'] = "発行年は数値で入力してください。"; 
    215215        } 
    216216 
    217217        $month = $objFormParam->getValue('month'); 
    218         if(!is_numeric($month)){ 
     218        if (!is_numeric($month)) { 
    219219            $arrErr['month'] = "発行月は数値で入力してください。"; 
    220         }else if(0 >= $month && 12 < $month){ 
     220        }else if (0 >= $month && 12 < $month) { 
    221221 
    222222            $arrErr['month'] = "発行月は1〜12の間で入力してください。"; 
     
    224224 
    225225        $day = $objFormParam->getValue('day'); 
    226         if(!is_numeric($day)){ 
     226        if (!is_numeric($day)) { 
    227227            $arrErr['day'] = "発行日は数値で入力してください。"; 
    228         }else if(0 >= $day && 31 < $day){ 
     228        }else if (0 >= $day && 31 < $day) { 
    229229 
    230230            $arrErr['day'] = "発行日は1〜31の間で入力してください。"; 
  • branches/version-2_12-dev/data/class/pages/admin/order/LC_Page_Admin_Order_ProductSelect.php

    r21424 r21441  
    205205        $bind = array(); 
    206206        foreach ($arrForm as $key => $val) { 
    207             if($val == "") { 
     207            if ($val == "") { 
    208208                continue; 
    209209            } 
     
    216216                case 'search_category_id': 
    217217                    list($tmp_where, $tmp_bind) = $objDb->sfGetCatWhere($val); 
    218                     if($tmp_where != "") { 
     218                    if ($tmp_where != "") { 
    219219                        $where.= " AND alldtl.product_id IN (SELECT product_id FROM dtb_product_categories WHERE " . $tmp_where . ")"; 
    220220                        $bind = array_merge((array)$bind, (array)$tmp_bind); 
     
    241241     */ 
    242242    function getNo($globalParams){ 
    243         foreach ($globalParams as $params){ 
    244             if(isset($params['no']) && $params['no']!= ''){ 
     243        foreach ($globalParams as $params) { 
     244            if (isset($params['no']) && $params['no']!= '') { 
    245245                return intval($params['no']); 
    246246            } 
     
    256256    function sortProducts($arrProduct_id,$productList){ 
    257257        $products  = array(); 
    258         foreach($productList as $item) { 
     258        foreach ($productList as $item) { 
    259259            $products[ $item['product_id'] ] = $item; 
    260260        } 
    261261        $arrProducts = array(); 
    262         foreach($arrProduct_id as $product_id) { 
     262        foreach ($arrProduct_id as $product_id) { 
    263263            $arrProducts[] = $products[$product_id]; 
    264264        } 
  • branches/version-2_12-dev/data/class/pages/admin/order/LC_Page_Admin_Order_Status.php

    r21420 r21441  
    8787        $this->arrPayment = $objDb->sfGetIDValueList("dtb_payment", "payment_id", "payment_method"); 
    8888 
    89         switch ($this->getMode()){ 
     89        switch ($this->getMode()) { 
    9090            case 'update': 
    9191                switch ($objFormParam->getValue('change_status')) { 
     
    144144        $arrRet = $objFormParam->getHashArray(); 
    145145        $arrErr = $objFormParam->checkError(); 
    146         if(is_null($objFormParam->getValue('search_pageno'))){ 
     146        if (is_null($objFormParam->getValue('search_pageno'))) { 
    147147            $objFormParam->setValue('search_pageno', 1); 
    148148        } 
    149149 
    150         if($this->getMode() == 'change'){ 
    151             if(is_null($objFormParam->getValue('change_status'))){ 
     150        if ($this->getMode() == 'change') { 
     151            if (is_null($objFormParam->getValue('change_status'))) { 
    152152                $objFormParam->setValue('change_status',""); 
    153153            } 
Note: See TracChangeset for help on using the changeset viewer.