From 4c0d3276cfde90fb3ec642f114b337d390db346c Mon Sep 17 00:00:00 2001 From: kiy0taka Date: Sat, 25 Aug 2018 13:06:38 +0900 Subject: [PATCH 01/50] =?UTF-8?q?=E8=AA=8D=E8=A8=BC=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Eccube/Service/PluginApiService.php | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/src/Eccube/Service/PluginApiService.php b/src/Eccube/Service/PluginApiService.php index e89eebc4240..be8afe8ea3f 100644 --- a/src/Eccube/Service/PluginApiService.php +++ b/src/Eccube/Service/PluginApiService.php @@ -15,6 +15,8 @@ use Eccube\Common\Constant; use Eccube\Common\EccubeConfig; +use Eccube\Entity\BaseInfo; +use Eccube\Repository\BaseInfoRepository; use Symfony\Component\HttpFoundation\RequestStack; class PluginApiService @@ -36,16 +38,25 @@ class PluginApiService */ private $requestStack; + /** + * @var BaseInfo + */ + private $BaseInfo; + /** * PluginApiService constructor. * * @param EccubeConfig $eccubeConfig * @param RequestStack $requestStack + * @param BaseInfoRepository $baseInfoRepository + * @throws \Doctrine\ORM\NoResultException + * @throws \Doctrine\ORM\NonUniqueResultException */ - public function __construct(EccubeConfig $eccubeConfig, RequestStack $requestStack) + public function __construct(EccubeConfig $eccubeConfig, RequestStack $requestStack, BaseInfoRepository $baseInfoRepository) { $this->eccubeConfig = $eccubeConfig; $this->requestStack = $requestStack; + $this->BaseInfo = $baseInfoRepository->get(); } /** @@ -212,9 +223,17 @@ public function getRequestApi($url, $data = []) $curl = curl_init($url); + $key = $this->BaseInfo->getAuthenticationKey(); + $baseUrl = $this->requestStack->getCurrentRequest()->getSchemeAndHttpHost().$this->requestStack->getCurrentRequest()->getBasePath(); + // Option array $options = [ // HEADER + CURLOPT_HTTPHEADER => [ + 'X-ECCUBE-KEY: '.$key, + 'X-ECCUBE-URL: '.$baseUrl, + 'X-ECCUBE-VERSION: '.Constant::VERSION, + ], CURLOPT_HTTPGET => true, CURLOPT_SSL_VERIFYPEER => false, CURLOPT_RETURNTRANSFER => true, From b4ad8bc6121a5d0d5d55565934ace2f93805f7c5 Mon Sep 17 00:00:00 2001 From: kiy0taka Date: Sat, 25 Aug 2018 13:07:15 +0900 Subject: [PATCH 02/50] =?UTF-8?q?null=E5=AF=BE=E5=BF=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Resource/template/admin/Store/plugin_detail_info.twig | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Eccube/Resource/template/admin/Store/plugin_detail_info.twig b/src/Eccube/Resource/template/admin/Store/plugin_detail_info.twig index 95ec565b566..c032bcc55d7 100644 --- a/src/Eccube/Resource/template/admin/Store/plugin_detail_info.twig +++ b/src/Eccube/Resource/template/admin/Store/plugin_detail_info.twig @@ -19,6 +19,10 @@ file that was distributed with this source code.
  • {{ 'admin.store.plugin.detail.size'|trans }}{{ 'admin.store.plugin.detail.size.format'|trans({'%size%' : size}) }}
  • {{ 'admin.store.plugin.detail.license'|trans }}{{ item.license }}
  • {{ 'admin.store.plugin.detail.develop'|trans }} - {% if item.author.url is not empty %}{{ item.author.name }}{% else %}{{ item.author.name }}{% endif %} + {% if item.author is not empty %} + {% if item.author.url is not empty %} + {{ item.author.name }}{% else %}{{ item.author.name }} + {% endif %} + {% endif %}
  • \ No newline at end of file From 23485b87b14db9baef65866e61640b2020beda00 Mon Sep 17 00:00:00 2001 From: kiy0taka Date: Sat, 25 Aug 2018 13:47:11 +0900 Subject: [PATCH 03/50] =?UTF-8?q?=E3=82=AA=E3=83=BC=E3=83=8A=E3=83=BC?= =?UTF-8?q?=E3=82=BA=E3=82=B9=E3=83=88=E3=82=A2=E3=81=AE=E3=83=A1=E3=83=83?= =?UTF-8?q?=E3=82=BB=E3=83=BC=E3=82=B8=E3=82=AD=E3=83=BC=E5=AF=BE=E5=BF=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/config/eccube/packages/eccube_nav.yaml | 14 +++++++------- src/Eccube/Form/Type/Admin/AuthenticationType.php | 4 ++-- src/Eccube/Resource/locale/messages.ja.yaml | 14 ++++++++++++++ .../admin/Store/authentication_setting.twig | 12 ++++++------ 4 files changed, 29 insertions(+), 15 deletions(-) diff --git a/app/config/eccube/packages/eccube_nav.yaml b/app/config/eccube/packages/eccube_nav.yaml index 4ce11bf9af5..fc12e8f7151 100644 --- a/app/config/eccube/packages/eccube_nav.yaml +++ b/app/config/eccube/packages/eccube_nav.yaml @@ -129,23 +129,23 @@ parameters: icon: fa-plug children: plugin: - name: admin.nav.store.plugin + name: admin.store.plugin children: plugin_owners_search: - name: admin.nav.store.plugin.plugin_owners_install + name: admin.store.plugin.plugin_owners_install url: admin_store_plugin_owners_search plugin_list: - name: admin.nav.store.plugin.plugin_list + name: admin.store.plugin.plugin_list url: admin_store_plugin template: - name: admin.nav.store.template + name: admin.store.template children: template_list: - name: admin.nav.store.template.template_list + name: admin.store.template.template_list url: admin_store_template template_install: - name: admin.nav.store.template.template_install + name: admin.store.template.template_install url: admin_store_template_install authentication_setting: - name: admin.nav.store.authentication_setting + name: admin.store.authentication_setting url: admin_store_authentication_setting diff --git a/src/Eccube/Form/Type/Admin/AuthenticationType.php b/src/Eccube/Form/Type/Admin/AuthenticationType.php index 49d0d11dc80..60deade9d77 100644 --- a/src/Eccube/Form/Type/Admin/AuthenticationType.php +++ b/src/Eccube/Form/Type/Admin/AuthenticationType.php @@ -46,7 +46,7 @@ public function buildForm(FormBuilderInterface $builder, array $options) $builder->add( 'authentication_key', TextType::class, [ - 'label' => 'plugin.label.auth_key', + 'label' => 'admin.store.authentication_setting.api_key', 'required' => false, 'constraints' => [ new Assert\Regex(['pattern' => '/^[0-9a-zA-Z]+$/']), @@ -54,7 +54,7 @@ public function buildForm(FormBuilderInterface $builder, array $options) ]) ->add('php_path', TextType::class, [ - 'label' => 'admin.store.authentication_setting.php_path.label', + 'label' => 'admin.store.authentication_setting.php_path', 'required' => false, 'constraints' => [ new Assert\Length([ diff --git a/src/Eccube/Resource/locale/messages.ja.yaml b/src/Eccube/Resource/locale/messages.ja.yaml index 20cc2b6a034..7ad4455b99b 100644 --- a/src/Eccube/Resource/locale/messages.ja.yaml +++ b/src/Eccube/Resource/locale/messages.ja.yaml @@ -1190,6 +1190,20 @@ admin.setting.system.system.php_info: PHP情報 admin.store: オーナーズストア +admin.store.plugin: プラグイン +admin.store.plugin.plugin_owners_install: プラグインを探す +admin.store.plugin.plugin_list: プラグイン一覧 +admin.store.template: テンプレート +admin.store.template.template_list: テンプレート一覧 +admin.store.template.template_install: アップロード +admin.store.authentication_setting: 認証キー設定 +admin.store.authentication_setting.api_key: 認証キー +admin.store.authentication_setting.api_key.get: 認証キー取得 +admin.store.authentication_setting.captcha.message: 画像に表示されている文字を入力してください。 +admin.store.authentication_setting.php_path.setting: PHPパスの設定 +admin.store.authentication_setting.php_path: PHPパス + + # TODO: メッセージ精査 admin.store.plugin.popup.delete.confirm.title: プラグインの削除を確認する admin.store.plugin.popup.delete.confirm.message: このプラグインを削除してもよろしいですか? diff --git a/src/Eccube/Resource/template/admin/Store/authentication_setting.twig b/src/Eccube/Resource/template/admin/Store/authentication_setting.twig index 0f43d724d93..54bba66afd9 100644 --- a/src/Eccube/Resource/template/admin/Store/authentication_setting.twig +++ b/src/Eccube/Resource/template/admin/Store/authentication_setting.twig @@ -50,7 +50,7 @@ file that was distributed with this source code. @@ -58,7 +58,7 @@ file that was distributed with this source code.
    -
    {{'admin.store.authentication_setting.php_path.header'|trans}}
    +
    {{'admin.store.authentication_setting.php_path.setting'|trans}}
    @@ -102,12 +102,12 @@ file that was distributed with this source code. diff --git a/src/Eccube/Resource/template/admin/Store/plugin_search_panel.twig b/src/Eccube/Resource/template/admin/Store/plugin_search_panel.twig index ba7240f0e11..d7f48ff5917 100644 --- a/src/Eccube/Resource/template/admin/Store/plugin_search_panel.twig +++ b/src/Eccube/Resource/template/admin/Store/plugin_search_panel.twig @@ -94,15 +94,15 @@ file that was distributed with this source code.
    - {% if item.require is not empty %} -
    -
    - {% for require in item.require %} -

    {{ 'admin.store.plugin_owners_search.modal.dependency'|trans({"%dependency%" : require.name}) }}

    - {% endfor %} -
    -
    - {% endif %} + {#{% if item.require is not empty %}#} + {#
    #} + {#
    #} + {#{% for require in item.require %}#} + {#

    {{ 'admin.store.plugin_owners_search.modal.dependency'|trans({"%dependency%" : require.name}) }}

    #} + {#{% endfor %}#} + {#
    #} + {#
    #} + {#{% endif %}#}