Ignore:
Timestamp:
2012/04/11 02:58:27 (12 years ago)
Author:
Seasoft
Message:

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

Location:
branches/version-2_12-dev/data/class
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_12-dev/data/class/api/SC_Api_Abstract.php

    r21713 r21734  
    106106        $this->objFormParam->convParam(); 
    107107        $this->arrErr = $this->objFormParam->checkError(false); 
    108         $this->arrErr = array_merge( (array)$this->arrErr, (array)$this->checkErrorExtended($arrParam) ); 
     108        $this->arrErr = array_merge((array)$this->arrErr, (array)$this->checkErrorExtended($arrParam)); 
    109109        return $this->objFormParam->getHashArray(); 
    110110    } 
  • branches/version-2_12-dev/data/class/api/SC_Api_Operation.php

    r21722 r21734  
    9898    protected function checkReferer() { 
    9999        $ret = false; 
    100         if(!SC_Utils_Ex::isBlank($_SERVER['HTTP_REFERER'])) { 
     100        if (!SC_Utils_Ex::isBlank($_SERVER['HTTP_REFERER'])) { 
    101101            $domain  = SC_Utils_Ex::sfIsHTTPS() ? HTTPS_URL : HTTP_URL; 
    102102            $pattern = sprintf('|^%s.*|', $domain); 
     
    144144        // Refer: https://images-na.ssl-images-amazon.com/images/G/09/associates/paapi/dg/index.html?Query_QueryAuth.html 
    145145        $check_str = ''; 
    146         foreach($arrParam as $key => $val) { 
     146        foreach ($arrParam as $key => $val) { 
    147147            switch ($key) { 
    148148                case 'Signature': 
     
    159159                     . $check_str; 
    160160        $signature = base64_encode(hash_hmac('sha256', $check_str, $secret_key, true)); 
    161         if($signature === $arrParam['Signature']) { 
     161        if ($signature === $arrParam['Signature']) { 
    162162            return true; 
    163163        } 
     
    206206            return false; 
    207207        } 
    208         $arrAuthTypes = explode("|", $arrApiConfig['auth_types']); 
     208        $arrAuthTypes = explode('|', $arrApiConfig['auth_types']); 
    209209        $result = false; 
    210210        foreach ($arrAuthTypes as $auth_type) { 
     
    249249                    break; 
    250250            } 
    251             if($ret === true) { 
     251            if ($ret === true) { 
    252252                $result = true; 
    253             }else{ 
     253            } else { 
    254254                $result = false; 
    255255                break;  // 1つでもfalseがあれば,その時点で終了 
     
    277277     * 
    278278     * @param array $arrPost リクエストパラメーター 
    279      * @return array( string レスポンス名, array レスポンス配列 ) 
     279     * @return array(string レスポンス名, array レスポンス配列) 
    280280     */ 
    281281    public function doApiAction($arrPost) { 
     
    313313 
    314314                    // オペレーション結果処理 
    315                     if($operation_result) { 
     315                    if ($operation_result) { 
    316316                        $arrOperationRequestValid = $objApiOperation->getRequestValidate(); 
    317317                        $arrResponseBody =  $objApiOperation->getResponseArray(); 
    318318                        $response_group_name = $objApiOperation->getResponseGroupName(); 
    319                     }else{ 
     319                    } else { 
    320320                        $arrErr = $objApiOperation->getErrorArray(); 
    321321                    } 
    322                 }else{ 
     322                } else { 
    323323                    $arrErr['ECCUBE.Operation.NoLoad'] = 'オペレーションをロード出来ませんでした。'; 
    324324                } 
    325             }else{ 
     325            } else { 
    326326                $arrErr['ECCUBE.Authority.NoAuthority'] = 'オペレーションの実行権限がありません。'; 
    327327            } 
     
    330330        if (count($arrErr) == 0) { 
    331331            // 実行成功 
    332             $arrResponseValidSection = array( 'Request' => array( 
     332            $arrResponseValidSection = array('Request' => array( 
    333333                                                            'IsValid' => 'True', 
    334334                                                            $operation_name . 'Request' => $arrOperationRequestValid 
     
    343343                $arrResponseErrorSection[] = array('Code' => $error_code, 'Message' => $error_msg); 
    344344            } 
    345             $arrResponseValidSection = array( 'Request' => array( 
     345            $arrResponseValidSection = array('Request' => array( 
    346346                                                            'IsValid' => 'False', 
    347347                                                            'Errors' => array('Error' => $arrResponseErrorSection) 
     
    350350            if (is_object($objApiOperation)) { 
    351351                $response_outer = $operation_name . 'Response'; 
    352             }else{ 
     352            } else { 
    353353                $response_outer = 'ECCUBEApiCommonResponse'; 
    354354            } 
     
    381381                'Arguments' => array(), 
    382382                ); 
    383         foreach($arrParam as $key => $val) { 
     383        foreach ($arrParam as $key => $val) { 
    384384            $arrRet['Arguments'][] = array('_attributes' => array('Name' => htmlentities($key, ENT_NOQUOTES, 'UTF-8'), 'Value' => htmlentities($val, ENT_NOQUOTES, 'UTF-8'))); 
    385385        } 
     
    390390    // TODO: ここらへんは SC_Displayに持って行きたい所だが・・ 
    391391    public function sendApiResponse($type, $response_outer_name, &$arrResponse) { 
    392         switch($type) { 
     392        switch ($type) { 
    393393            case 'xml': 
    394394                SC_Api_Utils_Ex::sendResponseXml($response_outer_name, $arrResponse); 
  • branches/version-2_12-dev/data/class/api/SC_Api_Utils.php

    r21722 r21734  
    2929 * @version $Id$ 
    3030 */ 
    31 define('API_UPLOAD_REALDIR', DATA_REALDIR . "downloads/api/"); 
    32 define('API_CLASS_EX_REALDIR', CLASS_EX_REALDIR . "api_extends/operations/"); 
    33 define('API_CLASS_REALDIR', CLASS_REALDIR . "api/operations/"); 
     31define('API_UPLOAD_REALDIR', DATA_REALDIR . 'downloads/api/'); 
     32define('API_CLASS_EX_REALDIR', CLASS_EX_REALDIR . 'api_extends/operations/'); 
     33define('API_CLASS_REALDIR', CLASS_REALDIR . 'api/operations/'); 
    3434 
    3535class SC_Api_Utils { 
     
    159159        // Core API ディレクトリ 
    160160        if (is_dir(API_CLASS_EX_REALDIR)) { 
    161             if($dh = opendir(API_CLASS_EX_REALDIR)) { 
     161            if ($dh = opendir(API_CLASS_EX_REALDIR)) { 
    162162                while (($file_name = readdir($dh)) !== false) { 
    163163                    if ($file_name != '.' && $file_name != '..' && substr($file_name, -4) == '.php') { 
     
    171171        // downaloads APIディレクトリ (for Plugin) 
    172172        if (is_dir(API_UPLOAD_REALDIR)) { 
    173             if($dh = opendir(API_UPLOAD_REALDIR)) { 
     173            if ($dh = opendir(API_UPLOAD_REALDIR)) { 
    174174                while (($file_name = readdir($dh)) !== false) { 
    175175                    if ($file_name != '.' && $file_name != '..' && substr($file_name, -4) == '.php') { 
     
    206206            'encoding' => 'UTF-8', 
    207207            'rootName' => $response_outer_name, 
    208             'rootAttributes' => array( 'xmlns' => self::API_XMLNS . ECCUBE_VERSION, 
     208            'rootAttributes' => array('xmlns' => self::API_XMLNS . ECCUBE_VERSION, 
    209209                                        'xml:lang' => self::API_XML_LANG), 
    210210            'defaultTagName' => 'Response', 
  • branches/version-2_12-dev/data/class/pages/admin/order/LC_Page_Admin_Order_Mail.php

    r21693 r21734  
    7474        $objPlugin = SC_Helper_Plugin_Ex::getSingletonInstance($this->plugin_activate_flg); 
    7575        $objPlugin->doAction('LC_Page_Admin_Order_Mail_action_before', array($this)); 
    76          
     76 
    7777        //一括送信用の処理 
    78         if(array_key_exists("mail_order_id",$_POST) and $_POST['mode'] == 'mail_select'){ 
    79             $_POST['order_id_array'] = implode(",",$_POST['mail_order_id']); 
    80         }else if(!array_key_exists("order_id_array",$_POST)){ 
     78        if (array_key_exists('mail_order_id',$_POST) and $_POST['mode'] == 'mail_select'){ 
     79            $_POST['order_id_array'] = implode(',',$_POST['mail_order_id']); 
     80        } else if(!array_key_exists('order_id_array',$_POST)){ 
    8181            $_POST['order_id_array'] = $_POST['order_id']; 
    8282        } 
    83          
    84          
     83 
     84 
    8585        //一括送信処理変数チェック(ここですべきかは課題) 
    86         if(preg_match("/^[0-9|\,]*$/",$_POST['order_id_array'])){ 
     86        if (preg_match("/^[0-9|\,]*$/",$_POST['order_id_array'])){ 
    8787            $this->order_id_array = $_POST['order_id_array']; 
    88         }else{ 
     88        } else { 
    8989            //エラーで元に戻す 
    9090            SC_Response_Ex::sendRedirect(ADMIN_ORDER_URLPATH); 
    9191            exit; 
    9292        } 
    93          
     93 
    9494        //メール本文の確認例は初めの1受注とする 
    95         if($this->order_id_array){ 
    96             $order_id_array = split(",",$this->order_id_array); 
     95        if ($this->order_id_array){ 
     96            $order_id_array = split(',',$this->order_id_array); 
    9797            $_POST['order_id'] = intval($order_id_array[0]); 
    9898            $this->order_id_count = count($order_id_array); 
    9999        } 
    100          
     100 
    101101        // パラメーター管理クラス 
    102102        $objFormParam = new SC_FormParam_Ex(); 
     
    179179    function doSend(&$objFormParam) { 
    180180        $arrErr = $objFormParam->checkerror(); 
    181          
     181 
    182182        // メールの送信 
    183183        if (count($arrErr) == 0) { 
    184184            // 注文受付メール(複数受注ID対応) 
    185             $order_id_array = explode(",",$this->order_id_array); 
    186             foreach($order_id_array as $order_id){ 
     185            $order_id_array = explode(',',$this->order_id_array); 
     186            foreach ($order_id_array as $order_id){ 
    187187                $objMail = new SC_Helper_Mail_Ex(); 
    188188                $objSendMail = $objMail->sfSendOrderMail($order_id, 
  • branches/version-2_12-dev/data/class/pages/admin/system/LC_Page_Admin_System_Bkup.php

    r21730 r21734  
    466466                    $row['bkup_name'] = $bkup_name; 
    467467                    $row['bkup_memo'] = '(記録なし。バックアップファイルのみ。)'; 
    468                     $row['create_date'] = date("Y-m-d H:i:s", filemtime($path)); 
     468                    $row['create_date'] = date('Y-m-d H:i:s', filemtime($path)); 
    469469                } 
    470470            } 
  • branches/version-2_12-dev/data/class/pages/admin/system/LC_Page_Admin_System_Plugin.php

    r21731 r21734  
    496496    function updatePlugin($target_plugin, $upload_file_name) { 
    497497        $arrErr = array(); 
    498          
     498 
    499499        // ファイルをチェックし展開します. 
    500500        $arrErr = $this->unpackPluginFile($upload_file_name, DOWNLOADS_TEMP_PLUGIN_UPDATE_DIR, $target_plugin['plugin_code']); 
  • branches/version-2_12-dev/data/class/pages/shopping/LC_Page_Shopping_Deliv.php

    r21693 r21734  
    130130                $objPurchase->setShipmentItemTempForSole($objCartSess, $shipping_id); 
    131131                $objSiteSess->setRegistFlag(); 
    132                  
     132 
    133133                // フックポイント. 
    134134                $objPlugin = SC_Helper_Plugin_Ex::getSingletonInstance($this->plugin_activate_flg); 
    135135                $objPlugin->doAction('LC_Page_Shopping_Deliv_action_customeraddr', array($this)); 
    136                  
     136 
    137137                SC_Response_Ex::sendRedirect(SHOPPING_PAYMENT_URLPATH); 
    138138                exit; 
  • branches/version-2_12-dev/data/class/pages/unsupported/LC_Page_Unsupported.php

    r21698 r21734  
    6262        $objPlugin = SC_Helper_Plugin_Ex::getSingletonInstance($this->plugin_activate_flg); 
    6363        $objPlugin->doAction('LC_Page_Unsupported_action_before', array($this)); 
    64          
     64 
    6565        // フックポイント. 
    6666        $objPlugin = SC_Helper_Plugin_Ex::getSingletonInstance($this->plugin_activate_flg); 
Note: See TracChangeset for help on using the changeset viewer.