@@ -642,7 +642,7 @@ |
||
| 642 | 642 | * |
| 643 | 643 | * @param Request $request |
| 644 | 644 | * @param $authKey |
| 645 | - * @param $url |
|
| 645 | + * @param string $url |
|
| 646 | 646 | * @return array |
| 647 | 647 | */ |
| 648 | 648 | private function getRequestApi(Request $request, $authKey, $url) |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | foreach ($Plugins as $Plugin) { |
| 59 | 59 | |
| 60 | 60 | $form = $app['form.factory'] |
| 61 | - ->createNamedBuilder('form' . $Plugin->getId(), 'plugin_management', null, array( |
|
| 61 | + ->createNamedBuilder('form'.$Plugin->getId(), 'plugin_management', null, array( |
|
| 62 | 62 | 'plugin_id' => $Plugin->getId(), |
| 63 | 63 | )) |
| 64 | 64 | ->getForm(); |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | |
| 68 | 68 | try { |
| 69 | 69 | // プラグイン用設定画面があれば表示(プラグイン用のサービスプロバイダーに定義されているか) |
| 70 | - $configPages[$Plugin->getCode()] = $app->url('plugin_' . $Plugin->getCode() . '_config'); |
|
| 70 | + $configPages[$Plugin->getCode()] = $app->url('plugin_'.$Plugin->getCode().'_config'); |
|
| 71 | 71 | } catch (\Exception $e) { |
| 72 | 72 | // プラグインで設定画面のルートが定義されていない場合は無視 |
| 73 | 73 | } |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | if (!is_null($authKey)) { |
| 90 | 90 | |
| 91 | 91 | // オーナーズストア通信 |
| 92 | - $url = $app['config']['owners_store_url'] . '?method=list'; |
|
| 92 | + $url = $app['config']['owners_store_url'].'?method=list'; |
|
| 93 | 93 | list($json, $httpHeader) = $this->getRequestApi($request, $authKey, $url); |
| 94 | 94 | |
| 95 | 95 | if ($json) { |
@@ -150,7 +150,7 @@ discard block |
||
| 150 | 150 | $Plugin = $app['eccube.repository.plugin']->find($id); |
| 151 | 151 | |
| 152 | 152 | $form = $app['form.factory'] |
| 153 | - ->createNamedBuilder('form' . $id, 'plugin_management', null, array( |
|
| 153 | + ->createNamedBuilder('form'.$id, 'plugin_management', null, array( |
|
| 154 | 154 | 'plugin_id' => null, // placeHolder |
| 155 | 155 | )) |
| 156 | 156 | ->getForm(); |
@@ -168,10 +168,10 @@ discard block |
||
| 168 | 168 | $formFile = $form['plugin_archive']->getData(); |
| 169 | 169 | |
| 170 | 170 | $tmpDir = $app['eccube.service.plugin']->createTempDir(); |
| 171 | - $tmpFile = sha1(Str::random(32)) . '.' . $formFile->getClientOriginalExtension(); |
|
| 171 | + $tmpFile = sha1(Str::random(32)).'.'.$formFile->getClientOriginalExtension(); |
|
| 172 | 172 | |
| 173 | 173 | $formFile->move($tmpDir, $tmpFile); |
| 174 | - $app['eccube.service.plugin']->update($Plugin, $tmpDir . '/' . $tmpFile); |
|
| 174 | + $app['eccube.service.plugin']->update($Plugin, $tmpDir.'/'.$tmpFile); |
|
| 175 | 175 | |
| 176 | 176 | $fs = new Filesystem(); |
| 177 | 177 | $fs->remove($tmpDir); |
@@ -340,11 +340,11 @@ discard block |
||
| 340 | 340 | $formFile = $form['plugin_archive']->getData(); |
| 341 | 341 | |
| 342 | 342 | $tmpDir = $service->createTempDir(); |
| 343 | - $tmpFile = sha1(Str::random(32)) . '.' . $formFile->getClientOriginalExtension(); // 拡張子を付けないとpharが動かないので付ける |
|
| 343 | + $tmpFile = sha1(Str::random(32)).'.'.$formFile->getClientOriginalExtension(); // 拡張子を付けないとpharが動かないので付ける |
|
| 344 | 344 | |
| 345 | 345 | $formFile->move($tmpDir, $tmpFile); |
| 346 | 346 | |
| 347 | - $service->install($tmpDir . '/' . $tmpFile); |
|
| 347 | + $service->install($tmpDir.'/'.$tmpFile); |
|
| 348 | 348 | |
| 349 | 349 | $fs = new Filesystem(); |
| 350 | 350 | $fs->remove($tmpDir); |
@@ -391,7 +391,7 @@ discard block |
||
| 391 | 391 | if (!is_null($authKey)) { |
| 392 | 392 | |
| 393 | 393 | // オーナーズストア通信 |
| 394 | - $url = $app['config']['owners_store_url'] . '?method=list'; |
|
| 394 | + $url = $app['config']['owners_store_url'].'?method=list'; |
|
| 395 | 395 | list($json, $httpHeader) = $this->getRequestApi($request, $authKey, $url); |
| 396 | 396 | |
| 397 | 397 | if ($json === false) { |
@@ -465,7 +465,7 @@ discard block |
||
| 465 | 465 | } |
| 466 | 466 | |
| 467 | 467 | } else { |
| 468 | - $message = $data['error_code'] . ' : ' . $data['error_message']; |
|
| 468 | + $message = $data['error_code'].' : '.$data['error_message']; |
|
| 469 | 469 | } |
| 470 | 470 | } else { |
| 471 | 471 | $success = 0; |
@@ -507,7 +507,7 @@ discard block |
||
| 507 | 507 | if (!is_null($authKey)) { |
| 508 | 508 | |
| 509 | 509 | // オーナーズストア通信 |
| 510 | - $url = $app['config']['owners_store_url'] . '?method=download&product_id=' . $id; |
|
| 510 | + $url = $app['config']['owners_store_url'].'?method=download&product_id='.$id; |
|
| 511 | 511 | list($json, $httpHeader) = $this->getRequestApi($request, $authKey, $url); |
| 512 | 512 | |
| 513 | 513 | if ($json === false) { |
@@ -532,22 +532,22 @@ discard block |
||
| 532 | 532 | $extension = pathinfo($item['file_name'], PATHINFO_EXTENSION); |
| 533 | 533 | |
| 534 | 534 | $tmpDir = $service->createTempDir(); |
| 535 | - $tmpFile = sha1(Str::random(32)) . '.' . $extension; |
|
| 535 | + $tmpFile = sha1(Str::random(32)).'.'.$extension; |
|
| 536 | 536 | |
| 537 | 537 | // ファイル作成 |
| 538 | 538 | $fs = new Filesystem(); |
| 539 | - $fs->dumpFile($tmpDir . '/' . $tmpFile, $file); |
|
| 539 | + $fs->dumpFile($tmpDir.'/'.$tmpFile, $file); |
|
| 540 | 540 | |
| 541 | 541 | if ($action == 'install') { |
| 542 | 542 | |
| 543 | - $service->install($tmpDir . '/' . $tmpFile, $id); |
|
| 543 | + $service->install($tmpDir.'/'.$tmpFile, $id); |
|
| 544 | 544 | $app->addSuccess('admin.plugin.install.complete', 'admin'); |
| 545 | 545 | |
| 546 | 546 | } else if ($action == 'update') { |
| 547 | 547 | |
| 548 | 548 | $Plugin = $app['eccube.repository.plugin']->findOneBy(array('source' => $id)); |
| 549 | 549 | |
| 550 | - $service->update($Plugin, $tmpDir . '/' . $tmpFile); |
|
| 550 | + $service->update($Plugin, $tmpDir.'/'.$tmpFile); |
|
| 551 | 551 | $app->addSuccess('admin.plugin.update.complete', 'admin'); |
| 552 | 552 | |
| 553 | 553 | Cache::clear($app, false); |
@@ -558,7 +558,7 @@ discard block |
||
| 558 | 558 | $fs->remove($tmpDir); |
| 559 | 559 | |
| 560 | 560 | // ダウンロード完了通知処理(正常終了時) |
| 561 | - $url = $app['config']['owners_store_url'] . '?method=commit&product_id=' . $id . '&status=1&version=' . $version; |
|
| 561 | + $url = $app['config']['owners_store_url'].'?method=commit&product_id='.$id.'&status=1&version='.$version; |
|
| 562 | 562 | $this->getRequestApi($request, $authKey, $url); |
| 563 | 563 | |
| 564 | 564 | return $app->redirect($app->url('admin_store_plugin')); |
@@ -572,7 +572,7 @@ discard block |
||
| 572 | 572 | } |
| 573 | 573 | |
| 574 | 574 | } else { |
| 575 | - $message = $data['error_code'] . ' : ' . $data['error_message']; |
|
| 575 | + $message = $data['error_code'].' : '.$data['error_message']; |
|
| 576 | 576 | } |
| 577 | 577 | } else { |
| 578 | 578 | $message = "EC-CUBEオーナーズストアにエラーが発生しています。"; |
@@ -581,7 +581,7 @@ discard block |
||
| 581 | 581 | } |
| 582 | 582 | |
| 583 | 583 | // ダウンロード完了通知処理(エラー発生時) |
| 584 | - $url = $app['config']['owners_store_url'] . '?method=commit&product_id=' . $id . '&status=0&version=' . $version . '&message=' . urlencode($message); |
|
| 584 | + $url = $app['config']['owners_store_url'].'?method=commit&product_id='.$id.'&status=0&version='.$version.'&message='.urlencode($message); |
|
| 585 | 585 | $this->getRequestApi($request, $authKey, $url); |
| 586 | 586 | |
| 587 | 587 | $app->addError($message, 'admin'); |
@@ -653,9 +653,9 @@ discard block |
||
| 653 | 653 | 'ignore_errors' => false, |
| 654 | 654 | 'timeout' => 60, |
| 655 | 655 | 'header' => array( |
| 656 | - 'Authorization: ' . base64_encode($authKey), |
|
| 657 | - 'x-eccube-store-url: ' . base64_encode($request->getSchemeAndHttpHost() . $request->getBasePath()), |
|
| 658 | - 'x-eccube-store-version: ' . base64_encode(Constant::VERSION) |
|
| 656 | + 'Authorization: '.base64_encode($authKey), |
|
| 657 | + 'x-eccube-store-url: '.base64_encode($request->getSchemeAndHttpHost().$request->getBasePath()), |
|
| 658 | + 'x-eccube-store-version: '.base64_encode(Constant::VERSION) |
|
| 659 | 659 | ) |
| 660 | 660 | ) |
| 661 | 661 | ); |
@@ -680,10 +680,10 @@ discard block |
||
| 680 | 680 | |
| 681 | 681 | switch ($statusCode) { |
| 682 | 682 | case '404': |
| 683 | - $message = $statusCode . ' : ' . $message; |
|
| 683 | + $message = $statusCode.' : '.$message; |
|
| 684 | 684 | break; |
| 685 | 685 | case '500': |
| 686 | - $message = $statusCode . ' : ' . $message; |
|
| 686 | + $message = $statusCode.' : '.$message; |
|
| 687 | 687 | break; |
| 688 | 688 | default: |
| 689 | 689 | $message = "EC-CUBEオーナーズストアにエラーが発生しています。"; |
@@ -28,7 +28,6 @@ |
||
| 28 | 28 | use Eccube\Entity\Master\DeviceType; |
| 29 | 29 | use Eccube\Util\Str; |
| 30 | 30 | use Symfony\Component\Filesystem\Filesystem; |
| 31 | -use Symfony\Component\Finder\Finder; |
|
| 32 | 31 | use Symfony\Component\Form\FormError; |
| 33 | 32 | use Symfony\Component\HttpFoundation\Request; |
| 34 | 33 | use Symfony\Component\HttpFoundation\Response; |
@@ -65,15 +65,15 @@ discard block |
||
| 65 | 65 | ->find($form['selected']->getData()); |
| 66 | 66 | |
| 67 | 67 | // path.ymlの再構築 |
| 68 | - $file = $app['config']['root_dir'] . '/app/config/eccube/path.yml'; |
|
| 68 | + $file = $app['config']['root_dir'].'/app/config/eccube/path.yml'; |
|
| 69 | 69 | $config = Yaml::parse($file); |
| 70 | 70 | |
| 71 | 71 | $templateCode = $Template->getCode(); |
| 72 | 72 | $config['template_code'] = $templateCode; |
| 73 | - $config['template_realdir'] = $config['root_dir'] . '/app/template/' . $templateCode; |
|
| 74 | - $config['template_html_realdir'] = $config['root_dir'] . '/html/template/' . $templateCode; |
|
| 75 | - $config['front_urlpath'] = $config['root_urlpath'] . '/template/' . $templateCode; |
|
| 76 | - $config['block_realdir'] =$config['template_realdir'] . '/Block'; |
|
| 73 | + $config['template_realdir'] = $config['root_dir'].'/app/template/'.$templateCode; |
|
| 74 | + $config['template_html_realdir'] = $config['root_dir'].'/html/template/'.$templateCode; |
|
| 75 | + $config['front_urlpath'] = $config['root_urlpath'].'/template/'.$templateCode; |
|
| 76 | + $config['block_realdir'] = $config['template_realdir'].'/Block'; |
|
| 77 | 77 | |
| 78 | 78 | file_put_contents($file, Yaml::dump($config)); |
| 79 | 79 | |
@@ -108,19 +108,19 @@ discard block |
||
| 108 | 108 | // 該当テンプレートのディレクトリ |
| 109 | 109 | $config = $app['config']; |
| 110 | 110 | $templateCode = $Template->getCode(); |
| 111 | - $targetRealDir = $config['root_dir'] . '/app/template/' . $templateCode; |
|
| 112 | - $targetHtmlRealDir = $config['root_dir'] . '/html/template/' . $templateCode; |
|
| 111 | + $targetRealDir = $config['root_dir'].'/app/template/'.$templateCode; |
|
| 112 | + $targetHtmlRealDir = $config['root_dir'].'/html/template/'.$templateCode; |
|
| 113 | 113 | |
| 114 | 114 | // 一時ディレクトリ |
| 115 | 115 | $uniqId = sha1(Str::random(32)); |
| 116 | - $tmpDir = $config['template_temp_realdir'] . '/' . $uniqId; |
|
| 117 | - $appDir = $tmpDir . '/app'; |
|
| 118 | - $htmlDir = $tmpDir . '/html'; |
|
| 116 | + $tmpDir = $config['template_temp_realdir'].'/'.$uniqId; |
|
| 117 | + $appDir = $tmpDir.'/app'; |
|
| 118 | + $htmlDir = $tmpDir.'/html'; |
|
| 119 | 119 | |
| 120 | 120 | // ファイル名 |
| 121 | - $tarFile = $config['template_temp_realdir'] . '/' . $uniqId . '.tar'; |
|
| 122 | - $tarGzFile = $tarFile . '.gz'; |
|
| 123 | - $downloadFileName = $Template->getCode() . '.tar.gz'; |
|
| 121 | + $tarFile = $config['template_temp_realdir'].'/'.$uniqId.'.tar'; |
|
| 122 | + $tarGzFile = $tarFile.'.gz'; |
|
| 123 | + $downloadFileName = $Template->getCode().'.tar.gz'; |
|
| 124 | 124 | |
| 125 | 125 | // 該当テンプレートを一時ディレクトリへコピーする. |
| 126 | 126 | $fs = new Filesystem(); |
@@ -140,14 +140,14 @@ discard block |
||
| 140 | 140 | |
| 141 | 141 | // ダウンロード完了後にファイルを削除する. |
| 142 | 142 | // http://stackoverflow.com/questions/15238897/removing-file-after-delivering-response-with-silex-symfony |
| 143 | - $app->finish(function (Request $request, Response $response, \Silex\Application $app) use ( |
|
| 143 | + $app->finish(function(Request $request, Response $response, \Silex\Application $app) use ( |
|
| 144 | 144 | $tmpDir, |
| 145 | 145 | $tarFile, |
| 146 | 146 | $tarGzFile |
| 147 | 147 | ) { |
| 148 | - $app['monolog']->addDebug('remove temp file: ' . $tmpDir); |
|
| 149 | - $app['monolog']->addDebug('remove temp file: ' . $tarFile); |
|
| 150 | - $app['monolog']->addDebug('remove temp file: ' . $tarGzFile); |
|
| 148 | + $app['monolog']->addDebug('remove temp file: '.$tmpDir); |
|
| 149 | + $app['monolog']->addDebug('remove temp file: '.$tarFile); |
|
| 150 | + $app['monolog']->addDebug('remove temp file: '.$tarGzFile); |
|
| 151 | 151 | $fs = new Filesystem(); |
| 152 | 152 | $fs->remove($tmpDir); |
| 153 | 153 | $fs->remove($tarFile); |
@@ -188,8 +188,8 @@ discard block |
||
| 188 | 188 | // テンプレートディレクトリの削除 |
| 189 | 189 | $config = $app['config']; |
| 190 | 190 | $templateCode = $Template->getCode(); |
| 191 | - $targetRealDir = $config['root_dir'] . '/app/template/' . $templateCode; |
|
| 192 | - $targetHtmlRealDir = $config['root_dir'] . '/html/template/' . $templateCode; |
|
| 191 | + $targetRealDir = $config['root_dir'].'/app/template/'.$templateCode; |
|
| 192 | + $targetHtmlRealDir = $config['root_dir'].'/html/template/'.$templateCode; |
|
| 193 | 193 | |
| 194 | 194 | $fs = new Filesystem(); |
| 195 | 195 | $fs->remove($targetRealDir); |
@@ -232,18 +232,18 @@ discard block |
||
| 232 | 232 | // 該当テンプレートのディレクトリ |
| 233 | 233 | $config = $app['config']; |
| 234 | 234 | $templateCode = $Template->getCode(); |
| 235 | - $targetRealDir = $config['root_dir'] . '/app/template/' . $templateCode; |
|
| 236 | - $targetHtmlRealDir = $config['root_dir'] . '/html/template/' . $templateCode; |
|
| 235 | + $targetRealDir = $config['root_dir'].'/app/template/'.$templateCode; |
|
| 236 | + $targetHtmlRealDir = $config['root_dir'].'/html/template/'.$templateCode; |
|
| 237 | 237 | |
| 238 | 238 | // 一時ディレクトリ |
| 239 | 239 | $uniqId = sha1(Str::random(32)); |
| 240 | - $tmpDir = $config['template_temp_realdir'] . '/' . $uniqId; |
|
| 241 | - $appDir = $tmpDir . '/app'; |
|
| 242 | - $htmlDir = $tmpDir . '/html'; |
|
| 240 | + $tmpDir = $config['template_temp_realdir'].'/'.$uniqId; |
|
| 241 | + $appDir = $tmpDir.'/app'; |
|
| 242 | + $htmlDir = $tmpDir.'/html'; |
|
| 243 | 243 | |
| 244 | 244 | $formFile = $form['file']->getData(); |
| 245 | 245 | // ファイル名 |
| 246 | - $archive = $templateCode . '.' . $formFile->getClientOriginalExtension(); |
|
| 246 | + $archive = $templateCode.'.'.$formFile->getClientOriginalExtension(); |
|
| 247 | 247 | |
| 248 | 248 | // ファイルを一時ディレクトリへ移動. |
| 249 | 249 | $formFile->move($tmpDir, $archive); |
@@ -252,11 +252,11 @@ discard block |
||
| 252 | 252 | try { |
| 253 | 253 | if ($formFile->getClientOriginalExtension() == 'zip') { |
| 254 | 254 | $zip = new \ZipArchive(); |
| 255 | - $zip->open($tmpDir . '/' . $archive); |
|
| 255 | + $zip->open($tmpDir.'/'.$archive); |
|
| 256 | 256 | $zip->extractTo($tmpDir); |
| 257 | 257 | $zip->close(); |
| 258 | 258 | } else { |
| 259 | - $phar = new \PharData($tmpDir . '/' . $archive); |
|
| 259 | + $phar = new \PharData($tmpDir.'/'.$archive); |
|
| 260 | 260 | $phar->extractTo($tmpDir, null, true); |
| 261 | 261 | } |
| 262 | 262 | } catch (\Exception $e) { |
@@ -250,6 +250,9 @@ |
||
| 250 | 250 | } |
| 251 | 251 | |
| 252 | 252 | |
| 253 | + /** |
|
| 254 | + * @param InstallApplication $app |
|
| 255 | + */ |
|
| 253 | 256 | private function checkModules($app) |
| 254 | 257 | { |
| 255 | 258 | foreach ($this->required_modules as $module) { |
@@ -60,9 +60,9 @@ discard block |
||
| 60 | 60 | |
| 61 | 61 | public function __construct() |
| 62 | 62 | { |
| 63 | - $this->config_path = __DIR__ . '/../../../../app/config/eccube'; |
|
| 64 | - $this->dist_path = __DIR__ . '/../../Resource/config'; |
|
| 65 | - $this->cache_path = __DIR__ . '/../../../../app/cache'; |
|
| 63 | + $this->config_path = __DIR__.'/../../../../app/config/eccube'; |
|
| 64 | + $this->dist_path = __DIR__.'/../../Resource/config'; |
|
| 65 | + $this->cache_path = __DIR__.'/../../../../app/cache'; |
|
| 66 | 66 | } |
| 67 | 67 | |
| 68 | 68 | private function isValid(Request $request, Form $form) |
@@ -207,7 +207,7 @@ discard block |
||
| 207 | 207 | $host = $request->getSchemeAndHttpHost(); |
| 208 | 208 | $basePath = $request->getBasePath(); |
| 209 | 209 | $params = array( |
| 210 | - 'http_url' => $host . $basePath, |
|
| 210 | + 'http_url' => $host.$basePath, |
|
| 211 | 211 | 'shop_name' => $sessionData['shop_name'], |
| 212 | 212 | ); |
| 213 | 213 | |
@@ -228,13 +228,13 @@ discard block |
||
| 228 | 228 | // インストール完了 |
| 229 | 229 | public function complete(InstallApplication $app, Request $request) |
| 230 | 230 | { |
| 231 | - $config_file = $this->config_path . '/path.yml'; |
|
| 231 | + $config_file = $this->config_path.'/path.yml'; |
|
| 232 | 232 | $config = Yaml::parse($config_file); |
| 233 | 233 | |
| 234 | 234 | $host = $request->getSchemeAndHttpHost(); |
| 235 | 235 | $basePath = $request->getBasePath(); |
| 236 | 236 | |
| 237 | - $adminUrl = $host . $basePath . '/' . $config['admin_dir']; |
|
| 237 | + $adminUrl = $host.$basePath.'/'.$config['admin_dir']; |
|
| 238 | 238 | |
| 239 | 239 | return $app['twig']->render('complete.twig', array( |
| 240 | 240 | 'admin_url' => $adminUrl, |
@@ -254,17 +254,17 @@ discard block |
||
| 254 | 254 | { |
| 255 | 255 | foreach ($this->required_modules as $module) { |
| 256 | 256 | if (!extension_loaded($module)) { |
| 257 | - $app->addDanger('[必須] ' . $module . ' 拡張モジュールが有効になっていません。', 'install'); |
|
| 257 | + $app->addDanger('[必須] '.$module.' 拡張モジュールが有効になっていません。', 'install'); |
|
| 258 | 258 | } |
| 259 | 259 | } |
| 260 | 260 | |
| 261 | 261 | if (!extension_loaded('pdo_mysql') && !extension_loaded('pdo_pgsql')) { |
| 262 | - $app->addDanger('[必須] ' . 'pdo_pgsql又はpdo_mysql 拡張モジュールを有効にしてください。', 'install'); |
|
| 262 | + $app->addDanger('[必須] '.'pdo_pgsql又はpdo_mysql 拡張モジュールを有効にしてください。', 'install'); |
|
| 263 | 263 | } |
| 264 | 264 | |
| 265 | 265 | foreach ($this->recommended_module as $module) { |
| 266 | 266 | if (!extension_loaded($module)) { |
| 267 | - $app->addWarning('[推奨] ' . $module . ' 拡張モジュールが有効になっていません。', 'install'); |
|
| 267 | + $app->addWarning('[推奨] '.$module.' 拡張モジュールが有効になっていません。', 'install'); |
|
| 268 | 268 | } |
| 269 | 269 | } |
| 270 | 270 | |
@@ -282,7 +282,7 @@ discard block |
||
| 282 | 282 | if (!function_exists('apache_get_modules')) { |
| 283 | 283 | $app->addWarning('mod_rewrite が有効になっているか不明です。', 'install'); |
| 284 | 284 | } elseif (!in_array('mod_rewrite', apache_get_modules())) { |
| 285 | - $app->addDanger('[必須] ' . 'mod_rewriteを有効にしてください。', 'install'); |
|
| 285 | + $app->addDanger('[必須] '.'mod_rewriteを有効にしてください。', 'install'); |
|
| 286 | 286 | } |
| 287 | 287 | } elseif (isset($_SERVER['SERVER_SOFTWARE']) && strpos('Microsoft-IIS', $_SERVER['SERVER_SOFTWARE']) !== false) { |
| 288 | 288 | // iis |
@@ -293,7 +293,7 @@ discard block |
||
| 293 | 293 | |
| 294 | 294 | private function setPDO() |
| 295 | 295 | { |
| 296 | - $config_file = $this->config_path . '/database.yml'; |
|
| 296 | + $config_file = $this->config_path.'/database.yml'; |
|
| 297 | 297 | $config = Yaml::parse($config_file); |
| 298 | 298 | |
| 299 | 299 | try { |
@@ -328,7 +328,7 @@ discard block |
||
| 328 | 328 | */ |
| 329 | 329 | private function getEntityManager() |
| 330 | 330 | { |
| 331 | - $config_file = $this->config_path . '/database.yml'; |
|
| 331 | + $config_file = $this->config_path.'/database.yml'; |
|
| 332 | 332 | $database = Yaml::parse($config_file); |
| 333 | 333 | |
| 334 | 334 | $this->app->register(new \Silex\Provider\DoctrineServiceProvider(), array( |
@@ -336,15 +336,15 @@ discard block |
||
| 336 | 336 | )); |
| 337 | 337 | |
| 338 | 338 | $this->app->register(new \Dflydev\Silex\Provider\DoctrineOrm\DoctrineOrmServiceProvider(), array( |
| 339 | - 'orm.proxies_dir' => __DIR__ . '/../../app/cache/doctrine', |
|
| 339 | + 'orm.proxies_dir' => __DIR__.'/../../app/cache/doctrine', |
|
| 340 | 340 | 'orm.em.options' => array( |
| 341 | 341 | 'mappings' => array( |
| 342 | 342 | array( |
| 343 | 343 | 'type' => 'yml', |
| 344 | 344 | 'namespace' => 'Eccube\Entity', |
| 345 | 345 | 'path' => array( |
| 346 | - __DIR__ . '/../../Resource/doctrine', |
|
| 347 | - __DIR__ . '/../../Resource/doctrine/master', |
|
| 346 | + __DIR__.'/../../Resource/doctrine', |
|
| 347 | + __DIR__.'/../../Resource/doctrine/master', |
|
| 348 | 348 | ), |
| 349 | 349 | ), |
| 350 | 350 | |
@@ -372,11 +372,11 @@ discard block |
||
| 372 | 372 | { |
| 373 | 373 | $this->resetNatTimer(); |
| 374 | 374 | |
| 375 | - $config_file = $this->config_path . '/database.yml'; |
|
| 375 | + $config_file = $this->config_path.'/database.yml'; |
|
| 376 | 376 | $database = Yaml::parse($config_file); |
| 377 | 377 | $config['database'] = $database['database']; |
| 378 | 378 | |
| 379 | - $config_file = $this->config_path . '/config.yml'; |
|
| 379 | + $config_file = $this->config_path.'/config.yml'; |
|
| 380 | 380 | $baseConfig = Yaml::parse($config_file); |
| 381 | 381 | $config['config'] = $baseConfig; |
| 382 | 382 | |
@@ -435,7 +435,7 @@ discard block |
||
| 435 | 435 | $config = new Configuration($app['db']); |
| 436 | 436 | $config->setMigrationsNamespace('DoctrineMigrations'); |
| 437 | 437 | |
| 438 | - $migrationDir = __DIR__ . '/../../Resource/doctrine/migration'; |
|
| 438 | + $migrationDir = __DIR__.'/../../Resource/doctrine/migration'; |
|
| 439 | 439 | $config->setMigrationsDirectory($migrationDir); |
| 440 | 440 | $config->registerMigrationsFromDirectory($migrationDir); |
| 441 | 441 | |
@@ -459,7 +459,7 @@ discard block |
||
| 459 | 459 | private function getProtectedDirs() |
| 460 | 460 | { |
| 461 | 461 | $protectedDirs = array(); |
| 462 | - $base = __DIR__ . '/../../../..'; |
|
| 462 | + $base = __DIR__.'/../../../..'; |
|
| 463 | 463 | $dirs = array( |
| 464 | 464 | '/html', |
| 465 | 465 | '/app', |
@@ -472,7 +472,7 @@ discard block |
||
| 472 | 472 | ); |
| 473 | 473 | |
| 474 | 474 | foreach ($dirs as $dir) { |
| 475 | - if (!is_writable($base . $dir)) { |
|
| 475 | + if (!is_writable($base.$dir)) { |
|
| 476 | 476 | $protectedDirs[] = $dir; |
| 477 | 477 | } |
| 478 | 478 | } |
@@ -483,7 +483,7 @@ discard block |
||
| 483 | 483 | private function createConfigYamlFile($data) |
| 484 | 484 | { |
| 485 | 485 | $fs = new Filesystem(); |
| 486 | - $config_file = $this->config_path . '/config.yml'; |
|
| 486 | + $config_file = $this->config_path.'/config.yml'; |
|
| 487 | 487 | if ($fs->exists($config_file)) { |
| 488 | 488 | $fs->remove($config_file); |
| 489 | 489 | } |
@@ -503,7 +503,7 @@ discard block |
||
| 503 | 503 | $content = str_replace( |
| 504 | 504 | $target, |
| 505 | 505 | $replace, |
| 506 | - file_get_contents($this->dist_path . '/config.yml.dist') |
|
| 506 | + file_get_contents($this->dist_path.'/config.yml.dist') |
|
| 507 | 507 | ); |
| 508 | 508 | $fs->dumpFile($config_file, $content); |
| 509 | 509 | |
@@ -517,7 +517,7 @@ discard block |
||
| 517 | 517 | |
| 518 | 518 | private function addInstallStatus() |
| 519 | 519 | { |
| 520 | - $config_file = $this->config_path . '/config.yml'; |
|
| 520 | + $config_file = $this->config_path.'/config.yml'; |
|
| 521 | 521 | $config = Yaml::parse($config_file); |
| 522 | 522 | $config['eccube_install'] = 1; |
| 523 | 523 | $yml = Yaml::dump($config); |
@@ -529,7 +529,7 @@ discard block |
||
| 529 | 529 | private function createDatabaseYamlFile($data) |
| 530 | 530 | { |
| 531 | 531 | $fs = new Filesystem(); |
| 532 | - $config_file = $this->config_path . '/database.yml'; |
|
| 532 | + $config_file = $this->config_path.'/database.yml'; |
|
| 533 | 533 | if ($fs->exists($config_file)) { |
| 534 | 534 | $fs->remove($config_file); |
| 535 | 535 | } |
@@ -562,7 +562,7 @@ discard block |
||
| 562 | 562 | $content = str_replace( |
| 563 | 563 | $target, |
| 564 | 564 | $replace, |
| 565 | - file_get_contents($this->dist_path . '/database.yml.dist') |
|
| 565 | + file_get_contents($this->dist_path.'/database.yml.dist') |
|
| 566 | 566 | ); |
| 567 | 567 | |
| 568 | 568 | $fs->dumpFile($config_file, $content); |
@@ -573,7 +573,7 @@ discard block |
||
| 573 | 573 | private function createMailYamlFile($data) |
| 574 | 574 | { |
| 575 | 575 | $fs = new Filesystem(); |
| 576 | - $config_file = $this->config_path . '/mail.yml'; |
|
| 576 | + $config_file = $this->config_path.'/mail.yml'; |
|
| 577 | 577 | if ($fs->exists($config_file)) { |
| 578 | 578 | $fs->remove($config_file); |
| 579 | 579 | } |
@@ -590,7 +590,7 @@ discard block |
||
| 590 | 590 | $content = str_replace( |
| 591 | 591 | $target, |
| 592 | 592 | $replace, |
| 593 | - file_get_contents($this->dist_path . '/mail.yml.dist') |
|
| 593 | + file_get_contents($this->dist_path.'/mail.yml.dist') |
|
| 594 | 594 | ); |
| 595 | 595 | $fs->dumpFile($config_file, $content); |
| 596 | 596 | |
@@ -600,7 +600,7 @@ discard block |
||
| 600 | 600 | private function createPathYamlFile($data, Request $request) |
| 601 | 601 | { |
| 602 | 602 | $fs = new Filesystem(); |
| 603 | - $config_file = $this->config_path . '/path.yml'; |
|
| 603 | + $config_file = $this->config_path.'/path.yml'; |
|
| 604 | 604 | if ($fs->exists($config_file)) { |
| 605 | 605 | $fs->remove($config_file); |
| 606 | 606 | } |
@@ -608,7 +608,7 @@ discard block |
||
| 608 | 608 | $ADMIN_ROUTE = $data['admin_dir']; |
| 609 | 609 | $TEMPLATE_CODE = 'default'; |
| 610 | 610 | $USER_DATA_ROUTE = 'user_data'; |
| 611 | - $ROOT_DIR = realpath(__DIR__ . '/../../../../'); |
|
| 611 | + $ROOT_DIR = realpath(__DIR__.'/../../../../'); |
|
| 612 | 612 | $ROOT_URLPATH = $request->getBasePath(); |
| 613 | 613 | |
| 614 | 614 | $target = array('${ADMIN_ROUTE}', '${TEMPLATE_CODE}', '${USER_DATA_ROUTE}', '${ROOT_DIR}', '${ROOT_URLPATH}'); |
@@ -618,7 +618,7 @@ discard block |
||
| 618 | 618 | $content = str_replace( |
| 619 | 619 | $target, |
| 620 | 620 | $replace, |
| 621 | - file_get_contents($this->dist_path . '/path.yml.dist') |
|
| 621 | + file_get_contents($this->dist_path.'/path.yml.dist') |
|
| 622 | 622 | ); |
| 623 | 623 | $fs->dumpFile($config_file, $content); |
| 624 | 624 | |
@@ -627,7 +627,7 @@ discard block |
||
| 627 | 627 | |
| 628 | 628 | private function sendAppData($params) |
| 629 | 629 | { |
| 630 | - $config_file = $this->config_path . '/database.yml'; |
|
| 630 | + $config_file = $this->config_path.'/database.yml'; |
|
| 631 | 631 | $db_config = Yaml::parse($config_file); |
| 632 | 632 | |
| 633 | 633 | $this->setPDO(); |
@@ -639,7 +639,7 @@ discard block |
||
| 639 | 639 | } |
| 640 | 640 | |
| 641 | 641 | if ($db_config['database']['driver'] === 'pdo_mysql') { |
| 642 | - $db_ver = 'MySQL:' . $version; |
|
| 642 | + $db_ver = 'MySQL:'.$version; |
|
| 643 | 643 | } else { |
| 644 | 644 | $db_ver = $version; |
| 645 | 645 | } |
@@ -657,7 +657,7 @@ discard block |
||
| 657 | 657 | |
| 658 | 658 | $header = array( |
| 659 | 659 | 'Content-Type: application/x-www-form-urlencoded', |
| 660 | - 'Content-Length: ' . strlen($data), |
|
| 660 | + 'Content-Length: '.strlen($data), |
|
| 661 | 661 | ); |
| 662 | 662 | $context = stream_context_create( |
| 663 | 663 | array( |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | * Index |
| 36 | 36 | * |
| 37 | 37 | * @param Application $app |
| 38 | - * @return string |
|
| 38 | + * @return \Symfony\Component\HttpFoundation\Response |
|
| 39 | 39 | */ |
| 40 | 40 | public function index(Application $app, Request $request) |
| 41 | 41 | { |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | * |
| 52 | 52 | * @param Application $app |
| 53 | 53 | * @request Symfony\Component\HttpFoundation\Request $app |
| 54 | - * @return mixed |
|
| 54 | + * @return \Symfony\Component\HttpFoundation\Response |
|
| 55 | 55 | */ |
| 56 | 56 | public function edit(Application $app, Request $request, $id = null) |
| 57 | 57 | { |
@@ -79,7 +79,7 @@ |
||
| 79 | 79 | |
| 80 | 80 | // 遷移が正しくない場合、デフォルトであるマイページの配送先追加の画面を設定する |
| 81 | 81 | if (!in_array($parentPage, $allowdParents)) { |
| 82 | - $parentPage = $app->url('mypage_delivery'); |
|
| 82 | + $parentPage = $app->url('mypage_delivery'); |
|
| 83 | 83 | } |
| 84 | 84 | |
| 85 | 85 | /* @var $form \Symfony\Component\Form\FormInterface */ |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | * @param Application $app |
| 63 | 63 | * @param Request $request |
| 64 | 64 | * |
| 65 | - * @return string |
|
| 65 | + * @return \Symfony\Component\HttpFoundation\Response |
|
| 66 | 66 | */ |
| 67 | 67 | public function index(Application $app, Request $request) |
| 68 | 68 | { |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | * @param Application $app |
| 90 | 90 | * @param Request $request |
| 91 | 91 | * |
| 92 | - * @return string |
|
| 92 | + * @return \Symfony\Component\HttpFoundation\Response |
|
| 93 | 93 | */ |
| 94 | 94 | public function history(Application $app, Request $request, $id) |
| 95 | 95 | { |
@@ -118,7 +118,7 @@ discard block |
||
| 118 | 118 | * @param Request $request |
| 119 | 119 | * @param id $id |
| 120 | 120 | * |
| 121 | - * @return string |
|
| 121 | + * @return \Symfony\Component\HttpFoundation\RedirectResponse |
|
| 122 | 122 | */ |
| 123 | 123 | public function order(Application $app, Request $request, $id) |
| 124 | 124 | { |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | * @param Application $app |
| 156 | 156 | * @param Request $request |
| 157 | 157 | * |
| 158 | - * @return string |
|
| 158 | + * @return \Symfony\Component\HttpFoundation\Response |
|
| 159 | 159 | */ |
| 160 | 160 | public function favorite(Application $app, Request $request) |
| 161 | 161 | { |
@@ -182,9 +182,8 @@ discard block |
||
| 182 | 182 | |
| 183 | 183 | /** |
| 184 | 184 | * @param Application $app |
| 185 | - * @param Request $request |
|
| 186 | 185 | * |
| 187 | - * @return string |
|
| 186 | + * @return \Symfony\Component\HttpFoundation\RedirectResponse |
|
| 188 | 187 | */ |
| 189 | 188 | public function delete(Application $app, $id) |
| 190 | 189 | { |
@@ -87,7 +87,7 @@ |
||
| 87 | 87 | * Complete |
| 88 | 88 | * |
| 89 | 89 | * @param Application $app |
| 90 | - * @return mixed |
|
| 90 | + * @return \Symfony\Component\HttpFoundation\Response |
|
| 91 | 91 | */ |
| 92 | 92 | public function complete(Application $app, Request $request) |
| 93 | 93 | { |
@@ -62,7 +62,7 @@ |
||
| 62 | 62 | // 会員削除 |
| 63 | 63 | $email = $Customer->getEmail(); |
| 64 | 64 | // メールアドレスにダミーをセット |
| 65 | - $Customer->setEmail(Str::random(60) . '@dummy.dummy'); |
|
| 65 | + $Customer->setEmail(Str::random(60).'@dummy.dummy'); |
|
| 66 | 66 | $Customer->setDelFlg(Constant::ENABLED); |
| 67 | 67 | |
| 68 | 68 | $app['orm.em']->flush(); |
@@ -1188,6 +1188,7 @@ |
||
| 1188 | 1188 | |
| 1189 | 1189 | /** |
| 1190 | 1190 | * 非会員でのお客様情報変更時の入力チェック |
| 1191 | + * @param Application $app |
|
| 1191 | 1192 | */ |
| 1192 | 1193 | private function customerValidation($app, $data) { |
| 1193 | 1194 | |
@@ -221,7 +221,7 @@ discard block |
||
| 221 | 221 | |
| 222 | 222 | $MailHistory = new MailHistory(); |
| 223 | 223 | $MailHistory |
| 224 | - ->setSubject('[' . $app['eccube.repository.base_info']->get()->getShopName() . '] ' . $MailTemplate->getSubject()) |
|
| 224 | + ->setSubject('['.$app['eccube.repository.base_info']->get()->getShopName().'] '.$MailTemplate->getSubject()) |
|
| 225 | 225 | ->setMailBody($body) |
| 226 | 226 | ->setMailTemplate($MailTemplate) |
| 227 | 227 | ->setSendDate(new \DateTime()) |
@@ -493,7 +493,7 @@ discard block |
||
| 493 | 493 | ->setFax03($CustomerAddress->getFax03()) |
| 494 | 494 | ->setZip01($CustomerAddress->getZip01()) |
| 495 | 495 | ->setZip02($CustomerAddress->getZip02()) |
| 496 | - ->setZipCode($CustomerAddress->getZip01() . $CustomerAddress->getZip02()) |
|
| 496 | + ->setZipCode($CustomerAddress->getZip01().$CustomerAddress->getZip02()) |
|
| 497 | 497 | ->setPref($CustomerAddress->getPref()) |
| 498 | 498 | ->setAddr01($CustomerAddress->getAddr01()) |
| 499 | 499 | ->setAddr02($CustomerAddress->getAddr02()); |
@@ -619,7 +619,7 @@ discard block |
||
| 619 | 619 | ->setTel03($data['tel03']) |
| 620 | 620 | ->setZip01($data['zip01']) |
| 621 | 621 | ->setZip02($data['zip02']) |
| 622 | - ->setZipCode($data['zip01'] . $data['zip02']) |
|
| 622 | + ->setZipCode($data['zip01'].$data['zip02']) |
|
| 623 | 623 | ->setPref($data['pref']) |
| 624 | 624 | ->setAddr01($data['addr01']) |
| 625 | 625 | ->setAddr02($data['addr02']) |
@@ -640,7 +640,7 @@ discard block |
||
| 640 | 640 | ->setTel03($data['tel03']) |
| 641 | 641 | ->setZip01($data['zip01']) |
| 642 | 642 | ->setZip02($data['zip02']) |
| 643 | - ->setZipCode($data['zip01'] . $data['zip02']) |
|
| 643 | + ->setZipCode($data['zip01'].$data['zip02']) |
|
| 644 | 644 | ->setPref($data['pref']) |
| 645 | 645 | ->setAddr01($data['addr01']) |
| 646 | 646 | ->setAddr02($data['addr02']); |
@@ -706,7 +706,7 @@ discard block |
||
| 706 | 706 | ->setTel03($data['customer_tel03']) |
| 707 | 707 | ->setZip01($data['customer_zip01']) |
| 708 | 708 | ->setZip02($data['customer_zip02']) |
| 709 | - ->setZipCode($data['customer_zip01'] . $data['customer_zip02']) |
|
| 709 | + ->setZipCode($data['customer_zip01'].$data['customer_zip02']) |
|
| 710 | 710 | ->setPref($pref) |
| 711 | 711 | ->setAddr01($data['customer_addr01']) |
| 712 | 712 | ->setAddr02($data['customer_addr02']) |
@@ -812,7 +812,7 @@ discard block |
||
| 812 | 812 | ->setTel03($data['tel03']) |
| 813 | 813 | ->setZip01($data['zip01']) |
| 814 | 814 | ->setZip02($data['zip02']) |
| 815 | - ->setZipCode($data['zip01'] . $data['zip02']) |
|
| 815 | + ->setZipCode($data['zip01'].$data['zip02']) |
|
| 816 | 816 | ->setPref($data['pref']) |
| 817 | 817 | ->setAddr01($data['addr01']) |
| 818 | 818 | ->setAddr02($data['addr02']); |
@@ -831,7 +831,7 @@ discard block |
||
| 831 | 831 | ->setTel03($data['tel03']) |
| 832 | 832 | ->setZip01($data['zip01']) |
| 833 | 833 | ->setZip02($data['zip02']) |
| 834 | - ->setZipCode($data['zip01'] . $data['zip02']) |
|
| 834 | + ->setZipCode($data['zip01'].$data['zip02']) |
|
| 835 | 835 | ->setPref($data['pref']) |
| 836 | 836 | ->setAddr01($data['addr01']) |
| 837 | 837 | ->setAddr02($data['addr02']) |
@@ -1055,7 +1055,7 @@ discard block |
||
| 1055 | 1055 | ->setFax03($CustomerAddress->getFax03()) |
| 1056 | 1056 | ->setZip01($CustomerAddress->getZip01()) |
| 1057 | 1057 | ->setZip02($CustomerAddress->getZip02()) |
| 1058 | - ->setZipCode($CustomerAddress->getZip01() . $CustomerAddress->getZip02()) |
|
| 1058 | + ->setZipCode($CustomerAddress->getZip01().$CustomerAddress->getZip02()) |
|
| 1059 | 1059 | ->setPref($CustomerAddress->getPref()) |
| 1060 | 1060 | ->setAddr01($CustomerAddress->getAddr01()) |
| 1061 | 1061 | ->setAddr02($CustomerAddress->getAddr02()) |
@@ -1153,7 +1153,7 @@ discard block |
||
| 1153 | 1153 | ->setTel03($data['tel03']) |
| 1154 | 1154 | ->setZip01($data['zip01']) |
| 1155 | 1155 | ->setZip02($data['zip02']) |
| 1156 | - ->setZipCode($data['zip01'] . $data['zip02']) |
|
| 1156 | + ->setZipCode($data['zip01'].$data['zip02']) |
|
| 1157 | 1157 | ->setPref($data['pref']) |
| 1158 | 1158 | ->setAddr01($data['addr01']) |
| 1159 | 1159 | ->setAddr02($data['addr02']) |
@@ -1202,7 +1202,7 @@ discard block |
||
| 1202 | 1202 | |
| 1203 | 1203 | $errors[] = $app['validator']->validateValue($data['customer_name02'], array( |
| 1204 | 1204 | new Assert\NotBlank(), |
| 1205 | - new Assert\Length(array('max' => $app['config']['name_len'], )), |
|
| 1205 | + new Assert\Length(array('max' => $app['config']['name_len'],)), |
|
| 1206 | 1206 | new Assert\Regex(array('pattern' => '/^[^\s ]+$/u', 'message' => 'form.type.name.firstname.nothasspace')) |
| 1207 | 1207 | )); |
| 1208 | 1208 | |
@@ -42,7 +42,7 @@ |
||
| 42 | 42 | |
| 43 | 43 | /** |
| 44 | 44 | * @param ObjectManager $om |
| 45 | - * @param stging $className |
|
| 45 | + * @param string $className |
|
| 46 | 46 | */ |
| 47 | 47 | public function __construct(ObjectManager $om, $className) |
| 48 | 48 | { |
@@ -36,6 +36,9 @@ |
||
| 36 | 36 | { |
| 37 | 37 | protected $app; |
| 38 | 38 | |
| 39 | + /** |
|
| 40 | + * @param \Silex\Application $app |
|
| 41 | + */ |
|
| 39 | 42 | public function __construct($app) |
| 40 | 43 | { |
| 41 | 44 | $this->app = $app; |
@@ -91,7 +91,7 @@ |
||
| 91 | 91 | ))); |
| 92 | 92 | |
| 93 | 93 | $app = $this->app; |
| 94 | - $builder->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) use ($app) { |
|
| 94 | + $builder->addEventListener(FormEvents::PRE_SUBMIT, function(FormEvent $event) use ($app) { |
|
| 95 | 95 | // モーダルからのPOST時に、金額等をセットする. |
| 96 | 96 | if ('modal' === $app['request']->get('modal')) { |
| 97 | 97 | $data = $event->getData(); |