@@ -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,9 +24,6 @@ discard block |
||
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 Eccube\Routing\EccubeRouter; |
32 | 29 | use Sergiors\Silex\Provider\AnnotationsServiceProvider; |
@@ -36,13 +33,10 @@ discard block |
||
36 | 33 | use Sergiors\Silex\Provider\TemplatingServiceProvider; |
37 | 34 | use Sergiors\Silex\Routing\ChainUrlGenerator; |
38 | 35 | use Sergiors\Silex\Routing\ChainUrlMatcher; |
39 | -use Symfony\Component\EventDispatcher\EventDispatcher; |
|
40 | 36 | use Symfony\Component\Finder\Finder; |
41 | 37 | use Symfony\Component\HttpFoundation\Request; |
42 | 38 | use Symfony\Component\HttpFoundation\Response; |
43 | 39 | use Symfony\Component\HttpKernel\Event\FilterResponseEvent; |
44 | -use Symfony\Component\HttpKernel\Event\GetResponseEvent; |
|
45 | -use Symfony\Component\HttpKernel\Event\PostResponseEvent; |
|
46 | 40 | use Symfony\Component\HttpKernel\KernelEvents; |
47 | 41 | use Symfony\Component\Yaml\Yaml; |
48 | 42 |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | $this->register(new \Silex\Provider\SerializerServiceProvider()); |
161 | 161 | $this->register(new \Silex\Provider\ValidatorServiceProvider()); |
162 | 162 | |
163 | - $this->error(function (\Exception $e, Request $request, $code) { |
|
163 | + $this->error(function(\Exception $e, Request $request, $code) { |
|
164 | 164 | if ($this['debug']) { |
165 | 165 | return; |
166 | 166 | } |
@@ -252,14 +252,14 @@ discard block |
||
252 | 252 | return $router; |
253 | 253 | }); |
254 | 254 | |
255 | - $this['eccube.router.origin'] = function ($app) { |
|
255 | + $this['eccube.router.origin'] = function($app) { |
|
256 | 256 | $resource = __DIR__.'/Controller'; |
257 | 257 | $cachePrefix = 'Origin'; |
258 | 258 | |
259 | 259 | return $app['eccube.router']($resource, $cachePrefix); |
260 | 260 | }; |
261 | 261 | |
262 | - $this['eccube.routers.plugin'] = function ($app) { |
|
262 | + $this['eccube.routers.plugin'] = function($app) { |
|
263 | 263 | // TODO 有効なプラグインを対象とする必要がある. |
264 | 264 | $dirs = Finder::create() |
265 | 265 | ->in($app['config']['root_dir'].'/app/Plugin') |
@@ -276,7 +276,7 @@ discard block |
||
276 | 276 | return $routers; |
277 | 277 | }; |
278 | 278 | |
279 | - $this['eccube.router.extend'] = function ($app) { |
|
279 | + $this['eccube.router.extend'] = function($app) { |
|
280 | 280 | $resource = $app['config']['root_dir'].'/app/Eccube/Controller'; |
281 | 281 | $cachePrefix = 'Extend'; |
282 | 282 | |
@@ -285,7 +285,7 @@ discard block |
||
285 | 285 | return $router; |
286 | 286 | }; |
287 | 287 | |
288 | - $this->extend('request_matcher', function ($matcher, $app) { |
|
288 | + $this->extend('request_matcher', function($matcher, $app) { |
|
289 | 289 | $matchers = []; |
290 | 290 | $matchers[] = $app['eccube.router.extend']; |
291 | 291 | foreach ($app['eccube.routers.plugin'] as $router) { |
@@ -297,7 +297,7 @@ discard block |
||
297 | 297 | return new ChainUrlMatcher($matchers, $app['request_context']); |
298 | 298 | }); |
299 | 299 | |
300 | - $this->extend('url_generator', function ($generator, $app) { |
|
300 | + $this->extend('url_generator', function($generator, $app) { |
|
301 | 301 | $generators = []; |
302 | 302 | $generators[] = $app['eccube.router.extend']; |
303 | 303 | foreach ($app['eccube.routers.plugin'] as $router) { |
@@ -328,7 +328,7 @@ discard block |
||
328 | 328 | 'translator.cache_dir' => $this['debug'] ? null : $this['config']['root_dir'].'/app/cache/translator', |
329 | 329 | 'locale_fallbacks' => ['ja', 'en'], |
330 | 330 | )); |
331 | - $this->extend('translator', function ($translator, \Silex\Application $app) { |
|
331 | + $this->extend('translator', function($translator, \Silex\Application $app) { |
|
332 | 332 | $translator->addLoader('yaml', new \Symfony\Component\Translation\Loader\YamlFileLoader()); |
333 | 333 | |
334 | 334 | $file = __DIR__.'/Resource/locale/validator.'.$app['locale'].'.yml'; |
@@ -375,14 +375,14 @@ discard block |
||
375 | 375 | $this->register(new \Silex\Provider\TwigServiceProvider(), array( |
376 | 376 | 'twig.form.templates' => array('Form/form_layout.twig'), |
377 | 377 | )); |
378 | - $this->extend('twig', function (\Twig_Environment $twig, \Silex\Application $app) { |
|
378 | + $this->extend('twig', function(\Twig_Environment $twig, \Silex\Application $app) { |
|
379 | 379 | $twig->addExtension(new \Eccube\Twig\Extension\EccubeExtension($app)); |
380 | 380 | $twig->addExtension(new \Twig_Extension_StringLoader()); |
381 | 381 | |
382 | 382 | return $twig; |
383 | 383 | }); |
384 | 384 | |
385 | - $this->before(function (Request $request, \Silex\Application $app) { |
|
385 | + $this->before(function(Request $request, \Silex\Application $app) { |
|
386 | 386 | $app['admin'] = false; |
387 | 387 | $app['front'] = false; |
388 | 388 | $pathinfo = rawurldecode($request->getPathInfo()); |
@@ -414,7 +414,7 @@ discard block |
||
414 | 414 | // フロント or 管理画面ごとにtwigの探索パスを切り替える. |
415 | 415 | if (!$app->offsetExists('twig')) { |
416 | 416 | |
417 | - $app->extend('twig', function (\Twig_Environment $twig, \Silex\Application $app) { |
|
417 | + $app->extend('twig', function(\Twig_Environment $twig, \Silex\Application $app) { |
|
418 | 418 | $paths = array(); |
419 | 419 | |
420 | 420 | // 互換性がないのでprofiler とproduction 時のcacheを分離する |
@@ -461,7 +461,7 @@ discard block |
||
461 | 461 | }, self::EARLY_EVENT); |
462 | 462 | |
463 | 463 | // twigのグローバル変数を定義. |
464 | - $this->on(\Symfony\Component\HttpKernel\KernelEvents::CONTROLLER, function (\Symfony\Component\HttpKernel\Event\FilterControllerEvent $event) { |
|
464 | + $this->on(\Symfony\Component\HttpKernel\KernelEvents::CONTROLLER, function(\Symfony\Component\HttpKernel\Event\FilterControllerEvent $event) { |
|
465 | 465 | // 未ログイン時にマイページや管理画面以下にアクセスするとSubRequestで実行されるため, |
466 | 466 | // $event->isMasterRequest()ではなく、グローバル変数が初期化済かどうかの判定を行う |
467 | 467 | if (isset($this['twig_global_initialized']) && $this['twig_global_initialized'] === true) { |
@@ -528,7 +528,7 @@ discard block |
||
528 | 528 | // メール送信時の文字エンコード指定(デフォルトはUTF-8) |
529 | 529 | if (isset($this['config']['mail']['charset_iso_2022_jp']) && is_bool($this['config']['mail']['charset_iso_2022_jp'])) { |
530 | 530 | if ($this['config']['mail']['charset_iso_2022_jp'] === true) { |
531 | - \Swift::init(function () { |
|
531 | + \Swift::init(function() { |
|
532 | 532 | \Swift_DependencyContainer::getInstance() |
533 | 533 | ->register('mime.qpheaderencoder') |
534 | 534 | ->asAliasOf('mime.base64headerencoder'); |
@@ -656,7 +656,7 @@ discard block |
||
656 | 656 | 'EXTRACT' => 'Eccube\Doctrine\ORM\Query\Extract', |
657 | 657 | ), |
658 | 658 | )); |
659 | - $this->extend('orm.em', function (\Doctrine\ORM\EntityManager $em, \Silex\Application $app) { |
|
659 | + $this->extend('orm.em', function(\Doctrine\ORM\EntityManager $em, \Silex\Application $app) { |
|
660 | 660 | // tax_rule |
661 | 661 | $taxRuleRepository = $em->getRepository('Eccube\Entity\TaxRule'); |
662 | 662 | $taxRuleRepository->setApplication($app); |
@@ -746,31 +746,31 @@ discard block |
||
746 | 746 | array('^/mypage', 'ROLE_USER'), |
747 | 747 | ); |
748 | 748 | |
749 | - $this['eccube.password_encoder'] = function ($app) { |
|
749 | + $this['eccube.password_encoder'] = function($app) { |
|
750 | 750 | return new \Eccube\Security\Core\Encoder\PasswordEncoder($app['config']); |
751 | 751 | }; |
752 | - $this['security.encoder_factory'] = function ($app) { |
|
752 | + $this['security.encoder_factory'] = function($app) { |
|
753 | 753 | return new \Symfony\Component\Security\Core\Encoder\EncoderFactory(array( |
754 | 754 | 'Eccube\Entity\Customer' => $app['eccube.password_encoder'], |
755 | 755 | 'Eccube\Entity\Member' => $app['eccube.password_encoder'], |
756 | 756 | )); |
757 | 757 | }; |
758 | - $this['eccube.event_listner.security'] = function ($app) { |
|
758 | + $this['eccube.event_listner.security'] = function($app) { |
|
759 | 759 | return new \Eccube\EventListener\SecurityEventListener($app['orm.em']); |
760 | 760 | }; |
761 | 761 | |
762 | 762 | // Voterの設定 |
763 | - $this['authority_voter'] = function ($app) { |
|
763 | + $this['authority_voter'] = function($app) { |
|
764 | 764 | return new \Eccube\Security\Voter\AuthorityVoter($app); |
765 | 765 | }; |
766 | 766 | |
767 | - $this->extend('security.voters', function ($voters, \Silex\Application $app) { |
|
767 | + $this->extend('security.voters', function($voters, \Silex\Application $app) { |
|
768 | 768 | $voters[] = $app['authority_voter']; |
769 | 769 | |
770 | 770 | return $voters; |
771 | 771 | }); |
772 | 772 | |
773 | - $this['security.access_manager'] = function ($app) { |
|
773 | + $this['security.access_manager'] = function($app) { |
|
774 | 774 | return new \Symfony\Component\Security\Core\Authorization\AccessDecisionManager($app['security.voters'], 'unanimous'); |
775 | 775 | }; |
776 | 776 | |
@@ -928,7 +928,7 @@ discard block |
||
928 | 928 | $app = $this; |
929 | 929 | |
930 | 930 | // Response Event(http cache対応、event実行は一番遅く設定) |
931 | - $this->on(\Symfony\Component\HttpKernel\KernelEvents::RESPONSE, function (\Symfony\Component\HttpKernel\Event\FilterResponseEvent $event) use ($app) { |
|
931 | + $this->on(\Symfony\Component\HttpKernel\KernelEvents::RESPONSE, function(\Symfony\Component\HttpKernel\Event\FilterResponseEvent $event) use ($app) { |
|
932 | 932 | |
933 | 933 | if (!$event->isMasterRequest()) { |
934 | 934 | 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 | array( // TODO 暫定 |
@@ -469,11 +469,11 @@ discard block |
||
469 | 469 | { |
470 | 470 | $this->resetNatTimer(); |
471 | 471 | |
472 | - $config_file = $this->config_path . '/database.yml'; |
|
472 | + $config_file = $this->config_path.'/database.yml'; |
|
473 | 473 | $database = Yaml::parse(file_get_contents($config_file)); |
474 | 474 | $config['database'] = $database['database']; |
475 | 475 | |
476 | - $config_file = $this->config_path . '/config.yml'; |
|
476 | + $config_file = $this->config_path.'/config.yml'; |
|
477 | 477 | $baseConfig = Yaml::parse(file_get_contents($config_file)); |
478 | 478 | $config['config'] = $baseConfig; |
479 | 479 | |
@@ -531,11 +531,11 @@ discard block |
||
531 | 531 | { |
532 | 532 | $this->resetNatTimer(); |
533 | 533 | |
534 | - $config_file = $this->config_path . '/database.yml'; |
|
534 | + $config_file = $this->config_path.'/database.yml'; |
|
535 | 535 | $database = Yaml::parse(file_get_contents($config_file)); |
536 | 536 | $config['database'] = $database['database']; |
537 | 537 | |
538 | - $config_file = $this->config_path . '/config.yml'; |
|
538 | + $config_file = $this->config_path.'/config.yml'; |
|
539 | 539 | $baseConfig = Yaml::parse(file_get_contents($config_file)); |
540 | 540 | $config['config'] = $baseConfig; |
541 | 541 | |
@@ -598,7 +598,7 @@ discard block |
||
598 | 598 | $config = new Configuration($app['db']); |
599 | 599 | $config->setMigrationsNamespace('DoctrineMigrations'); |
600 | 600 | |
601 | - $migrationDir = __DIR__ . '/../../Resource/doctrine/migration'; |
|
601 | + $migrationDir = __DIR__.'/../../Resource/doctrine/migration'; |
|
602 | 602 | $config->setMigrationsDirectory($migrationDir); |
603 | 603 | $config->registerMigrationsFromDirectory($migrationDir); |
604 | 604 | |
@@ -630,7 +630,7 @@ discard block |
||
630 | 630 | private function getProtectedDirs() |
631 | 631 | { |
632 | 632 | $protectedDirs = array(); |
633 | - $base = __DIR__ . '/../../../..'; |
|
633 | + $base = __DIR__.'/../../../..'; |
|
634 | 634 | $dirs = array( |
635 | 635 | '/html', |
636 | 636 | '/app', |
@@ -643,7 +643,7 @@ discard block |
||
643 | 643 | ); |
644 | 644 | |
645 | 645 | foreach ($dirs as $dir) { |
646 | - if (!is_writable($base . $dir)) { |
|
646 | + if (!is_writable($base.$dir)) { |
|
647 | 647 | $protectedDirs[] = $dir; |
648 | 648 | } |
649 | 649 | } |
@@ -654,7 +654,7 @@ discard block |
||
654 | 654 | private function createConfigYamlFile($data, $auth = true) |
655 | 655 | { |
656 | 656 | $fs = new Filesystem(); |
657 | - $config_file = $this->config_path . '/config.yml'; |
|
657 | + $config_file = $this->config_path.'/config.yml'; |
|
658 | 658 | |
659 | 659 | if ($fs->exists($config_file)) { |
660 | 660 | $config = Yaml::parse(file_get_contents($config_file)); |
@@ -683,7 +683,7 @@ discard block |
||
683 | 683 | |
684 | 684 | $fs = new Filesystem(); |
685 | 685 | $content = str_replace( |
686 | - $target, $replace, file_get_contents($this->dist_path . '/config.yml.dist') |
|
686 | + $target, $replace, file_get_contents($this->dist_path.'/config.yml.dist') |
|
687 | 687 | ); |
688 | 688 | $fs->dumpFile($config_file, $content); |
689 | 689 | |
@@ -697,7 +697,7 @@ discard block |
||
697 | 697 | |
698 | 698 | private function addInstallStatus() |
699 | 699 | { |
700 | - $config_file = $this->config_path . '/config.yml'; |
|
700 | + $config_file = $this->config_path.'/config.yml'; |
|
701 | 701 | $config = Yaml::parse(file_get_contents($config_file)); |
702 | 702 | $config['eccube_install'] = 1; |
703 | 703 | $yml = Yaml::dump($config); |
@@ -709,7 +709,7 @@ discard block |
||
709 | 709 | private function createDatabaseYamlFile($data) |
710 | 710 | { |
711 | 711 | $fs = new Filesystem(); |
712 | - $config_file = $this->config_path . '/database.yml'; |
|
712 | + $config_file = $this->config_path.'/database.yml'; |
|
713 | 713 | if ($fs->exists($config_file)) { |
714 | 714 | $fs->remove($config_file); |
715 | 715 | } |
@@ -742,14 +742,14 @@ discard block |
||
742 | 742 | |
743 | 743 | $fs = new Filesystem(); |
744 | 744 | $content = str_replace( |
745 | - $target, $replace, file_get_contents($this->dist_path . '/database.yml.dist') |
|
745 | + $target, $replace, file_get_contents($this->dist_path.'/database.yml.dist') |
|
746 | 746 | ); |
747 | 747 | } else { |
748 | 748 | $content = Yaml::dump( |
749 | 749 | array( |
750 | 750 | 'database' => array( |
751 | 751 | 'driver' => 'pdo_sqlite', |
752 | - 'path' => realpath($this->config_path . '/eccube.db') |
|
752 | + 'path' => realpath($this->config_path.'/eccube.db') |
|
753 | 753 | ) |
754 | 754 | ) |
755 | 755 | ); |
@@ -762,7 +762,7 @@ discard block |
||
762 | 762 | private function createMailYamlFile($data) |
763 | 763 | { |
764 | 764 | $fs = new Filesystem(); |
765 | - $config_file = $this->config_path . '/mail.yml'; |
|
765 | + $config_file = $this->config_path.'/mail.yml'; |
|
766 | 766 | if ($fs->exists($config_file)) { |
767 | 767 | $fs->remove($config_file); |
768 | 768 | } |
@@ -777,7 +777,7 @@ discard block |
||
777 | 777 | |
778 | 778 | $fs = new Filesystem(); |
779 | 779 | $content = str_replace( |
780 | - $target, $replace, file_get_contents($this->dist_path . '/mail.yml.dist') |
|
780 | + $target, $replace, file_get_contents($this->dist_path.'/mail.yml.dist') |
|
781 | 781 | ); |
782 | 782 | $fs->dumpFile($config_file, $content); |
783 | 783 | |
@@ -787,7 +787,7 @@ discard block |
||
787 | 787 | private function createPathYamlFile($data, Request $request) |
788 | 788 | { |
789 | 789 | $fs = new Filesystem(); |
790 | - $config_file = $this->config_path . '/path.yml'; |
|
790 | + $config_file = $this->config_path.'/path.yml'; |
|
791 | 791 | if ($fs->exists($config_file)) { |
792 | 792 | $fs->remove($config_file); |
793 | 793 | } |
@@ -795,16 +795,16 @@ discard block |
||
795 | 795 | $ADMIN_ROUTE = $data['admin_dir']; |
796 | 796 | $TEMPLATE_CODE = 'default'; |
797 | 797 | $USER_DATA_ROUTE = 'user_data'; |
798 | - $ROOT_DIR = realpath(__DIR__ . '/../../../../'); |
|
798 | + $ROOT_DIR = realpath(__DIR__.'/../../../../'); |
|
799 | 799 | $ROOT_URLPATH = $request->getBasePath(); |
800 | - $ROOT_PUBLIC_URLPATH = $ROOT_URLPATH . RELATIVE_PUBLIC_DIR_PATH; |
|
800 | + $ROOT_PUBLIC_URLPATH = $ROOT_URLPATH.RELATIVE_PUBLIC_DIR_PATH; |
|
801 | 801 | |
802 | 802 | $target = array('${ADMIN_ROUTE}', '${TEMPLATE_CODE}', '${USER_DATA_ROUTE}', '${ROOT_DIR}', '${ROOT_URLPATH}', '${ROOT_PUBLIC_URLPATH}'); |
803 | 803 | $replace = array($ADMIN_ROUTE, $TEMPLATE_CODE, $USER_DATA_ROUTE, $ROOT_DIR, $ROOT_URLPATH, $ROOT_PUBLIC_URLPATH); |
804 | 804 | |
805 | 805 | $fs = new Filesystem(); |
806 | 806 | $content = str_replace( |
807 | - $target, $replace, file_get_contents($this->dist_path . '/path.yml.dist') |
|
807 | + $target, $replace, file_get_contents($this->dist_path.'/path.yml.dist') |
|
808 | 808 | ); |
809 | 809 | $fs->dumpFile($config_file, $content); |
810 | 810 | |
@@ -813,7 +813,7 @@ discard block |
||
813 | 813 | |
814 | 814 | private function sendAppData($params) |
815 | 815 | { |
816 | - $config_file = $this->config_path . '/database.yml'; |
|
816 | + $config_file = $this->config_path.'/database.yml'; |
|
817 | 817 | $db_config = Yaml::parse(file_get_contents($config_file)); |
818 | 818 | |
819 | 819 | $this->setPDO(); |
@@ -825,7 +825,7 @@ discard block |
||
825 | 825 | } |
826 | 826 | |
827 | 827 | if ($db_config['database']['driver'] === 'pdo_mysql') { |
828 | - $db_ver = 'MySQL:' . $version; |
|
828 | + $db_ver = 'MySQL:'.$version; |
|
829 | 829 | } else { |
830 | 830 | $db_ver = $version; |
831 | 831 | } |
@@ -843,7 +843,7 @@ discard block |
||
843 | 843 | |
844 | 844 | $header = array( |
845 | 845 | 'Content-Type: application/x-www-form-urlencoded', |
846 | - 'Content-Length: ' . strlen($data), |
|
846 | + 'Content-Length: '.strlen($data), |
|
847 | 847 | ); |
848 | 848 | $context = stream_context_create( |
849 | 849 | array( |
@@ -870,7 +870,7 @@ discard block |
||
870 | 870 | public function migration(InstallApplication $app, Request $request) |
871 | 871 | { |
872 | 872 | return $app['twig']->render('migration.twig', array( |
873 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', |
|
873 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', |
|
874 | 874 | )); |
875 | 875 | } |
876 | 876 | |
@@ -899,7 +899,7 @@ discard block |
||
899 | 899 | return $app['twig']->render('migration_plugin.twig', array( |
900 | 900 | 'Plugins' => $Plugins, |
901 | 901 | 'version' => Constant::VERSION, |
902 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', |
|
902 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', |
|
903 | 903 | )); |
904 | 904 | } |
905 | 905 | } |
@@ -922,7 +922,7 @@ discard block |
||
922 | 922 | \Eccube\Util\Cache::clear($config_app, true); |
923 | 923 | |
924 | 924 | return $app['twig']->render('migration_end.twig', array( |
925 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', |
|
925 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', |
|
926 | 926 | )); |
927 | 927 | } |
928 | 928 | } |
@@ -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 | )); |
@@ -112,7 +112,7 @@ |
||
112 | 112 | } |
113 | 113 | } |
114 | 114 | |
115 | - $builder->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) use ($Product) { |
|
115 | + $builder->addEventListener(FormEvents::PRE_SUBMIT, function(FormEvent $event) use ($Product) { |
|
116 | 116 | $data = $event->getData(); |
117 | 117 | $form = $event->getForm(); |
118 | 118 | if (!is_null($Product->getClassName2())) { |