@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | // 支払い方法のプルダウンを生成 |
| 80 | 80 | $builder->addEventListener( |
| 81 | 81 | FormEvents::PRE_SET_DATA, |
| 82 | - function (FormEvent $event) { |
|
| 82 | + function(FormEvent $event) { |
|
| 83 | 83 | $Order = $event->getData(); |
| 84 | 84 | if (is_null($Order) || !$Order->getId()) { |
| 85 | 85 | return; |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | // TODO Calculatorで行うのが適切. |
| 125 | 125 | $builder->addEventListener( |
| 126 | 126 | FormEvents::POST_SUBMIT, |
| 127 | - function (FormEvent $event) { |
|
| 127 | + function(FormEvent $event) { |
|
| 128 | 128 | /** @var Order $Order */ |
| 129 | 129 | $Order = $event->getData(); |
| 130 | 130 | $Order->setPaymentMethod($Order->getPayment()->getMethod()); |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | // 配送業者のプルダウンを生成 |
| 55 | 55 | $builder->addEventListener( |
| 56 | 56 | FormEvents::PRE_SET_DATA, |
| 57 | - function (FormEvent $event) { |
|
| 57 | + function(FormEvent $event) { |
|
| 58 | 58 | $Shipping = $event->getData(); |
| 59 | 59 | if (is_null($Shipping) || !$Shipping->getId()) { |
| 60 | 60 | return; |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | // お届け日のプルダウンを生成 |
| 96 | 96 | $builder->addEventListener( |
| 97 | 97 | FormEvents::PRE_SET_DATA, |
| 98 | - function (FormEvent $event) { |
|
| 98 | + function(FormEvent $event) { |
|
| 99 | 99 | $Shipping = $event->getData(); |
| 100 | 100 | if (is_null($Shipping) || !$Shipping->getId()) { |
| 101 | 101 | return; |
@@ -131,7 +131,7 @@ discard block |
||
| 131 | 131 | |
| 132 | 132 | // 配送日数が設定されている |
| 133 | 133 | if ($deliveryDateFlag) { |
| 134 | - $period = new \DatePeriod ( |
|
| 134 | + $period = new \DatePeriod( |
|
| 135 | 135 | new \DateTime($minDate.' day'), |
| 136 | 136 | new \DateInterval('P1D'), |
| 137 | 137 | new \DateTime($minDate + $this->config['deliv_date_end_max'].' day') |
@@ -159,7 +159,7 @@ discard block |
||
| 159 | 159 | // お届け時間のプルダウンを生成 |
| 160 | 160 | $builder->addEventListener( |
| 161 | 161 | FormEvents::PRE_SET_DATA, |
| 162 | - function (FormEvent $event) { |
|
| 162 | + function(FormEvent $event) { |
|
| 163 | 163 | $Shipping = $event->getData(); |
| 164 | 164 | if (is_null($Shipping) || !$Shipping->getId()) { |
| 165 | 165 | return; |
@@ -39,7 +39,7 @@ |
||
| 39 | 39 | |
| 40 | 40 | if (is_writable($logDir)) { |
| 41 | 41 | if (file_exists($installLog) && !is_writable($installLog)) { |
| 42 | - die($installLog . ' の書込権限を変更して下さい。'); |
|
| 42 | + die($installLog.' の書込権限を変更して下さい。'); |
|
| 43 | 43 | } |
| 44 | 44 | // install step2 でログディレクトリに書き込み権限が付与されればログ出力を開始する. |
| 45 | 45 | $app->register(new \Silex\Provider\MonologServiceProvider(), array( |
@@ -229,7 +229,7 @@ |
||
| 229 | 229 | * Send order mail. |
| 230 | 230 | * |
| 231 | 231 | * @param \Eccube\Entity\Order $Order 受注情報 |
| 232 | - * @return string |
|
| 232 | + * @return \Swift_Mime_MimePart |
|
| 233 | 233 | */ |
| 234 | 234 | public function sendOrderMail(\Eccube\Entity\Order $Order) |
| 235 | 235 | { |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | )); |
| 62 | 62 | |
| 63 | 63 | $message = \Swift_Message::newInstance() |
| 64 | - ->setSubject('[' . $this->BaseInfo->getShopName() . '] 会員登録のご確認') |
|
| 64 | + ->setSubject('['.$this->BaseInfo->getShopName().'] 会員登録のご確認') |
|
| 65 | 65 | ->setFrom(array($this->BaseInfo->getEmail01() => $this->BaseInfo->getShopName())) |
| 66 | 66 | ->setTo(array($Customer->getEmail())) |
| 67 | 67 | ->setBcc($this->BaseInfo->getEmail01()) |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | )); |
| 103 | 103 | |
| 104 | 104 | $message = \Swift_Message::newInstance() |
| 105 | - ->setSubject('[' . $this->BaseInfo->getShopName() . '] 会員登録が完了しました。') |
|
| 105 | + ->setSubject('['.$this->BaseInfo->getShopName().'] 会員登録が完了しました。') |
|
| 106 | 106 | ->setFrom(array($this->BaseInfo->getEmail01() => $this->BaseInfo->getShopName())) |
| 107 | 107 | ->setTo(array($Customer->getEmail())) |
| 108 | 108 | ->setBcc($this->BaseInfo->getEmail01()) |
@@ -144,7 +144,7 @@ discard block |
||
| 144 | 144 | )); |
| 145 | 145 | |
| 146 | 146 | $message = \Swift_Message::newInstance() |
| 147 | - ->setSubject('[' . $this->BaseInfo->getShopName() . '] 退会手続きのご完了') |
|
| 147 | + ->setSubject('['.$this->BaseInfo->getShopName().'] 退会手続きのご完了') |
|
| 148 | 148 | ->setFrom(array($this->BaseInfo->getEmail01() => $this->BaseInfo->getShopName())) |
| 149 | 149 | ->setTo(array($email)) |
| 150 | 150 | ->setBcc($this->BaseInfo->getEmail01()) |
@@ -187,7 +187,7 @@ discard block |
||
| 187 | 187 | |
| 188 | 188 | // 問い合わせ者にメール送信 |
| 189 | 189 | $message = \Swift_Message::newInstance() |
| 190 | - ->setSubject('[' . $this->BaseInfo->getShopName() . '] お問い合わせを受け付けました。') |
|
| 190 | + ->setSubject('['.$this->BaseInfo->getShopName().'] お問い合わせを受け付けました。') |
|
| 191 | 191 | ->setFrom(array($this->BaseInfo->getEmail02() => $this->BaseInfo->getShopName())) |
| 192 | 192 | ->setTo(array($formData['email'])) |
| 193 | 193 | ->setBcc($this->BaseInfo->getEmail02()) |
@@ -244,7 +244,7 @@ discard block |
||
| 244 | 244 | )); |
| 245 | 245 | |
| 246 | 246 | $message = \Swift_Message::newInstance() |
| 247 | - ->setSubject('[' . $this->BaseInfo->getShopName() . '] ' . $MailTemplate->getSubject()) |
|
| 247 | + ->setSubject('['.$this->BaseInfo->getShopName().'] '.$MailTemplate->getSubject()) |
|
| 248 | 248 | ->setFrom(array($this->BaseInfo->getEmail01() => $this->BaseInfo->getShopName())) |
| 249 | 249 | ->setTo(array($Order->getEmail())) |
| 250 | 250 | ->setBcc($this->BaseInfo->getEmail01()) |
@@ -288,7 +288,7 @@ discard block |
||
| 288 | 288 | )); |
| 289 | 289 | |
| 290 | 290 | $message = \Swift_Message::newInstance() |
| 291 | - ->setSubject('[' . $this->BaseInfo->getShopName() . '] 会員登録のご確認') |
|
| 291 | + ->setSubject('['.$this->BaseInfo->getShopName().'] 会員登録のご確認') |
|
| 292 | 292 | ->setFrom(array($this->BaseInfo->getEmail03() => $this->BaseInfo->getShopName())) |
| 293 | 293 | ->setTo(array($Customer->getEmail())) |
| 294 | 294 | ->setBcc($this->BaseInfo->getEmail01()) |
@@ -332,7 +332,7 @@ discard block |
||
| 332 | 332 | )); |
| 333 | 333 | |
| 334 | 334 | $message = \Swift_Message::newInstance() |
| 335 | - ->setSubject('[' . $this->BaseInfo->getShopName() . '] ' . $formData['subject']) |
|
| 335 | + ->setSubject('['.$this->BaseInfo->getShopName().'] '.$formData['subject']) |
|
| 336 | 336 | ->setFrom(array($this->BaseInfo->getEmail01() => $this->BaseInfo->getShopName())) |
| 337 | 337 | ->setTo(array($Order->getEmail())) |
| 338 | 338 | ->setBcc($this->BaseInfo->getEmail01()) |
@@ -373,7 +373,7 @@ discard block |
||
| 373 | 373 | )); |
| 374 | 374 | |
| 375 | 375 | $message = \Swift_Message::newInstance() |
| 376 | - ->setSubject('[' . $this->BaseInfo->getShopName() . '] パスワード変更のご確認') |
|
| 376 | + ->setSubject('['.$this->BaseInfo->getShopName().'] パスワード変更のご確認') |
|
| 377 | 377 | ->setFrom(array($this->BaseInfo->getEmail01() => $this->BaseInfo->getShopName())) |
| 378 | 378 | ->setTo(array($Customer->getEmail())) |
| 379 | 379 | ->setBcc($this->BaseInfo->getEmail01()) |
@@ -414,7 +414,7 @@ discard block |
||
| 414 | 414 | )); |
| 415 | 415 | |
| 416 | 416 | $message = \Swift_Message::newInstance() |
| 417 | - ->setSubject('[' . $this->BaseInfo->getShopName() . '] パスワード変更のお知らせ') |
|
| 417 | + ->setSubject('['.$this->BaseInfo->getShopName().'] パスワード変更のお知らせ') |
|
| 418 | 418 | ->setFrom(array($this->BaseInfo->getEmail01() => $this->BaseInfo->getShopName())) |
| 419 | 419 | ->setTo(array($Customer->getEmail())) |
| 420 | 420 | ->setBcc($this->BaseInfo->getEmail01()) |
@@ -964,7 +964,7 @@ |
||
| 964 | 964 | * 失敗 : \Doctrine\DBAL\DBALExceptionエラーが発生( 接続に失敗した場合 )、エラー画面を表示しdie() |
| 965 | 965 | * 備考 : app['debug']がtrueの際は処理を行わない |
| 966 | 966 | * |
| 967 | - * @return boolean true |
|
| 967 | + * @return null|boolean true |
|
| 968 | 968 | * |
| 969 | 969 | */ |
| 970 | 970 | protected function checkDatabaseConnection() |
@@ -24,22 +24,15 @@ |
||
| 24 | 24 | namespace Eccube; |
| 25 | 25 | |
| 26 | 26 | use Eccube\Application\ApplicationTrait; |
| 27 | -use Eccube\Common\Constant; |
|
| 28 | -use Eccube\Doctrine\ORM\Mapping\Driver\YamlDriver; |
|
| 29 | -use Eccube\EventListener\TransactionListener; |
|
| 30 | 27 | use Eccube\Plugin\ConfigManager as PluginConfigManager; |
| 31 | 28 | use Sergiors\Silex\Provider\AnnotationsServiceProvider; |
| 32 | 29 | use Sergiors\Silex\Provider\DoctrineCacheServiceProvider; |
| 33 | 30 | use Sergiors\Silex\Provider\RoutingServiceProvider; |
| 34 | 31 | use Sergiors\Silex\Provider\SensioFrameworkExtraServiceProvider; |
| 35 | 32 | use Sergiors\Silex\Provider\TemplatingServiceProvider; |
| 36 | -use Symfony\Component\EventDispatcher\EventDispatcher; |
|
| 37 | -use Symfony\Component\Finder\Finder; |
|
| 38 | 33 | use Symfony\Component\HttpFoundation\Request; |
| 39 | 34 | use Symfony\Component\HttpFoundation\Response; |
| 40 | 35 | use Symfony\Component\HttpKernel\Event\FilterResponseEvent; |
| 41 | -use Symfony\Component\HttpKernel\Event\GetResponseEvent; |
|
| 42 | -use Symfony\Component\HttpKernel\Event\PostResponseEvent; |
|
| 43 | 36 | use Symfony\Component\HttpKernel\KernelEvents; |
| 44 | 37 | use Symfony\Component\Yaml\Yaml; |
| 45 | 38 | |
@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | $this->register(new \Silex\Provider\SerializerServiceProvider()); |
| 159 | 159 | $this->register(new \Silex\Provider\ValidatorServiceProvider()); |
| 160 | 160 | |
| 161 | - $this->error(function (\Exception $e, Request $request, $code) { |
|
| 161 | + $this->error(function(\Exception $e, Request $request, $code) { |
|
| 162 | 162 | if ($this['debug']) { |
| 163 | 163 | return; |
| 164 | 164 | } |
@@ -222,7 +222,7 @@ discard block |
||
| 222 | 222 | $this->mount('/'.trim($this['config']['admin_route'], '/').'/', new ControllerProvider\AdminControllerProvider()); |
| 223 | 223 | Request::enableHttpMethodParameterOverride(); // PUTやDELETEできるようにする |
| 224 | 224 | |
| 225 | - $this->extend('routes', function (\Symfony\Component\Routing\RouteCollection $routes, \Silex\Application $app) { |
|
| 225 | + $this->extend('routes', function(\Symfony\Component\Routing\RouteCollection $routes, \Silex\Application $app) { |
|
| 226 | 226 | $loader = $this['sensio_framework_extra.routing.loader.annot_dir']; |
| 227 | 227 | |
| 228 | 228 | // コントローラのルーティングをロード |
@@ -259,7 +259,7 @@ discard block |
||
| 259 | 259 | 'translator.cache_dir' => $this['debug'] ? null : $this['config']['root_dir'].'/app/cache/translator', |
| 260 | 260 | 'locale_fallbacks' => ['ja', 'en'], |
| 261 | 261 | )); |
| 262 | - $this->extend('translator', function ($translator, \Silex\Application $app) { |
|
| 262 | + $this->extend('translator', function($translator, \Silex\Application $app) { |
|
| 263 | 263 | $translator->addLoader('yaml', new \Symfony\Component\Translation\Loader\YamlFileLoader()); |
| 264 | 264 | |
| 265 | 265 | $file = __DIR__.'/Resource/locale/validator.'.$app['locale'].'.yml'; |
@@ -306,14 +306,14 @@ discard block |
||
| 306 | 306 | $this->register(new \Silex\Provider\TwigServiceProvider(), array( |
| 307 | 307 | 'twig.form.templates' => array('Form/form_layout.twig'), |
| 308 | 308 | )); |
| 309 | - $this->extend('twig', function (\Twig_Environment $twig, \Silex\Application $app) { |
|
| 309 | + $this->extend('twig', function(\Twig_Environment $twig, \Silex\Application $app) { |
|
| 310 | 310 | $twig->addExtension(new \Eccube\Twig\Extension\EccubeExtension($app)); |
| 311 | 311 | $twig->addExtension(new \Twig_Extension_StringLoader()); |
| 312 | 312 | |
| 313 | 313 | return $twig; |
| 314 | 314 | }); |
| 315 | 315 | |
| 316 | - $this->before(function (Request $request, \Silex\Application $app) { |
|
| 316 | + $this->before(function(Request $request, \Silex\Application $app) { |
|
| 317 | 317 | $app['admin'] = false; |
| 318 | 318 | $app['front'] = false; |
| 319 | 319 | $pathinfo = rawurldecode($request->getPathInfo()); |
@@ -345,7 +345,7 @@ discard block |
||
| 345 | 345 | // フロント or 管理画面ごとにtwigの探索パスを切り替える. |
| 346 | 346 | if (!$app->offsetExists('twig')) { |
| 347 | 347 | |
| 348 | - $app->extend('twig', function (\Twig_Environment $twig, \Silex\Application $app) { |
|
| 348 | + $app->extend('twig', function(\Twig_Environment $twig, \Silex\Application $app) { |
|
| 349 | 349 | $paths = array(); |
| 350 | 350 | |
| 351 | 351 | // 互換性がないのでprofiler とproduction 時のcacheを分離する |
@@ -392,7 +392,7 @@ discard block |
||
| 392 | 392 | }, self::EARLY_EVENT); |
| 393 | 393 | |
| 394 | 394 | // twigのグローバル変数を定義. |
| 395 | - $this->on(\Symfony\Component\HttpKernel\KernelEvents::CONTROLLER, function (\Symfony\Component\HttpKernel\Event\FilterControllerEvent $event) { |
|
| 395 | + $this->on(\Symfony\Component\HttpKernel\KernelEvents::CONTROLLER, function(\Symfony\Component\HttpKernel\Event\FilterControllerEvent $event) { |
|
| 396 | 396 | // TODO ログイン時のイベントを設定. |
| 397 | 397 | $this['dispatcher']->addListener(\Symfony\Component\Security\Http\SecurityEvents::INTERACTIVE_LOGIN, array($this['eccube.event_listner.security'], 'onInteractiveLogin')); |
| 398 | 398 | // 未ログイン時にマイページや管理画面以下にアクセスするとSubRequestで実行されるため, |
@@ -461,7 +461,7 @@ discard block |
||
| 461 | 461 | // メール送信時の文字エンコード指定(デフォルトはUTF-8) |
| 462 | 462 | if (isset($this['config']['mail']['charset_iso_2022_jp']) && is_bool($this['config']['mail']['charset_iso_2022_jp'])) { |
| 463 | 463 | if ($this['config']['mail']['charset_iso_2022_jp'] === true) { |
| 464 | - \Swift::init(function () { |
|
| 464 | + \Swift::init(function() { |
|
| 465 | 465 | \Swift_DependencyContainer::getInstance() |
| 466 | 466 | ->register('mime.qpheaderencoder') |
| 467 | 467 | ->asAliasOf('mime.base64headerencoder'); |
@@ -589,7 +589,7 @@ discard block |
||
| 589 | 589 | 'EXTRACT' => 'Eccube\Doctrine\ORM\Query\Extract', |
| 590 | 590 | ), |
| 591 | 591 | )); |
| 592 | - $this->extend('orm.em', function (\Doctrine\ORM\EntityManager $em, \Silex\Application $app) { |
|
| 592 | + $this->extend('orm.em', function(\Doctrine\ORM\EntityManager $em, \Silex\Application $app) { |
|
| 593 | 593 | // tax_rule |
| 594 | 594 | $taxRuleRepository = $em->getRepository('Eccube\Entity\TaxRule'); |
| 595 | 595 | $taxRuleRepository->setApplication($app); |
@@ -679,31 +679,31 @@ discard block |
||
| 679 | 679 | array('^/mypage', 'ROLE_USER'), |
| 680 | 680 | ); |
| 681 | 681 | |
| 682 | - $this['eccube.password_encoder'] = function ($app) { |
|
| 682 | + $this['eccube.password_encoder'] = function($app) { |
|
| 683 | 683 | return new \Eccube\Security\Core\Encoder\PasswordEncoder($app['config']); |
| 684 | 684 | }; |
| 685 | - $this['security.encoder_factory'] = function ($app) { |
|
| 685 | + $this['security.encoder_factory'] = function($app) { |
|
| 686 | 686 | return new \Symfony\Component\Security\Core\Encoder\EncoderFactory(array( |
| 687 | 687 | 'Eccube\Entity\Customer' => $app['eccube.password_encoder'], |
| 688 | 688 | 'Eccube\Entity\Member' => $app['eccube.password_encoder'], |
| 689 | 689 | )); |
| 690 | 690 | }; |
| 691 | - $this['eccube.event_listner.security'] = function ($app) { |
|
| 691 | + $this['eccube.event_listner.security'] = function($app) { |
|
| 692 | 692 | return new \Eccube\EventListener\SecurityEventListener($app['orm.em']); |
| 693 | 693 | }; |
| 694 | 694 | |
| 695 | 695 | // Voterの設定 |
| 696 | - $this['authority_voter'] = function ($app) { |
|
| 696 | + $this['authority_voter'] = function($app) { |
|
| 697 | 697 | return new \Eccube\Security\Voter\AuthorityVoter($app); |
| 698 | 698 | }; |
| 699 | 699 | |
| 700 | - $this->extend('security.voters', function ($voters, \Silex\Application $app) { |
|
| 700 | + $this->extend('security.voters', function($voters, \Silex\Application $app) { |
|
| 701 | 701 | $voters[] = $app['authority_voter']; |
| 702 | 702 | |
| 703 | 703 | return $voters; |
| 704 | 704 | }); |
| 705 | 705 | |
| 706 | - $this['security.access_manager'] = function ($app) { |
|
| 706 | + $this['security.access_manager'] = function($app) { |
|
| 707 | 707 | return new \Symfony\Component\Security\Core\Authorization\AccessDecisionManager($app['security.voters'], 'unanimous'); |
| 708 | 708 | }; |
| 709 | 709 | |
@@ -860,7 +860,7 @@ discard block |
||
| 860 | 860 | $app = $this; |
| 861 | 861 | |
| 862 | 862 | // Response Event(http cache対応、event実行は一番遅く設定) |
| 863 | - $this->on(\Symfony\Component\HttpKernel\KernelEvents::RESPONSE, function (\Symfony\Component\HttpKernel\Event\FilterResponseEvent $event) use ($app) { |
|
| 863 | + $this->on(\Symfony\Component\HttpKernel\KernelEvents::RESPONSE, function(\Symfony\Component\HttpKernel\Event\FilterResponseEvent $event) use ($app) { |
|
| 864 | 864 | |
| 865 | 865 | if (!$event->isMasterRequest()) { |
| 866 | 866 | return; |
@@ -329,6 +329,9 @@ |
||
| 329 | 329 | flush(); |
| 330 | 330 | } |
| 331 | 331 | |
| 332 | + /** |
|
| 333 | + * @param InstallApplication $app |
|
| 334 | + */ |
|
| 332 | 335 | private function checkModules($app) |
| 333 | 336 | { |
| 334 | 337 | foreach ($this->required_modules as $module) { |
@@ -60,9 +60,9 @@ discard block |
||
| 60 | 60 | |
| 61 | 61 | public function __construct() |
| 62 | 62 | { |
| 63 | - $this->config_path = __DIR__ . '/../../../../app/config/eccube'; |
|
| 64 | - $this->dist_path = __DIR__ . '/../../Resource/config'; |
|
| 65 | - $this->cache_path = __DIR__ . '/../../../../app/cache'; |
|
| 63 | + $this->config_path = __DIR__.'/../../../../app/config/eccube'; |
|
| 64 | + $this->dist_path = __DIR__.'/../../Resource/config'; |
|
| 65 | + $this->cache_path = __DIR__.'/../../../../app/cache'; |
|
| 66 | 66 | } |
| 67 | 67 | |
| 68 | 68 | private function isValid(Request $request, Form $form) |
@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | |
| 113 | 113 | return $app['twig']->render('step1.twig', array( |
| 114 | 114 | 'form' => $form->createView(), |
| 115 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', |
|
| 115 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', |
|
| 116 | 116 | )); |
| 117 | 117 | } |
| 118 | 118 | |
@@ -135,7 +135,7 @@ discard block |
||
| 135 | 135 | |
| 136 | 136 | return $app['twig']->render('step2.twig', array( |
| 137 | 137 | 'protectedDirs' => $protectedDirs, |
| 138 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', |
|
| 138 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', |
|
| 139 | 139 | )); |
| 140 | 140 | } |
| 141 | 141 | |
@@ -149,7 +149,7 @@ discard block |
||
| 149 | 149 | |
| 150 | 150 | if (empty($sessionData['shop_name'])) { |
| 151 | 151 | |
| 152 | - $config_file = $this->config_path . '/config.yml'; |
|
| 152 | + $config_file = $this->config_path.'/config.yml'; |
|
| 153 | 153 | $fs = new Filesystem(); |
| 154 | 154 | |
| 155 | 155 | if ($fs->exists($config_file)) { |
@@ -163,11 +163,11 @@ discard block |
||
| 163 | 163 | } |
| 164 | 164 | |
| 165 | 165 | // セキュリティの設定 |
| 166 | - $config_file = $this->config_path . '/path.yml'; |
|
| 166 | + $config_file = $this->config_path.'/path.yml'; |
|
| 167 | 167 | $config = Yaml::parse(file_get_contents($config_file)); |
| 168 | 168 | $sessionData['admin_dir'] = $config['admin_route']; |
| 169 | 169 | |
| 170 | - $config_file = $this->config_path . '/config.yml'; |
|
| 170 | + $config_file = $this->config_path.'/config.yml'; |
|
| 171 | 171 | $config = Yaml::parse(file_get_contents($config_file)); |
| 172 | 172 | |
| 173 | 173 | $allowHost = $config['admin_allow_host']; |
@@ -177,7 +177,7 @@ discard block |
||
| 177 | 177 | $sessionData['admin_force_ssl'] = (bool) $config['force_ssl']; |
| 178 | 178 | |
| 179 | 179 | // メール設定 |
| 180 | - $config_file = $this->config_path . '/mail.yml'; |
|
| 180 | + $config_file = $this->config_path.'/mail.yml'; |
|
| 181 | 181 | $config = Yaml::parse(file_get_contents($config_file)); |
| 182 | 182 | $mail = $config['mail']; |
| 183 | 183 | $sessionData['mail_backend'] = $mail['transport']; |
@@ -200,7 +200,7 @@ discard block |
||
| 200 | 200 | |
| 201 | 201 | return $app['twig']->render('step3.twig', array( |
| 202 | 202 | 'form' => $form->createView(), |
| 203 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', |
|
| 203 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', |
|
| 204 | 204 | )); |
| 205 | 205 | } |
| 206 | 206 | |
@@ -215,7 +215,7 @@ discard block |
||
| 215 | 215 | |
| 216 | 216 | if (empty($sessionData['database'])) { |
| 217 | 217 | |
| 218 | - $config_file = $this->config_path . '/database.yml'; |
|
| 218 | + $config_file = $this->config_path.'/database.yml'; |
|
| 219 | 219 | $fs = new Filesystem(); |
| 220 | 220 | |
| 221 | 221 | if ($fs->exists($config_file)) { |
@@ -243,7 +243,7 @@ discard block |
||
| 243 | 243 | |
| 244 | 244 | return $app['twig']->render('step4.twig', array( |
| 245 | 245 | 'form' => $form->createView(), |
| 246 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', |
|
| 246 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', |
|
| 247 | 247 | )); |
| 248 | 248 | } |
| 249 | 249 | |
@@ -289,7 +289,7 @@ discard block |
||
| 289 | 289 | $host = $request->getSchemeAndHttpHost(); |
| 290 | 290 | $basePath = $request->getBasePath(); |
| 291 | 291 | $params = array( |
| 292 | - 'http_url' => $host . $basePath, |
|
| 292 | + 'http_url' => $host.$basePath, |
|
| 293 | 293 | 'shop_name' => $sessionData['shop_name'], |
| 294 | 294 | ); |
| 295 | 295 | |
@@ -304,24 +304,24 @@ discard block |
||
| 304 | 304 | |
| 305 | 305 | return $app['twig']->render('step5.twig', array( |
| 306 | 306 | 'form' => $form->createView(), |
| 307 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', |
|
| 307 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', |
|
| 308 | 308 | )); |
| 309 | 309 | } |
| 310 | 310 | |
| 311 | 311 | // インストール完了 |
| 312 | 312 | public function complete(InstallApplication $app, Request $request) |
| 313 | 313 | { |
| 314 | - $config_file = $this->config_path . '/path.yml'; |
|
| 314 | + $config_file = $this->config_path.'/path.yml'; |
|
| 315 | 315 | $config = Yaml::parse(file_get_contents($config_file)); |
| 316 | 316 | |
| 317 | 317 | $host = $request->getSchemeAndHttpHost(); |
| 318 | 318 | $basePath = $request->getBasePath(); |
| 319 | 319 | |
| 320 | - $adminUrl = $host . $basePath . '/' . $config['admin_dir']; |
|
| 320 | + $adminUrl = $host.$basePath.'/'.$config['admin_dir']; |
|
| 321 | 321 | |
| 322 | 322 | return $app['twig']->render('complete.twig', array( |
| 323 | 323 | 'admin_url' => $adminUrl, |
| 324 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', |
|
| 324 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', |
|
| 325 | 325 | )); |
| 326 | 326 | } |
| 327 | 327 | |
@@ -337,12 +337,12 @@ discard block |
||
| 337 | 337 | { |
| 338 | 338 | foreach ($this->required_modules as $module) { |
| 339 | 339 | if (!extension_loaded($module)) { |
| 340 | - $app->addDanger('[必須] ' . $module . ' 拡張モジュールが有効になっていません。', 'install'); |
|
| 340 | + $app->addDanger('[必須] '.$module.' 拡張モジュールが有効になっていません。', 'install'); |
|
| 341 | 341 | } |
| 342 | 342 | } |
| 343 | 343 | |
| 344 | 344 | if (!extension_loaded('pdo_mysql') && !extension_loaded('pdo_pgsql')) { |
| 345 | - $app->addDanger('[必須] ' . 'pdo_pgsql又はpdo_mysql 拡張モジュールを有効にしてください。', 'install'); |
|
| 345 | + $app->addDanger('[必須] '.'pdo_pgsql又はpdo_mysql 拡張モジュールを有効にしてください。', 'install'); |
|
| 346 | 346 | } |
| 347 | 347 | |
| 348 | 348 | foreach ($this->recommended_module as $module) { |
@@ -352,7 +352,7 @@ discard block |
||
| 352 | 352 | //http://php.net/manual/en/migration71.deprecated.php |
| 353 | 353 | continue; |
| 354 | 354 | } |
| 355 | - $app->addWarning('[推奨] ' . $module . ' 拡張モジュールが有効になっていません。', 'install'); |
|
| 355 | + $app->addWarning('[推奨] '.$module.' 拡張モジュールが有効になっていません。', 'install'); |
|
| 356 | 356 | } |
| 357 | 357 | } |
| 358 | 358 | |
@@ -370,7 +370,7 @@ discard block |
||
| 370 | 370 | if (!function_exists('apache_get_modules')) { |
| 371 | 371 | $app->addWarning('mod_rewrite が有効になっているか不明です。', 'install'); |
| 372 | 372 | } elseif (!in_array('mod_rewrite', apache_get_modules())) { |
| 373 | - $app->addDanger('[必須] ' . 'mod_rewriteを有効にしてください。', 'install'); |
|
| 373 | + $app->addDanger('[必須] '.'mod_rewriteを有効にしてください。', 'install'); |
|
| 374 | 374 | } |
| 375 | 375 | } elseif (isset($_SERVER['SERVER_SOFTWARE']) && strpos('Microsoft-IIS', $_SERVER['SERVER_SOFTWARE']) !== false) { |
| 376 | 376 | // iis |
@@ -381,7 +381,7 @@ discard block |
||
| 381 | 381 | |
| 382 | 382 | private function setPDO() |
| 383 | 383 | { |
| 384 | - $config_file = $this->config_path . '/database.yml'; |
|
| 384 | + $config_file = $this->config_path.'/database.yml'; |
|
| 385 | 385 | $config = Yaml::parse(file_get_contents($config_file)); |
| 386 | 386 | |
| 387 | 387 | try { |
@@ -416,7 +416,7 @@ discard block |
||
| 416 | 416 | private function getEntityManager() |
| 417 | 417 | { |
| 418 | 418 | if (!isset($this->app['orm.em'])) { |
| 419 | - $config_file = $this->config_path . '/database.yml'; |
|
| 419 | + $config_file = $this->config_path.'/database.yml'; |
|
| 420 | 420 | $database = Yaml::parse(file_get_contents($config_file)); |
| 421 | 421 | |
| 422 | 422 | $this->app->register(new \Silex\Provider\DoctrineServiceProvider(), array( |
@@ -424,15 +424,15 @@ discard block |
||
| 424 | 424 | )); |
| 425 | 425 | |
| 426 | 426 | $this->app->register(new \Dflydev\Provider\DoctrineOrm\DoctrineOrmServiceProvider(), array( |
| 427 | - 'orm.proxies_dir' => __DIR__ . '/../../app/cache/doctrine', |
|
| 427 | + 'orm.proxies_dir' => __DIR__.'/../../app/cache/doctrine', |
|
| 428 | 428 | 'orm.em.options' => array( |
| 429 | 429 | 'mappings' => array( |
| 430 | 430 | array( |
| 431 | 431 | 'type' => 'yml', |
| 432 | 432 | 'namespace' => 'Eccube\Entity', |
| 433 | 433 | 'path' => array( |
| 434 | - __DIR__ . '/../../Resource/doctrine', |
|
| 435 | - __DIR__ . '/../../Resource/doctrine/master', |
|
| 434 | + __DIR__.'/../../Resource/doctrine', |
|
| 435 | + __DIR__.'/../../Resource/doctrine/master', |
|
| 436 | 436 | ), |
| 437 | 437 | ), |
| 438 | 438 | ), |
@@ -461,11 +461,11 @@ discard block |
||
| 461 | 461 | { |
| 462 | 462 | $this->resetNatTimer(); |
| 463 | 463 | |
| 464 | - $config_file = $this->config_path . '/database.yml'; |
|
| 464 | + $config_file = $this->config_path.'/database.yml'; |
|
| 465 | 465 | $database = Yaml::parse(file_get_contents($config_file)); |
| 466 | 466 | $config['database'] = $database['database']; |
| 467 | 467 | |
| 468 | - $config_file = $this->config_path . '/config.yml'; |
|
| 468 | + $config_file = $this->config_path.'/config.yml'; |
|
| 469 | 469 | $baseConfig = Yaml::parse(file_get_contents($config_file)); |
| 470 | 470 | $config['config'] = $baseConfig; |
| 471 | 471 | |
@@ -521,11 +521,11 @@ discard block |
||
| 521 | 521 | { |
| 522 | 522 | $this->resetNatTimer(); |
| 523 | 523 | |
| 524 | - $config_file = $this->config_path . '/database.yml'; |
|
| 524 | + $config_file = $this->config_path.'/database.yml'; |
|
| 525 | 525 | $database = Yaml::parse(file_get_contents($config_file)); |
| 526 | 526 | $config['database'] = $database['database']; |
| 527 | 527 | |
| 528 | - $config_file = $this->config_path . '/config.yml'; |
|
| 528 | + $config_file = $this->config_path.'/config.yml'; |
|
| 529 | 529 | $baseConfig = Yaml::parse(file_get_contents($config_file)); |
| 530 | 530 | $config['config'] = $baseConfig; |
| 531 | 531 | |
@@ -588,7 +588,7 @@ discard block |
||
| 588 | 588 | $config = new Configuration($app['db']); |
| 589 | 589 | $config->setMigrationsNamespace('DoctrineMigrations'); |
| 590 | 590 | |
| 591 | - $migrationDir = __DIR__ . '/../../Resource/doctrine/migration'; |
|
| 591 | + $migrationDir = __DIR__.'/../../Resource/doctrine/migration'; |
|
| 592 | 592 | $config->setMigrationsDirectory($migrationDir); |
| 593 | 593 | $config->registerMigrationsFromDirectory($migrationDir); |
| 594 | 594 | |
@@ -620,7 +620,7 @@ discard block |
||
| 620 | 620 | private function getProtectedDirs() |
| 621 | 621 | { |
| 622 | 622 | $protectedDirs = array(); |
| 623 | - $base = __DIR__ . '/../../../..'; |
|
| 623 | + $base = __DIR__.'/../../../..'; |
|
| 624 | 624 | $dirs = array( |
| 625 | 625 | '/html', |
| 626 | 626 | '/app', |
@@ -633,7 +633,7 @@ discard block |
||
| 633 | 633 | ); |
| 634 | 634 | |
| 635 | 635 | foreach ($dirs as $dir) { |
| 636 | - if (!is_writable($base . $dir)) { |
|
| 636 | + if (!is_writable($base.$dir)) { |
|
| 637 | 637 | $protectedDirs[] = $dir; |
| 638 | 638 | } |
| 639 | 639 | } |
@@ -644,7 +644,7 @@ discard block |
||
| 644 | 644 | private function createConfigYamlFile($data, $auth = true) |
| 645 | 645 | { |
| 646 | 646 | $fs = new Filesystem(); |
| 647 | - $config_file = $this->config_path . '/config.yml'; |
|
| 647 | + $config_file = $this->config_path.'/config.yml'; |
|
| 648 | 648 | |
| 649 | 649 | if ($fs->exists($config_file)) { |
| 650 | 650 | $config = Yaml::parse(file_get_contents($config_file)); |
@@ -673,7 +673,7 @@ discard block |
||
| 673 | 673 | |
| 674 | 674 | $fs = new Filesystem(); |
| 675 | 675 | $content = str_replace( |
| 676 | - $target, $replace, file_get_contents($this->dist_path . '/config.yml.dist') |
|
| 676 | + $target, $replace, file_get_contents($this->dist_path.'/config.yml.dist') |
|
| 677 | 677 | ); |
| 678 | 678 | $fs->dumpFile($config_file, $content); |
| 679 | 679 | |
@@ -687,7 +687,7 @@ discard block |
||
| 687 | 687 | |
| 688 | 688 | private function addInstallStatus() |
| 689 | 689 | { |
| 690 | - $config_file = $this->config_path . '/config.yml'; |
|
| 690 | + $config_file = $this->config_path.'/config.yml'; |
|
| 691 | 691 | $config = Yaml::parse(file_get_contents($config_file)); |
| 692 | 692 | $config['eccube_install'] = 1; |
| 693 | 693 | $yml = Yaml::dump($config); |
@@ -699,7 +699,7 @@ discard block |
||
| 699 | 699 | private function createDatabaseYamlFile($data) |
| 700 | 700 | { |
| 701 | 701 | $fs = new Filesystem(); |
| 702 | - $config_file = $this->config_path . '/database.yml'; |
|
| 702 | + $config_file = $this->config_path.'/database.yml'; |
|
| 703 | 703 | if ($fs->exists($config_file)) { |
| 704 | 704 | $fs->remove($config_file); |
| 705 | 705 | } |
@@ -732,14 +732,14 @@ discard block |
||
| 732 | 732 | |
| 733 | 733 | $fs = new Filesystem(); |
| 734 | 734 | $content = str_replace( |
| 735 | - $target, $replace, file_get_contents($this->dist_path . '/database.yml.dist') |
|
| 735 | + $target, $replace, file_get_contents($this->dist_path.'/database.yml.dist') |
|
| 736 | 736 | ); |
| 737 | 737 | } else { |
| 738 | 738 | $content = Yaml::dump( |
| 739 | 739 | array( |
| 740 | 740 | 'database' => array( |
| 741 | 741 | 'driver' => 'pdo_sqlite', |
| 742 | - 'path' => realpath($this->config_path . '/eccube.db') |
|
| 742 | + 'path' => realpath($this->config_path.'/eccube.db') |
|
| 743 | 743 | ) |
| 744 | 744 | ) |
| 745 | 745 | ); |
@@ -752,7 +752,7 @@ discard block |
||
| 752 | 752 | private function createMailYamlFile($data) |
| 753 | 753 | { |
| 754 | 754 | $fs = new Filesystem(); |
| 755 | - $config_file = $this->config_path . '/mail.yml'; |
|
| 755 | + $config_file = $this->config_path.'/mail.yml'; |
|
| 756 | 756 | if ($fs->exists($config_file)) { |
| 757 | 757 | $fs->remove($config_file); |
| 758 | 758 | } |
@@ -767,7 +767,7 @@ discard block |
||
| 767 | 767 | |
| 768 | 768 | $fs = new Filesystem(); |
| 769 | 769 | $content = str_replace( |
| 770 | - $target, $replace, file_get_contents($this->dist_path . '/mail.yml.dist') |
|
| 770 | + $target, $replace, file_get_contents($this->dist_path.'/mail.yml.dist') |
|
| 771 | 771 | ); |
| 772 | 772 | $fs->dumpFile($config_file, $content); |
| 773 | 773 | |
@@ -777,7 +777,7 @@ discard block |
||
| 777 | 777 | private function createPathYamlFile($data, Request $request) |
| 778 | 778 | { |
| 779 | 779 | $fs = new Filesystem(); |
| 780 | - $config_file = $this->config_path . '/path.yml'; |
|
| 780 | + $config_file = $this->config_path.'/path.yml'; |
|
| 781 | 781 | if ($fs->exists($config_file)) { |
| 782 | 782 | $fs->remove($config_file); |
| 783 | 783 | } |
@@ -785,16 +785,16 @@ discard block |
||
| 785 | 785 | $ADMIN_ROUTE = $data['admin_dir']; |
| 786 | 786 | $TEMPLATE_CODE = 'default'; |
| 787 | 787 | $USER_DATA_ROUTE = 'user_data'; |
| 788 | - $ROOT_DIR = realpath(__DIR__ . '/../../../../'); |
|
| 788 | + $ROOT_DIR = realpath(__DIR__.'/../../../../'); |
|
| 789 | 789 | $ROOT_URLPATH = $request->getBasePath(); |
| 790 | - $ROOT_PUBLIC_URLPATH = $ROOT_URLPATH . RELATIVE_PUBLIC_DIR_PATH; |
|
| 790 | + $ROOT_PUBLIC_URLPATH = $ROOT_URLPATH.RELATIVE_PUBLIC_DIR_PATH; |
|
| 791 | 791 | |
| 792 | 792 | $target = array('${ADMIN_ROUTE}', '${TEMPLATE_CODE}', '${USER_DATA_ROUTE}', '${ROOT_DIR}', '${ROOT_URLPATH}', '${ROOT_PUBLIC_URLPATH}'); |
| 793 | 793 | $replace = array($ADMIN_ROUTE, $TEMPLATE_CODE, $USER_DATA_ROUTE, $ROOT_DIR, $ROOT_URLPATH, $ROOT_PUBLIC_URLPATH); |
| 794 | 794 | |
| 795 | 795 | $fs = new Filesystem(); |
| 796 | 796 | $content = str_replace( |
| 797 | - $target, $replace, file_get_contents($this->dist_path . '/path.yml.dist') |
|
| 797 | + $target, $replace, file_get_contents($this->dist_path.'/path.yml.dist') |
|
| 798 | 798 | ); |
| 799 | 799 | $fs->dumpFile($config_file, $content); |
| 800 | 800 | |
@@ -803,7 +803,7 @@ discard block |
||
| 803 | 803 | |
| 804 | 804 | private function sendAppData($params) |
| 805 | 805 | { |
| 806 | - $config_file = $this->config_path . '/database.yml'; |
|
| 806 | + $config_file = $this->config_path.'/database.yml'; |
|
| 807 | 807 | $db_config = Yaml::parse(file_get_contents($config_file)); |
| 808 | 808 | |
| 809 | 809 | $this->setPDO(); |
@@ -815,7 +815,7 @@ discard block |
||
| 815 | 815 | } |
| 816 | 816 | |
| 817 | 817 | if ($db_config['database']['driver'] === 'pdo_mysql') { |
| 818 | - $db_ver = 'MySQL:' . $version; |
|
| 818 | + $db_ver = 'MySQL:'.$version; |
|
| 819 | 819 | } else { |
| 820 | 820 | $db_ver = $version; |
| 821 | 821 | } |
@@ -833,7 +833,7 @@ discard block |
||
| 833 | 833 | |
| 834 | 834 | $header = array( |
| 835 | 835 | 'Content-Type: application/x-www-form-urlencoded', |
| 836 | - 'Content-Length: ' . strlen($data), |
|
| 836 | + 'Content-Length: '.strlen($data), |
|
| 837 | 837 | ); |
| 838 | 838 | $context = stream_context_create( |
| 839 | 839 | array( |
@@ -860,7 +860,7 @@ discard block |
||
| 860 | 860 | public function migration(InstallApplication $app, Request $request) |
| 861 | 861 | { |
| 862 | 862 | return $app['twig']->render('migration.twig', array( |
| 863 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', |
|
| 863 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', |
|
| 864 | 864 | )); |
| 865 | 865 | } |
| 866 | 866 | |
@@ -889,7 +889,7 @@ discard block |
||
| 889 | 889 | return $app['twig']->render('migration_plugin.twig', array( |
| 890 | 890 | 'Plugins' => $Plugins, |
| 891 | 891 | 'version' => Constant::VERSION, |
| 892 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', |
|
| 892 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', |
|
| 893 | 893 | )); |
| 894 | 894 | } |
| 895 | 895 | } |
@@ -912,7 +912,7 @@ discard block |
||
| 912 | 912 | \Eccube\Util\Cache::clear($config_app, true); |
| 913 | 913 | |
| 914 | 914 | return $app['twig']->render('migration_end.twig', array( |
| 915 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', |
|
| 915 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', |
|
| 916 | 916 | )); |
| 917 | 917 | } |
| 918 | 918 | } |
@@ -27,12 +27,12 @@ |
||
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | //[INFO]index.php,install.phpをEC-CUBEルート直下に移動させる場合は、コメントアウトしている行に置き換える |
| 30 | -require __DIR__ . '/../autoload.php'; |
|
| 30 | +require __DIR__.'/../autoload.php'; |
|
| 31 | 31 | //require __DIR__ . '/autoload.php'; |
| 32 | 32 | |
| 33 | 33 | $app = new Eccube\InstallApplication(); |
| 34 | 34 | $app['debug'] = true; |
| 35 | -$app->before(function (\Symfony\Component\HttpFoundation\Request $request, \Silex\Application $app) { |
|
| 35 | +$app->before(function(\Symfony\Component\HttpFoundation\Request $request, \Silex\Application $app) { |
|
| 36 | 36 | if (!$request->getSession()->isStarted()) { |
| 37 | 37 | $request->getSession()->start(); |
| 38 | 38 | } |
@@ -27,7 +27,7 @@ |
||
| 27 | 27 | //require __DIR__.'/autoload.php'; |
| 28 | 28 | |
| 29 | 29 | ini_set('display_errors', 'Off'); |
| 30 | -error_reporting(E_ALL & ~E_DEPRECATED & ~E_STRICT); |
|
| 30 | +error_reporting(E_ALL&~E_DEPRECATED&~E_STRICT); |
|
| 31 | 31 | |
| 32 | 32 | // see http://silex.sensiolabs.org/doc/web_servers.html#php-5-4 |
| 33 | 33 | $filename = __DIR__.preg_replace('#(\?.*)$#', '', $_SERVER['REQUEST_URI']); |
@@ -53,8 +53,8 @@ |
||
| 53 | 53 | 'constraints' => array( |
| 54 | 54 | new Assert\NotBlank(array('message' => 'ファイルを選択してください。')), |
| 55 | 55 | new Assert\File(array( |
| 56 | - 'maxSize' => $app['config']['csv_size'] . 'M', |
|
| 57 | - 'maxSizeMessage' => 'CSVファイルは' . $app['config']['csv_size'] . 'M以下でアップロードしてください。', |
|
| 56 | + 'maxSize' => $app['config']['csv_size'].'M', |
|
| 57 | + 'maxSizeMessage' => 'CSVファイルは'.$app['config']['csv_size'].'M以下でアップロードしてください。', |
|
| 58 | 58 | )), |
| 59 | 59 | ), |
| 60 | 60 | )); |