@@ -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) |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | |
148 | 148 | if (empty($sessionData['shop_name'])) { |
149 | 149 | |
150 | - $config_file = $this->config_path . '/config.yml'; |
|
150 | + $config_file = $this->config_path.'/config.yml'; |
|
151 | 151 | $fs = new Filesystem(); |
152 | 152 | |
153 | 153 | if ($fs->exists($config_file)) { |
@@ -161,21 +161,21 @@ discard block |
||
161 | 161 | } |
162 | 162 | |
163 | 163 | // セキュリティの設定 |
164 | - $config_file = $this->config_path . '/path.yml'; |
|
164 | + $config_file = $this->config_path.'/path.yml'; |
|
165 | 165 | $config = Yaml::parse(file_get_contents($config_file)); |
166 | 166 | $sessionData['admin_dir'] = $config['admin_route']; |
167 | 167 | |
168 | - $config_file = $this->config_path . '/config.yml'; |
|
168 | + $config_file = $this->config_path.'/config.yml'; |
|
169 | 169 | $config = Yaml::parse(file_get_contents($config_file)); |
170 | 170 | |
171 | 171 | $allowHost = $config['admin_allow_host']; |
172 | 172 | if (count($allowHost) > 0) { |
173 | 173 | $sessionData['admin_allow_hosts'] = Str::convertLineFeed(implode("\n", $allowHost)); |
174 | 174 | } |
175 | - $sessionData['admin_force_ssl'] = (bool)$config['force_ssl']; |
|
175 | + $sessionData['admin_force_ssl'] = (bool) $config['force_ssl']; |
|
176 | 176 | |
177 | 177 | // メール設定 |
178 | - $config_file = $this->config_path . '/mail.yml'; |
|
178 | + $config_file = $this->config_path.'/mail.yml'; |
|
179 | 179 | $config = Yaml::parse(file_get_contents($config_file)); |
180 | 180 | $mail = $config['mail']; |
181 | 181 | $sessionData['mail_backend'] = $mail['transport']; |
@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | |
213 | 213 | if (empty($sessionData['database'])) { |
214 | 214 | |
215 | - $config_file = $this->config_path . '/database.yml'; |
|
215 | + $config_file = $this->config_path.'/database.yml'; |
|
216 | 216 | $fs = new Filesystem(); |
217 | 217 | |
218 | 218 | if ($fs->exists($config_file)) { |
@@ -285,7 +285,7 @@ discard block |
||
285 | 285 | $host = $request->getSchemeAndHttpHost(); |
286 | 286 | $basePath = $request->getBasePath(); |
287 | 287 | $params = array( |
288 | - 'http_url' => $host . $basePath, |
|
288 | + 'http_url' => $host.$basePath, |
|
289 | 289 | 'shop_name' => $sessionData['shop_name'], |
290 | 290 | ); |
291 | 291 | |
@@ -306,13 +306,13 @@ discard block |
||
306 | 306 | // インストール完了 |
307 | 307 | public function complete(InstallApplication $app, Request $request) |
308 | 308 | { |
309 | - $config_file = $this->config_path . '/path.yml'; |
|
309 | + $config_file = $this->config_path.'/path.yml'; |
|
310 | 310 | $config = Yaml::parse(file_get_contents($config_file)); |
311 | 311 | |
312 | 312 | $host = $request->getSchemeAndHttpHost(); |
313 | 313 | $basePath = $request->getBasePath(); |
314 | 314 | |
315 | - $adminUrl = $host . $basePath . '/' . $config['admin_dir']; |
|
315 | + $adminUrl = $host.$basePath.'/'.$config['admin_dir']; |
|
316 | 316 | |
317 | 317 | return $app['twig']->render('complete.twig', array( |
318 | 318 | 'admin_url' => $adminUrl, |
@@ -332,17 +332,17 @@ discard block |
||
332 | 332 | { |
333 | 333 | foreach ($this->required_modules as $module) { |
334 | 334 | if (!extension_loaded($module)) { |
335 | - $app->addDanger('[必須] ' . $module . ' 拡張モジュールが有効になっていません。', 'install'); |
|
335 | + $app->addDanger('[必須] '.$module.' 拡張モジュールが有効になっていません。', 'install'); |
|
336 | 336 | } |
337 | 337 | } |
338 | 338 | |
339 | 339 | if (!extension_loaded('pdo_mysql') && !extension_loaded('pdo_pgsql')) { |
340 | - $app->addDanger('[必須] ' . 'pdo_pgsql又はpdo_mysql 拡張モジュールを有効にしてください。', 'install'); |
|
340 | + $app->addDanger('[必須] '.'pdo_pgsql又はpdo_mysql 拡張モジュールを有効にしてください。', 'install'); |
|
341 | 341 | } |
342 | 342 | |
343 | 343 | foreach ($this->recommended_module as $module) { |
344 | 344 | if (!extension_loaded($module)) { |
345 | - $app->addWarning('[推奨] ' . $module . ' 拡張モジュールが有効になっていません。', 'install'); |
|
345 | + $app->addWarning('[推奨] '.$module.' 拡張モジュールが有効になっていません。', 'install'); |
|
346 | 346 | } |
347 | 347 | } |
348 | 348 | |
@@ -360,7 +360,7 @@ discard block |
||
360 | 360 | if (!function_exists('apache_get_modules')) { |
361 | 361 | $app->addWarning('mod_rewrite が有効になっているか不明です。', 'install'); |
362 | 362 | } elseif (!in_array('mod_rewrite', apache_get_modules())) { |
363 | - $app->addDanger('[必須] ' . 'mod_rewriteを有効にしてください。', 'install'); |
|
363 | + $app->addDanger('[必須] '.'mod_rewriteを有効にしてください。', 'install'); |
|
364 | 364 | } |
365 | 365 | } elseif (isset($_SERVER['SERVER_SOFTWARE']) && strpos('Microsoft-IIS', $_SERVER['SERVER_SOFTWARE']) !== false) { |
366 | 366 | // iis |
@@ -371,7 +371,7 @@ discard block |
||
371 | 371 | |
372 | 372 | private function setPDO() |
373 | 373 | { |
374 | - $config_file = $this->config_path . '/database.yml'; |
|
374 | + $config_file = $this->config_path.'/database.yml'; |
|
375 | 375 | $config = Yaml::parse(file_get_contents($config_file)); |
376 | 376 | |
377 | 377 | try { |
@@ -406,7 +406,7 @@ discard block |
||
406 | 406 | */ |
407 | 407 | private function getEntityManager() |
408 | 408 | { |
409 | - $config_file = $this->config_path . '/database.yml'; |
|
409 | + $config_file = $this->config_path.'/database.yml'; |
|
410 | 410 | $database = Yaml::parse(file_get_contents($config_file)); |
411 | 411 | |
412 | 412 | $this->app->register(new \Silex\Provider\DoctrineServiceProvider(), array( |
@@ -414,15 +414,15 @@ discard block |
||
414 | 414 | )); |
415 | 415 | |
416 | 416 | $this->app->register(new \Dflydev\Silex\Provider\DoctrineOrm\DoctrineOrmServiceProvider(), array( |
417 | - 'orm.proxies_dir' => __DIR__ . '/../../app/cache/doctrine', |
|
417 | + 'orm.proxies_dir' => __DIR__.'/../../app/cache/doctrine', |
|
418 | 418 | 'orm.em.options' => array( |
419 | 419 | 'mappings' => array( |
420 | 420 | array( |
421 | 421 | 'type' => 'yml', |
422 | 422 | 'namespace' => 'Eccube\Entity', |
423 | 423 | 'path' => array( |
424 | - __DIR__ . '/../../Resource/doctrine', |
|
425 | - __DIR__ . '/../../Resource/doctrine/master', |
|
424 | + __DIR__.'/../../Resource/doctrine', |
|
425 | + __DIR__.'/../../Resource/doctrine/master', |
|
426 | 426 | ), |
427 | 427 | ), |
428 | 428 | |
@@ -450,11 +450,11 @@ discard block |
||
450 | 450 | { |
451 | 451 | $this->resetNatTimer(); |
452 | 452 | |
453 | - $config_file = $this->config_path . '/database.yml'; |
|
453 | + $config_file = $this->config_path.'/database.yml'; |
|
454 | 454 | $database = Yaml::parse(file_get_contents($config_file)); |
455 | 455 | $config['database'] = $database['database']; |
456 | 456 | |
457 | - $config_file = $this->config_path . '/config.yml'; |
|
457 | + $config_file = $this->config_path.'/config.yml'; |
|
458 | 458 | $baseConfig = Yaml::parse(file_get_contents($config_file)); |
459 | 459 | $config['config'] = $baseConfig; |
460 | 460 | |
@@ -510,11 +510,11 @@ discard block |
||
510 | 510 | { |
511 | 511 | $this->resetNatTimer(); |
512 | 512 | |
513 | - $config_file = $this->config_path . '/database.yml'; |
|
513 | + $config_file = $this->config_path.'/database.yml'; |
|
514 | 514 | $database = Yaml::parse(file_get_contents($config_file)); |
515 | 515 | $config['database'] = $database['database']; |
516 | 516 | |
517 | - $config_file = $this->config_path . '/config.yml'; |
|
517 | + $config_file = $this->config_path.'/config.yml'; |
|
518 | 518 | $baseConfig = Yaml::parse(file_get_contents($config_file)); |
519 | 519 | $config['config'] = $baseConfig; |
520 | 520 | |
@@ -579,7 +579,7 @@ discard block |
||
579 | 579 | $config = new Configuration($app['db']); |
580 | 580 | $config->setMigrationsNamespace('DoctrineMigrations'); |
581 | 581 | |
582 | - $migrationDir = __DIR__ . '/../../Resource/doctrine/migration'; |
|
582 | + $migrationDir = __DIR__.'/../../Resource/doctrine/migration'; |
|
583 | 583 | $config->setMigrationsDirectory($migrationDir); |
584 | 584 | $config->registerMigrationsFromDirectory($migrationDir); |
585 | 585 | |
@@ -610,7 +610,7 @@ discard block |
||
610 | 610 | private function getProtectedDirs() |
611 | 611 | { |
612 | 612 | $protectedDirs = array(); |
613 | - $base = __DIR__ . '/../../../..'; |
|
613 | + $base = __DIR__.'/../../../..'; |
|
614 | 614 | $dirs = array( |
615 | 615 | '/html', |
616 | 616 | '/app', |
@@ -623,7 +623,7 @@ discard block |
||
623 | 623 | ); |
624 | 624 | |
625 | 625 | foreach ($dirs as $dir) { |
626 | - if (!is_writable($base . $dir)) { |
|
626 | + if (!is_writable($base.$dir)) { |
|
627 | 627 | $protectedDirs[] = $dir; |
628 | 628 | } |
629 | 629 | } |
@@ -634,7 +634,7 @@ discard block |
||
634 | 634 | private function createConfigYamlFile($data, $auth = true) |
635 | 635 | { |
636 | 636 | $fs = new Filesystem(); |
637 | - $config_file = $this->config_path . '/config.yml'; |
|
637 | + $config_file = $this->config_path.'/config.yml'; |
|
638 | 638 | |
639 | 639 | if ($fs->exists($config_file)) { |
640 | 640 | $config = Yaml::parse(file_get_contents($config_file)); |
@@ -665,7 +665,7 @@ discard block |
||
665 | 665 | $content = str_replace( |
666 | 666 | $target, |
667 | 667 | $replace, |
668 | - file_get_contents($this->dist_path . '/config.yml.dist') |
|
668 | + file_get_contents($this->dist_path.'/config.yml.dist') |
|
669 | 669 | ); |
670 | 670 | $fs->dumpFile($config_file, $content); |
671 | 671 | |
@@ -679,7 +679,7 @@ discard block |
||
679 | 679 | |
680 | 680 | private function addInstallStatus() |
681 | 681 | { |
682 | - $config_file = $this->config_path . '/config.yml'; |
|
682 | + $config_file = $this->config_path.'/config.yml'; |
|
683 | 683 | $config = Yaml::parse(file_get_contents($config_file)); |
684 | 684 | $config['eccube_install'] = 1; |
685 | 685 | $yml = Yaml::dump($config); |
@@ -691,7 +691,7 @@ discard block |
||
691 | 691 | private function createDatabaseYamlFile($data) |
692 | 692 | { |
693 | 693 | $fs = new Filesystem(); |
694 | - $config_file = $this->config_path . '/database.yml'; |
|
694 | + $config_file = $this->config_path.'/database.yml'; |
|
695 | 695 | if ($fs->exists($config_file)) { |
696 | 696 | $fs->remove($config_file); |
697 | 697 | } |
@@ -725,7 +725,7 @@ discard block |
||
725 | 725 | $content = str_replace( |
726 | 726 | $target, |
727 | 727 | $replace, |
728 | - file_get_contents($this->dist_path . '/database.yml.dist') |
|
728 | + file_get_contents($this->dist_path.'/database.yml.dist') |
|
729 | 729 | ); |
730 | 730 | |
731 | 731 | } else { |
@@ -733,7 +733,7 @@ discard block |
||
733 | 733 | array( |
734 | 734 | 'database' => array( |
735 | 735 | 'driver' => 'pdo_sqlite', |
736 | - 'path' => realpath($this->config_path . '/eccube.db') |
|
736 | + 'path' => realpath($this->config_path.'/eccube.db') |
|
737 | 737 | ) |
738 | 738 | ) |
739 | 739 | ); |
@@ -746,7 +746,7 @@ discard block |
||
746 | 746 | private function createMailYamlFile($data) |
747 | 747 | { |
748 | 748 | $fs = new Filesystem(); |
749 | - $config_file = $this->config_path . '/mail.yml'; |
|
749 | + $config_file = $this->config_path.'/mail.yml'; |
|
750 | 750 | if ($fs->exists($config_file)) { |
751 | 751 | $fs->remove($config_file); |
752 | 752 | } |
@@ -763,7 +763,7 @@ discard block |
||
763 | 763 | $content = str_replace( |
764 | 764 | $target, |
765 | 765 | $replace, |
766 | - file_get_contents($this->dist_path . '/mail.yml.dist') |
|
766 | + file_get_contents($this->dist_path.'/mail.yml.dist') |
|
767 | 767 | ); |
768 | 768 | $fs->dumpFile($config_file, $content); |
769 | 769 | |
@@ -773,7 +773,7 @@ discard block |
||
773 | 773 | private function createPathYamlFile($data, Request $request) |
774 | 774 | { |
775 | 775 | $fs = new Filesystem(); |
776 | - $config_file = $this->config_path . '/path.yml'; |
|
776 | + $config_file = $this->config_path.'/path.yml'; |
|
777 | 777 | if ($fs->exists($config_file)) { |
778 | 778 | $fs->remove($config_file); |
779 | 779 | } |
@@ -781,7 +781,7 @@ discard block |
||
781 | 781 | $ADMIN_ROUTE = $data['admin_dir']; |
782 | 782 | $TEMPLATE_CODE = 'default'; |
783 | 783 | $USER_DATA_ROUTE = 'user_data'; |
784 | - $ROOT_DIR = realpath(__DIR__ . '/../../../../'); |
|
784 | + $ROOT_DIR = realpath(__DIR__.'/../../../../'); |
|
785 | 785 | $ROOT_URLPATH = $request->getBasePath(); |
786 | 786 | |
787 | 787 | $target = array('${ADMIN_ROUTE}', '${TEMPLATE_CODE}', '${USER_DATA_ROUTE}', '${ROOT_DIR}', '${ROOT_URLPATH}'); |
@@ -791,7 +791,7 @@ discard block |
||
791 | 791 | $content = str_replace( |
792 | 792 | $target, |
793 | 793 | $replace, |
794 | - file_get_contents($this->dist_path . '/path.yml.dist') |
|
794 | + file_get_contents($this->dist_path.'/path.yml.dist') |
|
795 | 795 | ); |
796 | 796 | $fs->dumpFile($config_file, $content); |
797 | 797 | |
@@ -800,7 +800,7 @@ discard block |
||
800 | 800 | |
801 | 801 | private function sendAppData($params) |
802 | 802 | { |
803 | - $config_file = $this->config_path . '/database.yml'; |
|
803 | + $config_file = $this->config_path.'/database.yml'; |
|
804 | 804 | $db_config = Yaml::parse(file_get_contents($config_file)); |
805 | 805 | |
806 | 806 | $this->setPDO(); |
@@ -812,7 +812,7 @@ discard block |
||
812 | 812 | } |
813 | 813 | |
814 | 814 | if ($db_config['database']['driver'] === 'pdo_mysql') { |
815 | - $db_ver = 'MySQL:' . $version; |
|
815 | + $db_ver = 'MySQL:'.$version; |
|
816 | 816 | } else { |
817 | 817 | $db_ver = $version; |
818 | 818 | } |
@@ -830,7 +830,7 @@ discard block |
||
830 | 830 | |
831 | 831 | $header = array( |
832 | 832 | 'Content-Type: application/x-www-form-urlencoded', |
833 | - 'Content-Length: ' . strlen($data), |
|
833 | + 'Content-Length: '.strlen($data), |
|
834 | 834 | ); |
835 | 835 | $context = stream_context_create( |
836 | 836 | array( |