Changeset 21734 for branches/version-2_12-dev/data/class
- Timestamp:
- 2012/04/11 02:58:27 (12 years ago)
- 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 106 106 $this->objFormParam->convParam(); 107 107 $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)); 109 109 return $this->objFormParam->getHashArray(); 110 110 } -
branches/version-2_12-dev/data/class/api/SC_Api_Operation.php
r21722 r21734 98 98 protected function checkReferer() { 99 99 $ret = false; 100 if (!SC_Utils_Ex::isBlank($_SERVER['HTTP_REFERER'])) {100 if (!SC_Utils_Ex::isBlank($_SERVER['HTTP_REFERER'])) { 101 101 $domain = SC_Utils_Ex::sfIsHTTPS() ? HTTPS_URL : HTTP_URL; 102 102 $pattern = sprintf('|^%s.*|', $domain); … … 144 144 // Refer: https://images-na.ssl-images-amazon.com/images/G/09/associates/paapi/dg/index.html?Query_QueryAuth.html 145 145 $check_str = ''; 146 foreach ($arrParam as $key => $val) {146 foreach ($arrParam as $key => $val) { 147 147 switch ($key) { 148 148 case 'Signature': … … 159 159 . $check_str; 160 160 $signature = base64_encode(hash_hmac('sha256', $check_str, $secret_key, true)); 161 if ($signature === $arrParam['Signature']) {161 if ($signature === $arrParam['Signature']) { 162 162 return true; 163 163 } … … 206 206 return false; 207 207 } 208 $arrAuthTypes = explode( "|", $arrApiConfig['auth_types']);208 $arrAuthTypes = explode('|', $arrApiConfig['auth_types']); 209 209 $result = false; 210 210 foreach ($arrAuthTypes as $auth_type) { … … 249 249 break; 250 250 } 251 if ($ret === true) {251 if ($ret === true) { 252 252 $result = true; 253 } else{253 } else { 254 254 $result = false; 255 255 break; // 1つでもfalseがあれば,その時点で終了 … … 277 277 * 278 278 * @param array $arrPost リクエストパラメーター 279 * @return array( string レスポンス名, array レスポンス配列)279 * @return array(string レスポンス名, array レスポンス配列) 280 280 */ 281 281 public function doApiAction($arrPost) { … … 313 313 314 314 // オペレーション結果処理 315 if ($operation_result) {315 if ($operation_result) { 316 316 $arrOperationRequestValid = $objApiOperation->getRequestValidate(); 317 317 $arrResponseBody = $objApiOperation->getResponseArray(); 318 318 $response_group_name = $objApiOperation->getResponseGroupName(); 319 } else{319 } else { 320 320 $arrErr = $objApiOperation->getErrorArray(); 321 321 } 322 } else{322 } else { 323 323 $arrErr['ECCUBE.Operation.NoLoad'] = 'オペレーションをロード出来ませんでした。'; 324 324 } 325 } else{325 } else { 326 326 $arrErr['ECCUBE.Authority.NoAuthority'] = 'オペレーションの実行権限がありません。'; 327 327 } … … 330 330 if (count($arrErr) == 0) { 331 331 // 実行成功 332 $arrResponseValidSection = array( 332 $arrResponseValidSection = array('Request' => array( 333 333 'IsValid' => 'True', 334 334 $operation_name . 'Request' => $arrOperationRequestValid … … 343 343 $arrResponseErrorSection[] = array('Code' => $error_code, 'Message' => $error_msg); 344 344 } 345 $arrResponseValidSection = array( 345 $arrResponseValidSection = array('Request' => array( 346 346 'IsValid' => 'False', 347 347 'Errors' => array('Error' => $arrResponseErrorSection) … … 350 350 if (is_object($objApiOperation)) { 351 351 $response_outer = $operation_name . 'Response'; 352 } else{352 } else { 353 353 $response_outer = 'ECCUBEApiCommonResponse'; 354 354 } … … 381 381 'Arguments' => array(), 382 382 ); 383 foreach ($arrParam as $key => $val) {383 foreach ($arrParam as $key => $val) { 384 384 $arrRet['Arguments'][] = array('_attributes' => array('Name' => htmlentities($key, ENT_NOQUOTES, 'UTF-8'), 'Value' => htmlentities($val, ENT_NOQUOTES, 'UTF-8'))); 385 385 } … … 390 390 // TODO: ここらへんは SC_Displayに持って行きたい所だが・・ 391 391 public function sendApiResponse($type, $response_outer_name, &$arrResponse) { 392 switch ($type) {392 switch ($type) { 393 393 case 'xml': 394 394 SC_Api_Utils_Ex::sendResponseXml($response_outer_name, $arrResponse); -
branches/version-2_12-dev/data/class/api/SC_Api_Utils.php
r21722 r21734 29 29 * @version $Id$ 30 30 */ 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/");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/'); 34 34 35 35 class SC_Api_Utils { … … 159 159 // Core API ディレクトリ 160 160 if (is_dir(API_CLASS_EX_REALDIR)) { 161 if ($dh = opendir(API_CLASS_EX_REALDIR)) {161 if ($dh = opendir(API_CLASS_EX_REALDIR)) { 162 162 while (($file_name = readdir($dh)) !== false) { 163 163 if ($file_name != '.' && $file_name != '..' && substr($file_name, -4) == '.php') { … … 171 171 // downaloads APIディレクトリ (for Plugin) 172 172 if (is_dir(API_UPLOAD_REALDIR)) { 173 if ($dh = opendir(API_UPLOAD_REALDIR)) {173 if ($dh = opendir(API_UPLOAD_REALDIR)) { 174 174 while (($file_name = readdir($dh)) !== false) { 175 175 if ($file_name != '.' && $file_name != '..' && substr($file_name, -4) == '.php') { … … 206 206 'encoding' => 'UTF-8', 207 207 'rootName' => $response_outer_name, 208 'rootAttributes' => array( 208 'rootAttributes' => array('xmlns' => self::API_XMLNS . ECCUBE_VERSION, 209 209 'xml:lang' => self::API_XML_LANG), 210 210 'defaultTagName' => 'Response', -
branches/version-2_12-dev/data/class/pages/admin/order/LC_Page_Admin_Order_Mail.php
r21693 r21734 74 74 $objPlugin = SC_Helper_Plugin_Ex::getSingletonInstance($this->plugin_activate_flg); 75 75 $objPlugin->doAction('LC_Page_Admin_Order_Mail_action_before', array($this)); 76 76 77 77 //一括送信用の処理 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)){ 81 81 $_POST['order_id_array'] = $_POST['order_id']; 82 82 } 83 84 83 84 85 85 //一括送信処理変数チェック(ここですべきかは課題) 86 if (preg_match("/^[0-9|\,]*$/",$_POST['order_id_array'])){86 if (preg_match("/^[0-9|\,]*$/",$_POST['order_id_array'])){ 87 87 $this->order_id_array = $_POST['order_id_array']; 88 } else{88 } else { 89 89 //エラーで元に戻す 90 90 SC_Response_Ex::sendRedirect(ADMIN_ORDER_URLPATH); 91 91 exit; 92 92 } 93 93 94 94 //メール本文の確認例は初めの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); 97 97 $_POST['order_id'] = intval($order_id_array[0]); 98 98 $this->order_id_count = count($order_id_array); 99 99 } 100 100 101 101 // パラメーター管理クラス 102 102 $objFormParam = new SC_FormParam_Ex(); … … 179 179 function doSend(&$objFormParam) { 180 180 $arrErr = $objFormParam->checkerror(); 181 181 182 182 // メールの送信 183 183 if (count($arrErr) == 0) { 184 184 // 注文受付メール(複数受注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){ 187 187 $objMail = new SC_Helper_Mail_Ex(); 188 188 $objSendMail = $objMail->sfSendOrderMail($order_id, -
branches/version-2_12-dev/data/class/pages/admin/system/LC_Page_Admin_System_Bkup.php
r21730 r21734 466 466 $row['bkup_name'] = $bkup_name; 467 467 $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)); 469 469 } 470 470 } -
branches/version-2_12-dev/data/class/pages/admin/system/LC_Page_Admin_System_Plugin.php
r21731 r21734 496 496 function updatePlugin($target_plugin, $upload_file_name) { 497 497 $arrErr = array(); 498 498 499 499 // ファイルをチェックし展開します. 500 500 $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 130 130 $objPurchase->setShipmentItemTempForSole($objCartSess, $shipping_id); 131 131 $objSiteSess->setRegistFlag(); 132 132 133 133 // フックポイント. 134 134 $objPlugin = SC_Helper_Plugin_Ex::getSingletonInstance($this->plugin_activate_flg); 135 135 $objPlugin->doAction('LC_Page_Shopping_Deliv_action_customeraddr', array($this)); 136 136 137 137 SC_Response_Ex::sendRedirect(SHOPPING_PAYMENT_URLPATH); 138 138 exit; -
branches/version-2_12-dev/data/class/pages/unsupported/LC_Page_Unsupported.php
r21698 r21734 62 62 $objPlugin = SC_Helper_Plugin_Ex::getSingletonInstance($this->plugin_activate_flg); 63 63 $objPlugin->doAction('LC_Page_Unsupported_action_before', array($this)); 64 64 65 65 // フックポイント. 66 66 $objPlugin = SC_Helper_Plugin_Ex::getSingletonInstance($this->plugin_activate_flg);
Note: See TracChangeset
for help on using the changeset viewer.