@@ -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 | } |