@@ -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 | // TODO ディレクトリ名は暫定 |
281 | 281 | $resource = $app['config']['root_dir'].'/app/Acme/Controller'; |
282 | 282 | $cachePrefix = 'Extend'; |
@@ -286,7 +286,7 @@ discard block |
||
286 | 286 | return $router; |
287 | 287 | }; |
288 | 288 | |
289 | - $this->extend('request_matcher', function ($matcher, $app) { |
|
289 | + $this->extend('request_matcher', function($matcher, $app) { |
|
290 | 290 | $matchers = []; |
291 | 291 | $matchers[] = $app['eccube.router.extend']; |
292 | 292 | foreach ($app['eccube.routers.plugin'] as $router) { |
@@ -298,7 +298,7 @@ discard block |
||
298 | 298 | return new ChainUrlMatcher($matchers, $app['request_context']); |
299 | 299 | }); |
300 | 300 | |
301 | - $this->extend('url_generator', function ($generator, $app) { |
|
301 | + $this->extend('url_generator', function($generator, $app) { |
|
302 | 302 | $generators = []; |
303 | 303 | $generators[] = $app['eccube.router.extend']; |
304 | 304 | foreach ($app['eccube.routers.plugin'] as $router) { |
@@ -329,7 +329,7 @@ discard block |
||
329 | 329 | 'translator.cache_dir' => $this['debug'] ? null : $this['config']['root_dir'].'/app/cache/translator', |
330 | 330 | 'locale_fallbacks' => ['ja', 'en'], |
331 | 331 | )); |
332 | - $this->extend('translator', function ($translator, \Silex\Application $app) { |
|
332 | + $this->extend('translator', function($translator, \Silex\Application $app) { |
|
333 | 333 | $translator->addLoader('yaml', new \Symfony\Component\Translation\Loader\YamlFileLoader()); |
334 | 334 | |
335 | 335 | $file = __DIR__.'/Resource/locale/validator.'.$app['locale'].'.yml'; |
@@ -376,14 +376,14 @@ discard block |
||
376 | 376 | $this->register(new \Silex\Provider\TwigServiceProvider(), array( |
377 | 377 | 'twig.form.templates' => array('Form/form_layout.twig'), |
378 | 378 | )); |
379 | - $this->extend('twig', function (\Twig_Environment $twig, \Silex\Application $app) { |
|
379 | + $this->extend('twig', function(\Twig_Environment $twig, \Silex\Application $app) { |
|
380 | 380 | $twig->addExtension(new \Eccube\Twig\Extension\EccubeExtension($app)); |
381 | 381 | $twig->addExtension(new \Twig_Extension_StringLoader()); |
382 | 382 | |
383 | 383 | return $twig; |
384 | 384 | }); |
385 | 385 | |
386 | - $this->before(function (Request $request, \Silex\Application $app) { |
|
386 | + $this->before(function(Request $request, \Silex\Application $app) { |
|
387 | 387 | $app['admin'] = false; |
388 | 388 | $app['front'] = false; |
389 | 389 | $pathinfo = rawurldecode($request->getPathInfo()); |
@@ -415,7 +415,7 @@ discard block |
||
415 | 415 | // フロント or 管理画面ごとにtwigの探索パスを切り替える. |
416 | 416 | if (!$app->offsetExists('twig')) { |
417 | 417 | |
418 | - $app->extend('twig', function (\Twig_Environment $twig, \Silex\Application $app) { |
|
418 | + $app->extend('twig', function(\Twig_Environment $twig, \Silex\Application $app) { |
|
419 | 419 | $paths = array(); |
420 | 420 | |
421 | 421 | // 互換性がないのでprofiler とproduction 時のcacheを分離する |
@@ -462,7 +462,7 @@ discard block |
||
462 | 462 | }, self::EARLY_EVENT); |
463 | 463 | |
464 | 464 | // twigのグローバル変数を定義. |
465 | - $this->on(\Symfony\Component\HttpKernel\KernelEvents::CONTROLLER, function (\Symfony\Component\HttpKernel\Event\FilterControllerEvent $event) { |
|
465 | + $this->on(\Symfony\Component\HttpKernel\KernelEvents::CONTROLLER, function(\Symfony\Component\HttpKernel\Event\FilterControllerEvent $event) { |
|
466 | 466 | // 未ログイン時にマイページや管理画面以下にアクセスするとSubRequestで実行されるため, |
467 | 467 | // $event->isMasterRequest()ではなく、グローバル変数が初期化済かどうかの判定を行う |
468 | 468 | if (isset($this['twig_global_initialized']) && $this['twig_global_initialized'] === true) { |
@@ -529,7 +529,7 @@ discard block |
||
529 | 529 | // メール送信時の文字エンコード指定(デフォルトはUTF-8) |
530 | 530 | if (isset($this['config']['mail']['charset_iso_2022_jp']) && is_bool($this['config']['mail']['charset_iso_2022_jp'])) { |
531 | 531 | if ($this['config']['mail']['charset_iso_2022_jp'] === true) { |
532 | - \Swift::init(function () { |
|
532 | + \Swift::init(function() { |
|
533 | 533 | \Swift_DependencyContainer::getInstance() |
534 | 534 | ->register('mime.qpheaderencoder') |
535 | 535 | ->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) { |
@@ -61,9 +61,9 @@ discard block |
||
61 | 61 | |
62 | 62 | public function __construct() |
63 | 63 | { |
64 | - $this->config_path = __DIR__ . '/../../../../app/config/eccube'; |
|
65 | - $this->dist_path = __DIR__ . '/../../Resource/config'; |
|
66 | - $this->cache_path = __DIR__ . '/../../../../app/cache'; |
|
64 | + $this->config_path = __DIR__.'/../../../../app/config/eccube'; |
|
65 | + $this->dist_path = __DIR__.'/../../Resource/config'; |
|
66 | + $this->cache_path = __DIR__.'/../../../../app/cache'; |
|
67 | 67 | } |
68 | 68 | |
69 | 69 | private function isValid(Request $request, Form $form) |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | |
114 | 114 | return $app['twig']->render('step1.twig', array( |
115 | 115 | 'form' => $form->createView(), |
116 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', |
|
116 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', |
|
117 | 117 | )); |
118 | 118 | } |
119 | 119 | |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | |
137 | 137 | return $app['twig']->render('step2.twig', array( |
138 | 138 | 'protectedDirs' => $protectedDirs, |
139 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', |
|
139 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', |
|
140 | 140 | )); |
141 | 141 | } |
142 | 142 | |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | |
151 | 151 | if (empty($sessionData['shop_name'])) { |
152 | 152 | |
153 | - $config_file = $this->config_path . '/config.yml'; |
|
153 | + $config_file = $this->config_path.'/config.yml'; |
|
154 | 154 | $fs = new Filesystem(); |
155 | 155 | |
156 | 156 | if ($fs->exists($config_file)) { |
@@ -164,11 +164,11 @@ discard block |
||
164 | 164 | } |
165 | 165 | |
166 | 166 | // セキュリティの設定 |
167 | - $config_file = $this->config_path . '/path.yml'; |
|
167 | + $config_file = $this->config_path.'/path.yml'; |
|
168 | 168 | $config = Yaml::parse(file_get_contents($config_file)); |
169 | 169 | $sessionData['admin_dir'] = $config['admin_route']; |
170 | 170 | |
171 | - $config_file = $this->config_path . '/config.yml'; |
|
171 | + $config_file = $this->config_path.'/config.yml'; |
|
172 | 172 | $config = Yaml::parse(file_get_contents($config_file)); |
173 | 173 | |
174 | 174 | $allowHost = $config['admin_allow_host']; |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | $sessionData['admin_force_ssl'] = (bool) $config['force_ssl']; |
179 | 179 | |
180 | 180 | // メール設定 |
181 | - $config_file = $this->config_path . '/mail.yml'; |
|
181 | + $config_file = $this->config_path.'/mail.yml'; |
|
182 | 182 | $config = Yaml::parse(file_get_contents($config_file)); |
183 | 183 | $mail = $config['mail']; |
184 | 184 | $sessionData['mail_backend'] = $mail['transport']; |
@@ -201,7 +201,7 @@ discard block |
||
201 | 201 | |
202 | 202 | return $app['twig']->render('step3.twig', array( |
203 | 203 | 'form' => $form->createView(), |
204 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', |
|
204 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', |
|
205 | 205 | )); |
206 | 206 | } |
207 | 207 | |
@@ -216,7 +216,7 @@ discard block |
||
216 | 216 | |
217 | 217 | if (empty($sessionData['database'])) { |
218 | 218 | |
219 | - $config_file = $this->config_path . '/database.yml'; |
|
219 | + $config_file = $this->config_path.'/database.yml'; |
|
220 | 220 | $fs = new Filesystem(); |
221 | 221 | |
222 | 222 | if ($fs->exists($config_file)) { |
@@ -244,7 +244,7 @@ discard block |
||
244 | 244 | |
245 | 245 | return $app['twig']->render('step4.twig', array( |
246 | 246 | 'form' => $form->createView(), |
247 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', |
|
247 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', |
|
248 | 248 | )); |
249 | 249 | } |
250 | 250 | |
@@ -290,7 +290,7 @@ discard block |
||
290 | 290 | $host = $request->getSchemeAndHttpHost(); |
291 | 291 | $basePath = $request->getBasePath(); |
292 | 292 | $params = array( |
293 | - 'http_url' => $host . $basePath, |
|
293 | + 'http_url' => $host.$basePath, |
|
294 | 294 | 'shop_name' => $sessionData['shop_name'], |
295 | 295 | ); |
296 | 296 | |
@@ -305,24 +305,24 @@ discard block |
||
305 | 305 | |
306 | 306 | return $app['twig']->render('step5.twig', array( |
307 | 307 | 'form' => $form->createView(), |
308 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', |
|
308 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', |
|
309 | 309 | )); |
310 | 310 | } |
311 | 311 | |
312 | 312 | // インストール完了 |
313 | 313 | public function complete(InstallApplication $app, Request $request) |
314 | 314 | { |
315 | - $config_file = $this->config_path . '/path.yml'; |
|
315 | + $config_file = $this->config_path.'/path.yml'; |
|
316 | 316 | $config = Yaml::parse(file_get_contents($config_file)); |
317 | 317 | |
318 | 318 | $host = $request->getSchemeAndHttpHost(); |
319 | 319 | $basePath = $request->getBasePath(); |
320 | 320 | |
321 | - $adminUrl = $host . $basePath . '/' . $config['admin_dir']; |
|
321 | + $adminUrl = $host.$basePath.'/'.$config['admin_dir']; |
|
322 | 322 | |
323 | 323 | return $app['twig']->render('complete.twig', array( |
324 | 324 | 'admin_url' => $adminUrl, |
325 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', |
|
325 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', |
|
326 | 326 | )); |
327 | 327 | } |
328 | 328 | |
@@ -338,12 +338,12 @@ discard block |
||
338 | 338 | { |
339 | 339 | foreach ($this->required_modules as $module) { |
340 | 340 | if (!extension_loaded($module)) { |
341 | - $app->addDanger('[必須] ' . $module . ' 拡張モジュールが有効になっていません。', 'install'); |
|
341 | + $app->addDanger('[必須] '.$module.' 拡張モジュールが有効になっていません。', 'install'); |
|
342 | 342 | } |
343 | 343 | } |
344 | 344 | |
345 | 345 | if (!extension_loaded('pdo_mysql') && !extension_loaded('pdo_pgsql')) { |
346 | - $app->addDanger('[必須] ' . 'pdo_pgsql又はpdo_mysql 拡張モジュールを有効にしてください。', 'install'); |
|
346 | + $app->addDanger('[必須] '.'pdo_pgsql又はpdo_mysql 拡張モジュールを有効にしてください。', 'install'); |
|
347 | 347 | } |
348 | 348 | |
349 | 349 | foreach ($this->recommended_module as $module) { |
@@ -353,7 +353,7 @@ discard block |
||
353 | 353 | //http://php.net/manual/en/migration71.deprecated.php |
354 | 354 | continue; |
355 | 355 | } |
356 | - $app->addWarning('[推奨] ' . $module . ' 拡張モジュールが有効になっていません。', 'install'); |
|
356 | + $app->addWarning('[推奨] '.$module.' 拡張モジュールが有効になっていません。', 'install'); |
|
357 | 357 | } |
358 | 358 | } |
359 | 359 | |
@@ -371,7 +371,7 @@ discard block |
||
371 | 371 | if (!function_exists('apache_get_modules')) { |
372 | 372 | $app->addWarning('mod_rewrite が有効になっているか不明です。', 'install'); |
373 | 373 | } elseif (!in_array('mod_rewrite', apache_get_modules())) { |
374 | - $app->addDanger('[必須] ' . 'mod_rewriteを有効にしてください。', 'install'); |
|
374 | + $app->addDanger('[必須] '.'mod_rewriteを有効にしてください。', 'install'); |
|
375 | 375 | } |
376 | 376 | } elseif (isset($_SERVER['SERVER_SOFTWARE']) && strpos('Microsoft-IIS', $_SERVER['SERVER_SOFTWARE']) !== false) { |
377 | 377 | // iis |
@@ -382,7 +382,7 @@ discard block |
||
382 | 382 | |
383 | 383 | private function setPDO() |
384 | 384 | { |
385 | - $config_file = $this->config_path . '/database.yml'; |
|
385 | + $config_file = $this->config_path.'/database.yml'; |
|
386 | 386 | $config = Yaml::parse(file_get_contents($config_file)); |
387 | 387 | |
388 | 388 | try { |
@@ -417,7 +417,7 @@ discard block |
||
417 | 417 | private function getEntityManager() |
418 | 418 | { |
419 | 419 | if (!isset($this->app['orm.em'])) { |
420 | - $config_file = $this->config_path . '/database.yml'; |
|
420 | + $config_file = $this->config_path.'/database.yml'; |
|
421 | 421 | $database = Yaml::parse(file_get_contents($config_file)); |
422 | 422 | |
423 | 423 | $this->app->register(new \Silex\Provider\DoctrineServiceProvider(), array( |
@@ -429,8 +429,8 @@ discard block |
||
429 | 429 | 'type' => 'yml', |
430 | 430 | 'namespace' => 'Eccube\Entity', |
431 | 431 | 'path' => array( |
432 | - __DIR__ . '/../../Resource/doctrine', |
|
433 | - __DIR__ . '/../../Resource/doctrine/master', |
|
432 | + __DIR__.'/../../Resource/doctrine', |
|
433 | + __DIR__.'/../../Resource/doctrine/master', |
|
434 | 434 | ), |
435 | 435 | ), |
436 | 436 | array( // TODO 暫定 |
@@ -462,7 +462,7 @@ discard block |
||
462 | 462 | } |
463 | 463 | } |
464 | 464 | $this->app->register(new \Dflydev\Provider\DoctrineOrm\DoctrineOrmServiceProvider(), array( |
465 | - 'orm.proxies_dir' => __DIR__ . '/../../app/cache/doctrine', |
|
465 | + 'orm.proxies_dir' => __DIR__.'/../../app/cache/doctrine', |
|
466 | 466 | 'orm.em.options' => array( |
467 | 467 | 'mappings' => $ormMappings |
468 | 468 | ) |
@@ -490,11 +490,11 @@ discard block |
||
490 | 490 | { |
491 | 491 | $this->resetNatTimer(); |
492 | 492 | |
493 | - $config_file = $this->config_path . '/database.yml'; |
|
493 | + $config_file = $this->config_path.'/database.yml'; |
|
494 | 494 | $database = Yaml::parse(file_get_contents($config_file)); |
495 | 495 | $config['database'] = $database['database']; |
496 | 496 | |
497 | - $config_file = $this->config_path . '/config.yml'; |
|
497 | + $config_file = $this->config_path.'/config.yml'; |
|
498 | 498 | $baseConfig = Yaml::parse(file_get_contents($config_file)); |
499 | 499 | $config['config'] = $baseConfig; |
500 | 500 | |
@@ -552,11 +552,11 @@ discard block |
||
552 | 552 | { |
553 | 553 | $this->resetNatTimer(); |
554 | 554 | |
555 | - $config_file = $this->config_path . '/database.yml'; |
|
555 | + $config_file = $this->config_path.'/database.yml'; |
|
556 | 556 | $database = Yaml::parse(file_get_contents($config_file)); |
557 | 557 | $config['database'] = $database['database']; |
558 | 558 | |
559 | - $config_file = $this->config_path . '/config.yml'; |
|
559 | + $config_file = $this->config_path.'/config.yml'; |
|
560 | 560 | $baseConfig = Yaml::parse(file_get_contents($config_file)); |
561 | 561 | $config['config'] = $baseConfig; |
562 | 562 | |
@@ -619,7 +619,7 @@ discard block |
||
619 | 619 | $config = new Configuration($app['db']); |
620 | 620 | $config->setMigrationsNamespace('DoctrineMigrations'); |
621 | 621 | |
622 | - $migrationDir = __DIR__ . '/../../Resource/doctrine/migration'; |
|
622 | + $migrationDir = __DIR__.'/../../Resource/doctrine/migration'; |
|
623 | 623 | $config->setMigrationsDirectory($migrationDir); |
624 | 624 | $config->registerMigrationsFromDirectory($migrationDir); |
625 | 625 | |
@@ -651,7 +651,7 @@ discard block |
||
651 | 651 | private function getProtectedDirs() |
652 | 652 | { |
653 | 653 | $protectedDirs = array(); |
654 | - $base = __DIR__ . '/../../../..'; |
|
654 | + $base = __DIR__.'/../../../..'; |
|
655 | 655 | $dirs = array( |
656 | 656 | '/html', |
657 | 657 | '/app', |
@@ -664,7 +664,7 @@ discard block |
||
664 | 664 | ); |
665 | 665 | |
666 | 666 | foreach ($dirs as $dir) { |
667 | - if (!is_writable($base . $dir)) { |
|
667 | + if (!is_writable($base.$dir)) { |
|
668 | 668 | $protectedDirs[] = $dir; |
669 | 669 | } |
670 | 670 | } |
@@ -675,7 +675,7 @@ discard block |
||
675 | 675 | private function createConfigYamlFile($data, $auth = true) |
676 | 676 | { |
677 | 677 | $fs = new Filesystem(); |
678 | - $config_file = $this->config_path . '/config.yml'; |
|
678 | + $config_file = $this->config_path.'/config.yml'; |
|
679 | 679 | |
680 | 680 | if ($fs->exists($config_file)) { |
681 | 681 | $config = Yaml::parse(file_get_contents($config_file)); |
@@ -704,7 +704,7 @@ discard block |
||
704 | 704 | |
705 | 705 | $fs = new Filesystem(); |
706 | 706 | $content = str_replace( |
707 | - $target, $replace, file_get_contents($this->dist_path . '/config.yml.dist') |
|
707 | + $target, $replace, file_get_contents($this->dist_path.'/config.yml.dist') |
|
708 | 708 | ); |
709 | 709 | $fs->dumpFile($config_file, $content); |
710 | 710 | |
@@ -718,7 +718,7 @@ discard block |
||
718 | 718 | |
719 | 719 | private function addInstallStatus() |
720 | 720 | { |
721 | - $config_file = $this->config_path . '/config.yml'; |
|
721 | + $config_file = $this->config_path.'/config.yml'; |
|
722 | 722 | $config = Yaml::parse(file_get_contents($config_file)); |
723 | 723 | $config['eccube_install'] = 1; |
724 | 724 | $yml = Yaml::dump($config); |
@@ -730,7 +730,7 @@ discard block |
||
730 | 730 | private function createDatabaseYamlFile($data) |
731 | 731 | { |
732 | 732 | $fs = new Filesystem(); |
733 | - $config_file = $this->config_path . '/database.yml'; |
|
733 | + $config_file = $this->config_path.'/database.yml'; |
|
734 | 734 | if ($fs->exists($config_file)) { |
735 | 735 | $fs->remove($config_file); |
736 | 736 | } |
@@ -763,14 +763,14 @@ discard block |
||
763 | 763 | |
764 | 764 | $fs = new Filesystem(); |
765 | 765 | $content = str_replace( |
766 | - $target, $replace, file_get_contents($this->dist_path . '/database.yml.dist') |
|
766 | + $target, $replace, file_get_contents($this->dist_path.'/database.yml.dist') |
|
767 | 767 | ); |
768 | 768 | } else { |
769 | 769 | $content = Yaml::dump( |
770 | 770 | array( |
771 | 771 | 'database' => array( |
772 | 772 | 'driver' => 'pdo_sqlite', |
773 | - 'path' => realpath($this->config_path . '/eccube.db') |
|
773 | + 'path' => realpath($this->config_path.'/eccube.db') |
|
774 | 774 | ) |
775 | 775 | ) |
776 | 776 | ); |
@@ -783,7 +783,7 @@ discard block |
||
783 | 783 | private function createMailYamlFile($data) |
784 | 784 | { |
785 | 785 | $fs = new Filesystem(); |
786 | - $config_file = $this->config_path . '/mail.yml'; |
|
786 | + $config_file = $this->config_path.'/mail.yml'; |
|
787 | 787 | if ($fs->exists($config_file)) { |
788 | 788 | $fs->remove($config_file); |
789 | 789 | } |
@@ -798,7 +798,7 @@ discard block |
||
798 | 798 | |
799 | 799 | $fs = new Filesystem(); |
800 | 800 | $content = str_replace( |
801 | - $target, $replace, file_get_contents($this->dist_path . '/mail.yml.dist') |
|
801 | + $target, $replace, file_get_contents($this->dist_path.'/mail.yml.dist') |
|
802 | 802 | ); |
803 | 803 | $fs->dumpFile($config_file, $content); |
804 | 804 | |
@@ -808,7 +808,7 @@ discard block |
||
808 | 808 | private function createPathYamlFile($data, Request $request) |
809 | 809 | { |
810 | 810 | $fs = new Filesystem(); |
811 | - $config_file = $this->config_path . '/path.yml'; |
|
811 | + $config_file = $this->config_path.'/path.yml'; |
|
812 | 812 | if ($fs->exists($config_file)) { |
813 | 813 | $fs->remove($config_file); |
814 | 814 | } |
@@ -816,16 +816,16 @@ discard block |
||
816 | 816 | $ADMIN_ROUTE = $data['admin_dir']; |
817 | 817 | $TEMPLATE_CODE = 'default'; |
818 | 818 | $USER_DATA_ROUTE = 'user_data'; |
819 | - $ROOT_DIR = realpath(__DIR__ . '/../../../../'); |
|
819 | + $ROOT_DIR = realpath(__DIR__.'/../../../../'); |
|
820 | 820 | $ROOT_URLPATH = $request->getBasePath(); |
821 | - $ROOT_PUBLIC_URLPATH = $ROOT_URLPATH . RELATIVE_PUBLIC_DIR_PATH; |
|
821 | + $ROOT_PUBLIC_URLPATH = $ROOT_URLPATH.RELATIVE_PUBLIC_DIR_PATH; |
|
822 | 822 | |
823 | 823 | $target = array('${ADMIN_ROUTE}', '${TEMPLATE_CODE}', '${USER_DATA_ROUTE}', '${ROOT_DIR}', '${ROOT_URLPATH}', '${ROOT_PUBLIC_URLPATH}'); |
824 | 824 | $replace = array($ADMIN_ROUTE, $TEMPLATE_CODE, $USER_DATA_ROUTE, $ROOT_DIR, $ROOT_URLPATH, $ROOT_PUBLIC_URLPATH); |
825 | 825 | |
826 | 826 | $fs = new Filesystem(); |
827 | 827 | $content = str_replace( |
828 | - $target, $replace, file_get_contents($this->dist_path . '/path.yml.dist') |
|
828 | + $target, $replace, file_get_contents($this->dist_path.'/path.yml.dist') |
|
829 | 829 | ); |
830 | 830 | $fs->dumpFile($config_file, $content); |
831 | 831 | |
@@ -834,7 +834,7 @@ discard block |
||
834 | 834 | |
835 | 835 | private function sendAppData($params) |
836 | 836 | { |
837 | - $config_file = $this->config_path . '/database.yml'; |
|
837 | + $config_file = $this->config_path.'/database.yml'; |
|
838 | 838 | $db_config = Yaml::parse(file_get_contents($config_file)); |
839 | 839 | |
840 | 840 | $this->setPDO(); |
@@ -846,7 +846,7 @@ discard block |
||
846 | 846 | } |
847 | 847 | |
848 | 848 | if ($db_config['database']['driver'] === 'pdo_mysql') { |
849 | - $db_ver = 'MySQL:' . $version; |
|
849 | + $db_ver = 'MySQL:'.$version; |
|
850 | 850 | } else { |
851 | 851 | $db_ver = $version; |
852 | 852 | } |
@@ -864,7 +864,7 @@ discard block |
||
864 | 864 | |
865 | 865 | $header = array( |
866 | 866 | 'Content-Type: application/x-www-form-urlencoded', |
867 | - 'Content-Length: ' . strlen($data), |
|
867 | + 'Content-Length: '.strlen($data), |
|
868 | 868 | ); |
869 | 869 | $context = stream_context_create( |
870 | 870 | array( |
@@ -891,7 +891,7 @@ discard block |
||
891 | 891 | public function migration(InstallApplication $app, Request $request) |
892 | 892 | { |
893 | 893 | return $app['twig']->render('migration.twig', array( |
894 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', |
|
894 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', |
|
895 | 895 | )); |
896 | 896 | } |
897 | 897 | |
@@ -920,7 +920,7 @@ discard block |
||
920 | 920 | return $app['twig']->render('migration_plugin.twig', array( |
921 | 921 | 'Plugins' => $Plugins, |
922 | 922 | 'version' => Constant::VERSION, |
923 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', |
|
923 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', |
|
924 | 924 | )); |
925 | 925 | } |
926 | 926 | } |
@@ -943,7 +943,7 @@ discard block |
||
943 | 943 | \Eccube\Util\Cache::clear($config_app, true); |
944 | 944 | |
945 | 945 | return $app['twig']->render('migration_end.twig', array( |
946 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', |
|
946 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', |
|
947 | 947 | )); |
948 | 948 | } |
949 | 949 | } |
@@ -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())) { |
@@ -52,7 +52,7 @@ |
||
52 | 52 | |
53 | 53 | $this->app = $this->getSilexApplication(); |
54 | 54 | |
55 | - \Eccube\Util\Cache::clear($this->app,$input->getOption('all')); |
|
55 | + \Eccube\Util\Cache::clear($this->app, $input->getOption('all')); |
|
56 | 56 | $output->writeln(sprintf("%s <info>success</info>", 'cache:clear')); |
57 | 57 | |
58 | 58 | } |
@@ -24,7 +24,6 @@ |
||
24 | 24 | |
25 | 25 | namespace Eccube\Command; |
26 | 26 | |
27 | -use Symfony\Component\Console\Input\InputArgument; |
|
28 | 27 | use Symfony\Component\Console\Input\InputInterface; |
29 | 28 | use Symfony\Component\Console\Input\InputOption; |
30 | 29 | use Symfony\Component\Console\Output\OutputInterface; |