@@ -153,9 +153,9 @@ discard block |
||
153 | 153 | $qb |
154 | 154 | ->andWhere('c.id = :customer_id OR CONCAT(c.name01, c.name02) LIKE :name OR CONCAT(c.kana01, c.kana02) LIKE :kana OR c.email LIKE :email') |
155 | 155 | ->setParameter('customer_id', $id) |
156 | - ->setParameter('name', '%' . $clean_key_multi . '%') |
|
157 | - ->setParameter('kana', '%' . $clean_key_multi . '%') |
|
158 | - ->setParameter('email', '%' . $clean_key_multi . '%'); |
|
156 | + ->setParameter('name', '%'.$clean_key_multi.'%') |
|
157 | + ->setParameter('kana', '%'.$clean_key_multi.'%') |
|
158 | + ->setParameter('email', '%'.$clean_key_multi.'%'); |
|
159 | 159 | } |
160 | 160 | |
161 | 161 | // Pref |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | if (isset($searchData['tel']) && Str::isNotBlank($searchData['tel'])) { |
206 | 206 | $qb |
207 | 207 | ->andWhere('CONCAT(c.tel01, c.tel02, c.tel03) LIKE :tel') |
208 | - ->setParameter('tel', '%' . $searchData['tel'] . '%'); |
|
208 | + ->setParameter('tel', '%'.$searchData['tel'].'%'); |
|
209 | 209 | } |
210 | 210 | |
211 | 211 | // buy_total |
@@ -299,7 +299,7 @@ discard block |
||
299 | 299 | ->leftJoin('c.Orders', 'o') |
300 | 300 | ->leftJoin('o.OrderDetails', 'od') |
301 | 301 | ->andWhere('od.product_name LIKE :buy_product_name OR od.product_code LIKE :buy_product_name') |
302 | - ->setParameter('buy_product_name', '%' . $searchData['buy_product_code'] . '%'); |
|
302 | + ->setParameter('buy_product_name', '%'.$searchData['buy_product_code'].'%'); |
|
303 | 303 | } |
304 | 304 | |
305 | 305 | // Order By |
@@ -164,7 +164,7 @@ |
||
164 | 164 | $cmf->setEntityManager($em); |
165 | 165 | $metadatas = $cmf->getAllMetadata(); |
166 | 166 | |
167 | - $filters = array_map(function ($value) { |
|
167 | + $filters = array_map(function($value) { |
|
168 | 168 | return ucfirst(Inflector::camelize(str_replace('plg_', '', $value))); |
169 | 169 | }, $tableList); |
170 | 170 | $metadatas = MetadataFilter::filter($metadatas, $filters); |
@@ -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() |
@@ -25,8 +25,6 @@ discard block |
||
25 | 25 | |
26 | 26 | use Eccube\Application\ApplicationTrait; |
27 | 27 | use Eccube\Common\Constant; |
28 | -use Eccube\Doctrine\ORM\Mapping\Driver\YamlDriver; |
|
29 | -use Eccube\EventListener\TransactionListener; |
|
30 | 28 | use Eccube\Plugin\ConfigManager as PluginConfigManager; |
31 | 29 | use Eccube\Routing\EccubeRouter; |
32 | 30 | use Eccube\ServiceProvider\MobileDetectServiceProvider; |
@@ -37,13 +35,11 @@ discard block |
||
37 | 35 | use Sergiors\Silex\Provider\TemplatingServiceProvider; |
38 | 36 | use Sergiors\Silex\Routing\ChainUrlGenerator; |
39 | 37 | use Sergiors\Silex\Routing\ChainUrlMatcher; |
40 | -use Symfony\Component\EventDispatcher\EventDispatcher; |
|
41 | 38 | use Symfony\Component\Finder\Finder; |
42 | 39 | use Symfony\Component\HttpFoundation\Request; |
43 | 40 | use Symfony\Component\HttpFoundation\Response; |
44 | 41 | use Symfony\Component\HttpKernel\Event\FilterResponseEvent; |
45 | 42 | use Symfony\Component\HttpKernel\Event\GetResponseEvent; |
46 | -use Symfony\Component\HttpKernel\Event\PostResponseEvent; |
|
47 | 43 | use Symfony\Component\HttpKernel\KernelEvents; |
48 | 44 | use Symfony\Component\Yaml\Yaml; |
49 | 45 |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | $this->register(new \Silex\Provider\ValidatorServiceProvider()); |
163 | 163 | $this->register(new MobileDetectServiceProvider()); |
164 | 164 | |
165 | - $this->error(function (\Exception $e, Request $request, $code) { |
|
165 | + $this->error(function(\Exception $e, Request $request, $code) { |
|
166 | 166 | if ($this['debug']) { |
167 | 167 | return; |
168 | 168 | } |
@@ -256,14 +256,14 @@ discard block |
||
256 | 256 | return $router; |
257 | 257 | }); |
258 | 258 | |
259 | - $this['eccube.router.origin'] = function ($app) { |
|
259 | + $this['eccube.router.origin'] = function($app) { |
|
260 | 260 | $resource = __DIR__.'/Controller'; |
261 | 261 | $cachePrefix = 'Origin'; |
262 | 262 | |
263 | 263 | return $app['eccube.router']($resource, $cachePrefix); |
264 | 264 | }; |
265 | 265 | |
266 | - $this['eccube.routers.plugin'] = function ($app) { |
|
266 | + $this['eccube.routers.plugin'] = function($app) { |
|
267 | 267 | // TODO 有効なプラグインを対象とする必要がある. |
268 | 268 | $dirs = Finder::create() |
269 | 269 | ->in($app['config']['root_dir'].'/app/Plugin') |
@@ -280,7 +280,7 @@ discard block |
||
280 | 280 | return $routers; |
281 | 281 | }; |
282 | 282 | |
283 | - $this['eccube.router.extend'] = function ($app) { |
|
283 | + $this['eccube.router.extend'] = function($app) { |
|
284 | 284 | // TODO ディレクトリ名は暫定 |
285 | 285 | $resource = $app['config']['root_dir'].'/app/Acme/Controller'; |
286 | 286 | $cachePrefix = 'Extend'; |
@@ -290,7 +290,7 @@ discard block |
||
290 | 290 | return $router; |
291 | 291 | }; |
292 | 292 | |
293 | - $this->extend('request_matcher', function ($matcher, $app) { |
|
293 | + $this->extend('request_matcher', function($matcher, $app) { |
|
294 | 294 | $matchers = []; |
295 | 295 | $matchers[] = $app['eccube.router.extend']; |
296 | 296 | foreach ($app['eccube.routers.plugin'] as $router) { |
@@ -302,7 +302,7 @@ discard block |
||
302 | 302 | return new ChainUrlMatcher($matchers, $app['request_context']); |
303 | 303 | }); |
304 | 304 | |
305 | - $this->extend('url_generator', function ($generator, $app) { |
|
305 | + $this->extend('url_generator', function($generator, $app) { |
|
306 | 306 | $generators = []; |
307 | 307 | $generators[] = $app['eccube.router.extend']; |
308 | 308 | foreach ($app['eccube.routers.plugin'] as $router) { |
@@ -333,7 +333,7 @@ discard block |
||
333 | 333 | 'translator.cache_dir' => $this['debug'] ? null : $this['config']['root_dir'].'/app/cache/translator', |
334 | 334 | 'locale_fallbacks' => ['ja', 'en'], |
335 | 335 | )); |
336 | - $this->extend('translator', function ($translator, \Silex\Application $app) { |
|
336 | + $this->extend('translator', function($translator, \Silex\Application $app) { |
|
337 | 337 | $translator->addLoader('yaml', new \Symfony\Component\Translation\Loader\YamlFileLoader()); |
338 | 338 | |
339 | 339 | $file = __DIR__.'/Resource/locale/validator.'.$app['locale'].'.yml'; |
@@ -380,14 +380,14 @@ discard block |
||
380 | 380 | $this->register(new \Silex\Provider\TwigServiceProvider(), array( |
381 | 381 | 'twig.form.templates' => array('Form/form_layout.twig'), |
382 | 382 | )); |
383 | - $this->extend('twig', function (\Twig_Environment $twig, \Silex\Application $app) { |
|
383 | + $this->extend('twig', function(\Twig_Environment $twig, \Silex\Application $app) { |
|
384 | 384 | $twig->addExtension(new \Eccube\Twig\Extension\EccubeExtension($app)); |
385 | 385 | $twig->addExtension(new \Twig_Extension_StringLoader()); |
386 | 386 | |
387 | 387 | return $twig; |
388 | 388 | }); |
389 | 389 | |
390 | - $this->before(function (Request $request, \Silex\Application $app) { |
|
390 | + $this->before(function(Request $request, \Silex\Application $app) { |
|
391 | 391 | $app['admin'] = false; |
392 | 392 | $app['front'] = false; |
393 | 393 | $pathinfo = rawurldecode($request->getPathInfo()); |
@@ -419,7 +419,7 @@ discard block |
||
419 | 419 | // フロント or 管理画面ごとにtwigの探索パスを切り替える. |
420 | 420 | if (!$app->offsetExists('twig')) { |
421 | 421 | |
422 | - $app->extend('twig', function (\Twig_Environment $twig, \Silex\Application $app) { |
|
422 | + $app->extend('twig', function(\Twig_Environment $twig, \Silex\Application $app) { |
|
423 | 423 | $paths = array(); |
424 | 424 | |
425 | 425 | // 互換性がないのでprofiler とproduction 時のcacheを分離する |
@@ -466,7 +466,7 @@ discard block |
||
466 | 466 | }, self::EARLY_EVENT); |
467 | 467 | |
468 | 468 | // twigのグローバル変数を定義. |
469 | - $this->on(\Symfony\Component\HttpKernel\KernelEvents::CONTROLLER, function (\Symfony\Component\HttpKernel\Event\FilterControllerEvent $event) { |
|
469 | + $this->on(\Symfony\Component\HttpKernel\KernelEvents::CONTROLLER, function(\Symfony\Component\HttpKernel\Event\FilterControllerEvent $event) { |
|
470 | 470 | // 未ログイン時にマイページや管理画面以下にアクセスするとSubRequestで実行されるため, |
471 | 471 | // $event->isMasterRequest()ではなく、グローバル変数が初期化済かどうかの判定を行う |
472 | 472 | if (isset($this['twig_global_initialized']) && $this['twig_global_initialized'] === true) { |
@@ -533,7 +533,7 @@ discard block |
||
533 | 533 | // メール送信時の文字エンコード指定(デフォルトはUTF-8) |
534 | 534 | if (isset($this['config']['mail']['charset_iso_2022_jp']) && is_bool($this['config']['mail']['charset_iso_2022_jp'])) { |
535 | 535 | if ($this['config']['mail']['charset_iso_2022_jp'] === true) { |
536 | - \Swift::init(function () { |
|
536 | + \Swift::init(function() { |
|
537 | 537 | \Swift_DependencyContainer::getInstance() |
538 | 538 | ->register('mime.qpheaderencoder') |
539 | 539 | ->asAliasOf('mime.base64headerencoder'); |
@@ -660,7 +660,7 @@ discard block |
||
660 | 660 | 'EXTRACT' => 'Eccube\Doctrine\ORM\Query\Extract', |
661 | 661 | ), |
662 | 662 | )); |
663 | - $this->extend('orm.em', function (\Doctrine\ORM\EntityManager $em, \Silex\Application $app) { |
|
663 | + $this->extend('orm.em', function(\Doctrine\ORM\EntityManager $em, \Silex\Application $app) { |
|
664 | 664 | // tax_rule |
665 | 665 | $taxRuleRepository = $em->getRepository('Eccube\Entity\TaxRule'); |
666 | 666 | $taxRuleRepository->setApplication($app); |
@@ -756,31 +756,31 @@ discard block |
||
756 | 756 | array('^/mypage', 'ROLE_USER', $channel), |
757 | 757 | ); |
758 | 758 | |
759 | - $this['eccube.password_encoder'] = function ($app) { |
|
759 | + $this['eccube.password_encoder'] = function($app) { |
|
760 | 760 | return new \Eccube\Security\Core\Encoder\PasswordEncoder($app['config']); |
761 | 761 | }; |
762 | - $this['security.encoder_factory'] = function ($app) { |
|
762 | + $this['security.encoder_factory'] = function($app) { |
|
763 | 763 | return new \Symfony\Component\Security\Core\Encoder\EncoderFactory(array( |
764 | 764 | 'Eccube\Entity\Customer' => $app['eccube.password_encoder'], |
765 | 765 | 'Eccube\Entity\Member' => $app['eccube.password_encoder'], |
766 | 766 | )); |
767 | 767 | }; |
768 | - $this['eccube.event_listner.security'] = function ($app) { |
|
768 | + $this['eccube.event_listner.security'] = function($app) { |
|
769 | 769 | return new \Eccube\EventListener\SecurityEventListener($app['orm.em']); |
770 | 770 | }; |
771 | 771 | |
772 | 772 | // Voterの設定 |
773 | - $this['authority_voter'] = function ($app) { |
|
773 | + $this['authority_voter'] = function($app) { |
|
774 | 774 | return new \Eccube\Security\Voter\AuthorityVoter($app); |
775 | 775 | }; |
776 | 776 | |
777 | - $this->extend('security.voters', function ($voters, \Silex\Application $app) { |
|
777 | + $this->extend('security.voters', function($voters, \Silex\Application $app) { |
|
778 | 778 | $voters[] = $app['authority_voter']; |
779 | 779 | |
780 | 780 | return $voters; |
781 | 781 | }); |
782 | 782 | |
783 | - $this['security.access_manager'] = function ($app) { |
|
783 | + $this['security.access_manager'] = function($app) { |
|
784 | 784 | return new \Symfony\Component\Security\Core\Authorization\AccessDecisionManager($app['security.voters'], 'unanimous'); |
785 | 785 | }; |
786 | 786 | |
@@ -794,7 +794,7 @@ discard block |
||
794 | 794 | { |
795 | 795 | $config = $this['config']; |
796 | 796 | if (isset($config['trusted_proxies_connection_only']) && !empty($config['trusted_proxies_connection_only'])) { |
797 | - $this->on(KernelEvents::REQUEST, function (GetResponseEvent $event) use ($config) { |
|
797 | + $this->on(KernelEvents::REQUEST, function(GetResponseEvent $event) use ($config) { |
|
798 | 798 | // サブリクエストのREMOTE_ADDRも動的に設定を行う必要があるため、KernelEvents::REQUESTを使用する |
799 | 799 | Request::setTrustedProxies(array_merge(array($event->getRequest()->server->get('REMOTE_ADDR')), $config['trusted_proxies'])); |
800 | 800 | }, self::EARLY_EVENT); |
@@ -954,7 +954,7 @@ discard block |
||
954 | 954 | $app = $this; |
955 | 955 | |
956 | 956 | // Response Event(http cache対応、event実行は一番遅く設定) |
957 | - $this->on(\Symfony\Component\HttpKernel\KernelEvents::RESPONSE, function (\Symfony\Component\HttpKernel\Event\FilterResponseEvent $event) use ($app) { |
|
957 | + $this->on(\Symfony\Component\HttpKernel\KernelEvents::RESPONSE, function(\Symfony\Component\HttpKernel\Event\FilterResponseEvent $event) use ($app) { |
|
958 | 958 | |
959 | 959 | if (!$event->isMasterRequest()) { |
960 | 960 | 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,14 +178,14 @@ discard block |
||
178 | 178 | $sessionData['admin_force_ssl'] = (bool) $config['force_ssl']; |
179 | 179 | |
180 | 180 | // ロードバランサー、プロキシサーバ設定 |
181 | - $sessionData['trusted_proxies_connection_only'] = (bool)$config['trusted_proxies_connection_only']; |
|
181 | + $sessionData['trusted_proxies_connection_only'] = (bool) $config['trusted_proxies_connection_only']; |
|
182 | 182 | $trustedProxies = $config['trusted_proxies']; |
183 | 183 | if (count($trustedProxies) > 0) { |
184 | 184 | $sessionData['trusted_proxies'] = Str::convertLineFeed(implode("\n", $trustedProxies)); |
185 | 185 | } |
186 | 186 | |
187 | 187 | // メール設定 |
188 | - $config_file = $this->config_path . '/mail.yml'; |
|
188 | + $config_file = $this->config_path.'/mail.yml'; |
|
189 | 189 | $config = Yaml::parse(file_get_contents($config_file)); |
190 | 190 | $mail = $config['mail']; |
191 | 191 | $sessionData['mail_backend'] = $mail['transport']; |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | |
209 | 209 | return $app['twig']->render('step3.twig', array( |
210 | 210 | 'form' => $form->createView(), |
211 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', |
|
211 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', |
|
212 | 212 | )); |
213 | 213 | } |
214 | 214 | |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | |
224 | 224 | if (empty($sessionData['database'])) { |
225 | 225 | |
226 | - $config_file = $this->config_path . '/database.yml'; |
|
226 | + $config_file = $this->config_path.'/database.yml'; |
|
227 | 227 | $fs = new Filesystem(); |
228 | 228 | |
229 | 229 | if ($fs->exists($config_file)) { |
@@ -251,7 +251,7 @@ discard block |
||
251 | 251 | |
252 | 252 | return $app['twig']->render('step4.twig', array( |
253 | 253 | 'form' => $form->createView(), |
254 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', |
|
254 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', |
|
255 | 255 | )); |
256 | 256 | } |
257 | 257 | |
@@ -297,7 +297,7 @@ discard block |
||
297 | 297 | $host = $request->getSchemeAndHttpHost(); |
298 | 298 | $basePath = $request->getBasePath(); |
299 | 299 | $params = array( |
300 | - 'http_url' => $host . $basePath, |
|
300 | + 'http_url' => $host.$basePath, |
|
301 | 301 | 'shop_name' => $sessionData['shop_name'], |
302 | 302 | ); |
303 | 303 | |
@@ -312,16 +312,16 @@ discard block |
||
312 | 312 | |
313 | 313 | return $app['twig']->render('step5.twig', array( |
314 | 314 | 'form' => $form->createView(), |
315 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', |
|
315 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', |
|
316 | 316 | )); |
317 | 317 | } |
318 | 318 | |
319 | 319 | // インストール完了 |
320 | 320 | public function complete(InstallApplication $app, Request $request) |
321 | 321 | { |
322 | - $config_yml = $this->config_path . '/config.yml'; |
|
322 | + $config_yml = $this->config_path.'/config.yml'; |
|
323 | 323 | $config = Yaml::parse(file_get_contents($config_yml)); |
324 | - $config_path = $this->config_path . '/path.yml'; |
|
324 | + $config_path = $this->config_path.'/path.yml'; |
|
325 | 325 | $path_yml = Yaml::parse(file_get_contents($config_path)); |
326 | 326 | |
327 | 327 | $config = array_replace_recursive($path_yml, $config); |
@@ -336,11 +336,11 @@ discard block |
||
336 | 336 | $host = $request->getSchemeAndHttpHost(); |
337 | 337 | $basePath = $request->getBasePath(); |
338 | 338 | |
339 | - $adminUrl = $host . $basePath . '/' . $config['admin_dir']; |
|
339 | + $adminUrl = $host.$basePath.'/'.$config['admin_dir']; |
|
340 | 340 | |
341 | 341 | return $app['twig']->render('complete.twig', array( |
342 | 342 | 'admin_url' => $adminUrl, |
343 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', |
|
343 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', |
|
344 | 344 | )); |
345 | 345 | } |
346 | 346 | |
@@ -356,12 +356,12 @@ discard block |
||
356 | 356 | { |
357 | 357 | foreach ($this->required_modules as $module) { |
358 | 358 | if (!extension_loaded($module)) { |
359 | - $app->addDanger('[必須] ' . $module . ' 拡張モジュールが有効になっていません。', 'install'); |
|
359 | + $app->addDanger('[必須] '.$module.' 拡張モジュールが有効になっていません。', 'install'); |
|
360 | 360 | } |
361 | 361 | } |
362 | 362 | |
363 | 363 | if (!extension_loaded('pdo_mysql') && !extension_loaded('pdo_pgsql')) { |
364 | - $app->addDanger('[必須] ' . 'pdo_pgsql又はpdo_mysql 拡張モジュールを有効にしてください。', 'install'); |
|
364 | + $app->addDanger('[必須] '.'pdo_pgsql又はpdo_mysql 拡張モジュールを有効にしてください。', 'install'); |
|
365 | 365 | } |
366 | 366 | |
367 | 367 | foreach ($this->recommended_module as $module) { |
@@ -389,7 +389,7 @@ discard block |
||
389 | 389 | if (!function_exists('apache_get_modules')) { |
390 | 390 | $app->addWarning('mod_rewrite が有効になっているか不明です。', 'install'); |
391 | 391 | } elseif (!in_array('mod_rewrite', apache_get_modules())) { |
392 | - $app->addDanger('[必須] ' . 'mod_rewriteを有効にしてください。', 'install'); |
|
392 | + $app->addDanger('[必須] '.'mod_rewriteを有効にしてください。', 'install'); |
|
393 | 393 | } |
394 | 394 | } elseif (isset($_SERVER['SERVER_SOFTWARE']) && strpos('Microsoft-IIS', $_SERVER['SERVER_SOFTWARE']) !== false) { |
395 | 395 | // iis |
@@ -400,7 +400,7 @@ discard block |
||
400 | 400 | |
401 | 401 | private function setPDO() |
402 | 402 | { |
403 | - $config_file = $this->config_path . '/database.yml'; |
|
403 | + $config_file = $this->config_path.'/database.yml'; |
|
404 | 404 | $config = Yaml::parse(file_get_contents($config_file)); |
405 | 405 | |
406 | 406 | try { |
@@ -435,7 +435,7 @@ discard block |
||
435 | 435 | private function getEntityManager() |
436 | 436 | { |
437 | 437 | if (!isset($this->app['orm.em'])) { |
438 | - $config_file = $this->config_path . '/database.yml'; |
|
438 | + $config_file = $this->config_path.'/database.yml'; |
|
439 | 439 | $database = Yaml::parse(file_get_contents($config_file)); |
440 | 440 | |
441 | 441 | $this->app->register(new \Silex\Provider\DoctrineServiceProvider(), array( |
@@ -447,8 +447,8 @@ discard block |
||
447 | 447 | 'type' => 'yml', |
448 | 448 | 'namespace' => 'Eccube\Entity', |
449 | 449 | 'path' => array( |
450 | - __DIR__ . '/../../Resource/doctrine', |
|
451 | - __DIR__ . '/../../Resource/doctrine/master', |
|
450 | + __DIR__.'/../../Resource/doctrine', |
|
451 | + __DIR__.'/../../Resource/doctrine/master', |
|
452 | 452 | ), |
453 | 453 | ), |
454 | 454 | array( // TODO 暫定 |
@@ -480,7 +480,7 @@ discard block |
||
480 | 480 | } |
481 | 481 | } |
482 | 482 | $this->app->register(new \Dflydev\Provider\DoctrineOrm\DoctrineOrmServiceProvider(), array( |
483 | - 'orm.proxies_dir' => __DIR__ . '/../../app/cache/doctrine', |
|
483 | + 'orm.proxies_dir' => __DIR__.'/../../app/cache/doctrine', |
|
484 | 484 | 'orm.em.options' => array( |
485 | 485 | 'mappings' => $ormMappings |
486 | 486 | ) |
@@ -508,11 +508,11 @@ discard block |
||
508 | 508 | { |
509 | 509 | $this->resetNatTimer(); |
510 | 510 | |
511 | - $config_file = $this->config_path . '/database.yml'; |
|
511 | + $config_file = $this->config_path.'/database.yml'; |
|
512 | 512 | $database = Yaml::parse(file_get_contents($config_file)); |
513 | 513 | $config['database'] = $database['database']; |
514 | 514 | |
515 | - $config_file = $this->config_path . '/config.yml'; |
|
515 | + $config_file = $this->config_path.'/config.yml'; |
|
516 | 516 | $baseConfig = Yaml::parse(file_get_contents($config_file)); |
517 | 517 | $config['config'] = $baseConfig; |
518 | 518 | |
@@ -570,11 +570,11 @@ discard block |
||
570 | 570 | { |
571 | 571 | $this->resetNatTimer(); |
572 | 572 | |
573 | - $config_file = $this->config_path . '/database.yml'; |
|
573 | + $config_file = $this->config_path.'/database.yml'; |
|
574 | 574 | $database = Yaml::parse(file_get_contents($config_file)); |
575 | 575 | $config['database'] = $database['database']; |
576 | 576 | |
577 | - $config_file = $this->config_path . '/config.yml'; |
|
577 | + $config_file = $this->config_path.'/config.yml'; |
|
578 | 578 | $baseConfig = Yaml::parse(file_get_contents($config_file)); |
579 | 579 | $config['config'] = $baseConfig; |
580 | 580 | |
@@ -637,7 +637,7 @@ discard block |
||
637 | 637 | $config = new Configuration($app['db']); |
638 | 638 | $config->setMigrationsNamespace('DoctrineMigrations'); |
639 | 639 | |
640 | - $migrationDir = __DIR__ . '/../../Resource/doctrine/migration'; |
|
640 | + $migrationDir = __DIR__.'/../../Resource/doctrine/migration'; |
|
641 | 641 | $config->setMigrationsDirectory($migrationDir); |
642 | 642 | $config->registerMigrationsFromDirectory($migrationDir); |
643 | 643 | |
@@ -669,7 +669,7 @@ discard block |
||
669 | 669 | private function getProtectedDirs() |
670 | 670 | { |
671 | 671 | $protectedDirs = array(); |
672 | - $base = __DIR__ . '/../../../..'; |
|
672 | + $base = __DIR__.'/../../../..'; |
|
673 | 673 | $dirs = array( |
674 | 674 | '/html', |
675 | 675 | '/app', |
@@ -682,7 +682,7 @@ discard block |
||
682 | 682 | ); |
683 | 683 | |
684 | 684 | foreach ($dirs as $dir) { |
685 | - if (!is_writable($base . $dir)) { |
|
685 | + if (!is_writable($base.$dir)) { |
|
686 | 686 | $protectedDirs[] = $dir; |
687 | 687 | } |
688 | 688 | } |
@@ -693,7 +693,7 @@ discard block |
||
693 | 693 | private function createConfigYamlFile($data, $auth = true) |
694 | 694 | { |
695 | 695 | $fs = new Filesystem(); |
696 | - $config_file = $this->config_path . '/config.yml'; |
|
696 | + $config_file = $this->config_path.'/config.yml'; |
|
697 | 697 | |
698 | 698 | if ($fs->exists($config_file)) { |
699 | 699 | $config = Yaml::parse(file_get_contents($config_file)); |
@@ -734,7 +734,7 @@ discard block |
||
734 | 734 | |
735 | 735 | $fs = new Filesystem(); |
736 | 736 | $content = str_replace( |
737 | - $target, $replace, file_get_contents($this->dist_path . '/config.yml.dist') |
|
737 | + $target, $replace, file_get_contents($this->dist_path.'/config.yml.dist') |
|
738 | 738 | ); |
739 | 739 | $fs->dumpFile($config_file, $content); |
740 | 740 | |
@@ -750,7 +750,7 @@ discard block |
||
750 | 750 | |
751 | 751 | private function addInstallStatus() |
752 | 752 | { |
753 | - $config_file = $this->config_path . '/config.yml'; |
|
753 | + $config_file = $this->config_path.'/config.yml'; |
|
754 | 754 | $config = Yaml::parse(file_get_contents($config_file)); |
755 | 755 | $config['eccube_install'] = 1; |
756 | 756 | $yml = Yaml::dump($config); |
@@ -762,7 +762,7 @@ discard block |
||
762 | 762 | private function createDatabaseYamlFile($data) |
763 | 763 | { |
764 | 764 | $fs = new Filesystem(); |
765 | - $config_file = $this->config_path . '/database.yml'; |
|
765 | + $config_file = $this->config_path.'/database.yml'; |
|
766 | 766 | if ($fs->exists($config_file)) { |
767 | 767 | $fs->remove($config_file); |
768 | 768 | } |
@@ -795,14 +795,14 @@ discard block |
||
795 | 795 | |
796 | 796 | $fs = new Filesystem(); |
797 | 797 | $content = str_replace( |
798 | - $target, $replace, file_get_contents($this->dist_path . '/database.yml.dist') |
|
798 | + $target, $replace, file_get_contents($this->dist_path.'/database.yml.dist') |
|
799 | 799 | ); |
800 | 800 | } else { |
801 | 801 | $content = Yaml::dump( |
802 | 802 | array( |
803 | 803 | 'database' => array( |
804 | 804 | 'driver' => 'pdo_sqlite', |
805 | - 'path' => realpath($this->config_path . '/eccube.db') |
|
805 | + 'path' => realpath($this->config_path.'/eccube.db') |
|
806 | 806 | ) |
807 | 807 | ) |
808 | 808 | ); |
@@ -815,7 +815,7 @@ discard block |
||
815 | 815 | private function createMailYamlFile($data) |
816 | 816 | { |
817 | 817 | $fs = new Filesystem(); |
818 | - $config_file = $this->config_path . '/mail.yml'; |
|
818 | + $config_file = $this->config_path.'/mail.yml'; |
|
819 | 819 | if ($fs->exists($config_file)) { |
820 | 820 | $fs->remove($config_file); |
821 | 821 | } |
@@ -830,7 +830,7 @@ discard block |
||
830 | 830 | |
831 | 831 | $fs = new Filesystem(); |
832 | 832 | $content = str_replace( |
833 | - $target, $replace, file_get_contents($this->dist_path . '/mail.yml.dist') |
|
833 | + $target, $replace, file_get_contents($this->dist_path.'/mail.yml.dist') |
|
834 | 834 | ); |
835 | 835 | $fs->dumpFile($config_file, $content); |
836 | 836 | |
@@ -840,7 +840,7 @@ discard block |
||
840 | 840 | private function createPathYamlFile($data, Request $request) |
841 | 841 | { |
842 | 842 | $fs = new Filesystem(); |
843 | - $config_file = $this->config_path . '/path.yml'; |
|
843 | + $config_file = $this->config_path.'/path.yml'; |
|
844 | 844 | if ($fs->exists($config_file)) { |
845 | 845 | $fs->remove($config_file); |
846 | 846 | } |
@@ -848,16 +848,16 @@ discard block |
||
848 | 848 | $ADMIN_ROUTE = $data['admin_dir']; |
849 | 849 | $TEMPLATE_CODE = 'default'; |
850 | 850 | $USER_DATA_ROUTE = 'user_data'; |
851 | - $ROOT_DIR = realpath(__DIR__ . '/../../../../'); |
|
851 | + $ROOT_DIR = realpath(__DIR__.'/../../../../'); |
|
852 | 852 | $ROOT_URLPATH = $request->getBasePath(); |
853 | - $ROOT_PUBLIC_URLPATH = $ROOT_URLPATH . RELATIVE_PUBLIC_DIR_PATH; |
|
853 | + $ROOT_PUBLIC_URLPATH = $ROOT_URLPATH.RELATIVE_PUBLIC_DIR_PATH; |
|
854 | 854 | |
855 | 855 | $target = array('${ADMIN_ROUTE}', '${TEMPLATE_CODE}', '${USER_DATA_ROUTE}', '${ROOT_DIR}', '${ROOT_URLPATH}', '${ROOT_PUBLIC_URLPATH}'); |
856 | 856 | $replace = array($ADMIN_ROUTE, $TEMPLATE_CODE, $USER_DATA_ROUTE, $ROOT_DIR, $ROOT_URLPATH, $ROOT_PUBLIC_URLPATH); |
857 | 857 | |
858 | 858 | $fs = new Filesystem(); |
859 | 859 | $content = str_replace( |
860 | - $target, $replace, file_get_contents($this->dist_path . '/path.yml.dist') |
|
860 | + $target, $replace, file_get_contents($this->dist_path.'/path.yml.dist') |
|
861 | 861 | ); |
862 | 862 | $fs->dumpFile($config_file, $content); |
863 | 863 | |
@@ -866,7 +866,7 @@ discard block |
||
866 | 866 | |
867 | 867 | private function sendAppData($params) |
868 | 868 | { |
869 | - $config_file = $this->config_path . '/database.yml'; |
|
869 | + $config_file = $this->config_path.'/database.yml'; |
|
870 | 870 | $db_config = Yaml::parse(file_get_contents($config_file)); |
871 | 871 | |
872 | 872 | $this->setPDO(); |
@@ -878,7 +878,7 @@ discard block |
||
878 | 878 | } |
879 | 879 | |
880 | 880 | if ($db_config['database']['driver'] === 'pdo_mysql') { |
881 | - $db_ver = 'MySQL:' . $version; |
|
881 | + $db_ver = 'MySQL:'.$version; |
|
882 | 882 | } else { |
883 | 883 | $db_ver = $version; |
884 | 884 | } |
@@ -896,7 +896,7 @@ discard block |
||
896 | 896 | |
897 | 897 | $header = array( |
898 | 898 | 'Content-Type: application/x-www-form-urlencoded', |
899 | - 'Content-Length: ' . strlen($data), |
|
899 | + 'Content-Length: '.strlen($data), |
|
900 | 900 | ); |
901 | 901 | $context = stream_context_create( |
902 | 902 | array( |
@@ -923,7 +923,7 @@ discard block |
||
923 | 923 | public function migration(InstallApplication $app, Request $request) |
924 | 924 | { |
925 | 925 | return $app['twig']->render('migration.twig', array( |
926 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', |
|
926 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', |
|
927 | 927 | )); |
928 | 928 | } |
929 | 929 | |
@@ -952,7 +952,7 @@ discard block |
||
952 | 952 | return $app['twig']->render('migration_plugin.twig', array( |
953 | 953 | 'Plugins' => $Plugins, |
954 | 954 | 'version' => Constant::VERSION, |
955 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', |
|
955 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', |
|
956 | 956 | )); |
957 | 957 | } |
958 | 958 | } |
@@ -975,7 +975,7 @@ discard block |
||
975 | 975 | \Eccube\Util\Cache::clear($config_app, true); |
976 | 976 | |
977 | 977 | return $app['twig']->render('migration_end.twig', array( |
978 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', |
|
978 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', |
|
979 | 979 | )); |
980 | 980 | } |
981 | 981 | } |
@@ -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; |