From aa2b8a8d47a96000d3751ffce3d6ae7d1ef698ba Mon Sep 17 00:00:00 2001 From: Tao Sasaki <485749+tao-s@users.noreply.github.com> Date: Wed, 30 Mar 2022 16:31:30 +0900 Subject: [PATCH 1/3] =?UTF-8?q?ref=20#5341=20=E7=AE=A1=E7=90=86=E7=94=BB?= =?UTF-8?q?=E9=9D=A2=E3=81=8B=E3=82=89phpinfo=E3=81=AE=E6=83=85=E5=A0=B1?= =?UTF-8?q?=E3=82=92=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/template/plugin/HogePlugin/index.twig | 11 ++++++++++ .../Admin/Setting/System/SystemController.php | 13 ------------ .../template/admin/Setting/System/system.twig | 20 ------------------- 3 files changed, 11 insertions(+), 33 deletions(-) create mode 100644 app/template/plugin/HogePlugin/index.twig diff --git a/app/template/plugin/HogePlugin/index.twig b/app/template/plugin/HogePlugin/index.twig new file mode 100644 index 00000000000..42d728c0544 --- /dev/null +++ b/app/template/plugin/HogePlugin/index.twig @@ -0,0 +1,11 @@ +{# +This file is part of EC-CUBE + +Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved. + +http://www.ec-cube.co.jp/ + +For the full copyright and license information, please view the LICENSE +file that was distributed with this source code. +#} +

hello hoge plugin.

diff --git a/src/Eccube/Controller/Admin/Setting/System/SystemController.php b/src/Eccube/Controller/Admin/Setting/System/SystemController.php index e60d9a14f2d..2d5cfc1250b 100644 --- a/src/Eccube/Controller/Admin/Setting/System/SystemController.php +++ b/src/Eccube/Controller/Admin/Setting/System/SystemController.php @@ -57,17 +57,4 @@ public function index(Request $request) 'info' => $info, ]; } - - /** - * @Route("/%eccube_admin_route%/setting/system/system/phpinfo", name="admin_setting_system_system_phpinfo", methods={"GET"}) - */ - public function phpinfo(Request $request) - { - ob_start(); - phpinfo(); - $phpinfo = ob_get_contents(); - ob_end_clean(); - - return new Response($phpinfo); - } } diff --git a/src/Eccube/Resource/template/admin/Setting/System/system.twig b/src/Eccube/Resource/template/admin/Setting/System/system.twig index 9d7a1297379..b26d6ac3b0a 100644 --- a/src/Eccube/Resource/template/admin/Setting/System/system.twig +++ b/src/Eccube/Resource/template/admin/Setting/System/system.twig @@ -57,26 +57,6 @@ file that was distributed with this source code. - -
-
-
-
-
-
- {{ 'admin.setting.system.system.php_info'|trans }} - -
-
-
-
-
- -
- -
-
- From b105eb055d3948f8495f82315bf4a3399507fbac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B1=A0=20=E6=81=A9=E6=A8=B9?= Date: Tue, 9 Apr 2024 08:57:09 +0900 Subject: [PATCH 2/3] =?UTF-8?q?DEV=E3=81=8B=E3=82=89PROD=E3=81=AB=E6=88=BB?= =?UTF-8?q?=E3=81=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.dist | 4 ++-- .../Controller/Admin/Setting/System/SystemController.php | 2 +- src/Eccube/Resource/template/admin/Setting/System/system.twig | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.env.dist b/.env.dist index f2fe569be20..b91d9d9b719 100644 --- a/.env.dist +++ b/.env.dist @@ -5,8 +5,8 @@ ###> symfony/framework-bundle ### # For production servers, use: "APP_ENV=prod" and "APP_DEBUG=0" # For local development, use: "APP_ENV=dev" and "APP_DEBUG=1" -APP_ENV=dev -APP_DEBUG=1 +APP_ENV=prod +APP_DEBUG=0 #TRUSTED_PROXIES=127.0.0.1,127.0.0.2 #TRUSTED_HOSTS=^localhost$,^example\.com$ ###< symfony/framework-bundle ### diff --git a/src/Eccube/Controller/Admin/Setting/System/SystemController.php b/src/Eccube/Controller/Admin/Setting/System/SystemController.php index d447180e6c0..95f03f7355d 100644 --- a/src/Eccube/Controller/Admin/Setting/System/SystemController.php +++ b/src/Eccube/Controller/Admin/Setting/System/SystemController.php @@ -81,4 +81,4 @@ public function phpinfo(Request $request) return new Response($phpinfo); } -} \ No newline at end of file +} diff --git a/src/Eccube/Resource/template/admin/Setting/System/system.twig b/src/Eccube/Resource/template/admin/Setting/System/system.twig index dc24340b7bb..a70027472f8 100644 --- a/src/Eccube/Resource/template/admin/Setting/System/system.twig +++ b/src/Eccube/Resource/template/admin/Setting/System/system.twig @@ -82,4 +82,4 @@ file that was distributed with this source code. -{% endblock %} \ No newline at end of file +{% endblock %} From e9873e467b5488934d5390dfbe65b3e478ccc9b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B1=A0=20=E6=81=A9=E6=A8=B9?= Date: Tue, 9 Apr 2024 14:12:40 +0900 Subject: [PATCH 3/3] =?UTF-8?q?=E3=83=86=E3=82=B9=E3=83=88=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- codeception/acceptance/EA08SysteminfoCest.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/codeception/acceptance/EA08SysteminfoCest.php b/codeception/acceptance/EA08SysteminfoCest.php index 1b85f43bdac..cee43aa860f 100644 --- a/codeception/acceptance/EA08SysteminfoCest.php +++ b/codeception/acceptance/EA08SysteminfoCest.php @@ -55,8 +55,10 @@ public function systeminfo_システム情報(AcceptanceTester $I) $I->see('WEBサーバー', '#server_info_box__body_inner > div:nth-child(4) > div:first-child'); $I->see('PHP', '#server_info_box__body_inner > div:nth-child(5) > div:first-child'); $I->see('User Agent', '#server_info_box__body_inner > div:nth-child(6) > div:first-child'); - $I->see('PHP情報', '#php_info_box__header > div > span'); - + if ($config['eccube_phpinfo_enabled'] == 1) { + $I->see('PHP情報', '#php_info_box__header > div > span'); + } + $I->expect('session.save_path をチェックします'); $I->amOnPage('/'.$config['eccube_admin_route'].'/setting/system/system/phpinfo'); $I->scrollTo('a[name=module_session]');