From f4b28cbc0cbc5ace4d8d98e4d3c8d9b928e35595 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=AE=E3=81=B6?= Date: Fri, 8 May 2020 10:20:02 +0900 Subject: [PATCH 1/2] =?UTF-8?q?2.17=E7=B3=BB=E3=81=A0=E3=81=A82.13?= =?UTF-8?q?=E7=B3=BB=E3=81=AE=E3=83=A2=E3=82=B8=E3=83=A5=E3=83=BC=E3=83=AB?= =?UTF-8?q?=E3=82=92=E3=82=A4=E3=83=B3=E3=82=B9=E3=83=88=E3=83=BC=E3=83=AB?= =?UTF-8?q?=E3=81=8C=E5=87=BA=E6=9D=A5=E3=81=AA=E3=81=84=E5=95=8F=E9=A1=8C?= =?UTF-8?q?=E3=82=92=E5=BC=B7=E5=BC=95=E3=81=AB=E8=A7=A3=E6=B1=BA=E3=81=99?= =?UTF-8?q?=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../upgrade/LC_Page_Upgrade_ProductsList.php | 63 ++++++++++++++++++- 1 file changed, 62 insertions(+), 1 deletion(-) diff --git a/data/class/pages/upgrade/LC_Page_Upgrade_ProductsList.php b/data/class/pages/upgrade/LC_Page_Upgrade_ProductsList.php index 5707f6ff47..8ed289a3de 100644 --- a/data/class/pages/upgrade/LC_Page_Upgrade_ProductsList.php +++ b/data/class/pages/upgrade/LC_Page_Upgrade_ProductsList.php @@ -128,8 +128,69 @@ public function process($mode) $arrProducts = array(); foreach ($objRet->data as $product) { - $arrProducts[] = get_object_vars($product); + $tmp = get_object_vars($product); + + if ($tmp['download_flg'] == 1) { + $arrProducts[$tmp['product_id']] = $tmp; + } + } + + // todo 苦肉の策 + + // 再度リクエストを開始 + $objLog->log('* http request start'); + $arrPostData = array( + 'eccube_url' => HTTP_URL, + 'public_key' => sha1($public_key . $sha1_key), + 'sha1_key' => $sha1_key, + 'ver' => "2.13.17" // 2.13系も取得する + ); + $objReq = $this->request('products_list', $arrPostData); + + // リクエストチェック + $objLog->log('* http request check start'); + if (PEAR::isError($objReq)) { + $objJson->setError(OSTORE_E_C_HTTP_REQ); + $objJson->display(); + $objLog->error(OSTORE_E_C_HTTP_REQ, $objReq); + + return; + } + + // レスポンスチェック + $objLog->log('* http response check start'); + if ($objReq->getResponseCode() !== 200) { + $objJson->setError(OSTORE_E_C_HTTP_RESP); + $objJson->display(); + $objLog->error(OSTORE_E_C_HTTP_RESP, $objReq); + + return; + } + + $body = $objReq->getResponseBody(); + $objRet = $objJson->decode($body); + + // JSONデータのチェック + $objLog->log('* json deta check start'); + if (empty($objRet)) { + $objJson->setError(OSTORE_E_C_FAILED_JSON_PARSE); + $objJson->display(); + $objLog->error(OSTORE_E_C_FAILED_JSON_PARSE, $objReq); + + return; } + + if ($objRet->status === OSTORE_STATUS_SUCCESS) { + $objLog->log('* get products list ok'); + + foreach ($objRet->data as $product) { + $tmp = get_object_vars($product); + if (!isset($arrProducts[$tmp['product_id']])) { + $arrProducts[$tmp['product_id']] = $tmp; + } + } + } + $objView = new SC_AdminView_Ex(); $objView->assign('arrProducts', $arrProducts); From 949c42ed14268625ac5f5d8bc80ca7bdf59007c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=AE=E3=81=B6?= Date: Fri, 8 May 2020 10:34:48 +0900 Subject: [PATCH 2/2] =?UTF-8?q?=E6=96=87=E8=A8=80=E3=82=92=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data/class/pages/upgrade/LC_Page_Upgrade_ProductsList.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/data/class/pages/upgrade/LC_Page_Upgrade_ProductsList.php b/data/class/pages/upgrade/LC_Page_Upgrade_ProductsList.php index 8ed289a3de..fb675ff93d 100644 --- a/data/class/pages/upgrade/LC_Page_Upgrade_ProductsList.php +++ b/data/class/pages/upgrade/LC_Page_Upgrade_ProductsList.php @@ -186,6 +186,9 @@ public function process($mode) foreach ($objRet->data as $product) { $tmp = get_object_vars($product); if (!isset($arrProducts[$tmp['product_id']])) { + if ($tmp['download_flg'] == 1) { + $tmp['status'] = "2.13系のモジュールは十分に動作確認できてない場合があります" ; + } $arrProducts[$tmp['product_id']] = $tmp; } }