@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | $class2Valied = $this->isValiedCategory($ClassName2); |
| 95 | 95 | |
| 96 | 96 | // 規格が選択されていないか、選択された状態で分類が保有されていれば、画面表示 |
| 97 | - if($class1Valied && $class2Valied){ |
|
| 97 | + if ($class1Valied && $class2Valied) { |
|
| 98 | 98 | $hasClassCategoryFlg = true; |
| 99 | 99 | } |
| 100 | 100 | |
@@ -582,7 +582,7 @@ discard block |
||
| 582 | 582 | // 個別消費税 |
| 583 | 583 | $BaseInfo = $app['eccube.repository.base_info']->get(); |
| 584 | 584 | if ($BaseInfo->getOptionProductTaxRule() == Constant::ENABLED) { |
| 585 | - if($productClassOrig->getTaxRate()) { |
|
| 585 | + if ($productClassOrig->getTaxRate()) { |
|
| 586 | 586 | $productClassDest->setTaxRate($productClassOrig->getTaxRate()); |
| 587 | 587 | if ($productClassDest->getTaxRule() && !$productClassDest->getTaxRule()->getDelFlg()) { |
| 588 | 588 | $productClassDest->getTaxRule()->setTaxRate($productClassOrig->getTaxRate()); |
@@ -151,7 +151,7 @@ discard block |
||
| 151 | 151 | foreach ($images as $img) { |
| 152 | 152 | foreach ($img as $image) { |
| 153 | 153 | $extension = $image->getClientOriginalExtension(); |
| 154 | - $filename = date('mdHis') . uniqid('_') . '.' . $extension; |
|
| 154 | + $filename = date('mdHis').uniqid('_').'.'.$extension; |
|
| 155 | 155 | $image->move($app['config']['image_temp_realdir'], $filename); |
| 156 | 156 | $files[] = $filename; |
| 157 | 157 | } |
@@ -311,7 +311,7 @@ discard block |
||
| 311 | 311 | $app['orm.em']->persist($ProductImage); |
| 312 | 312 | |
| 313 | 313 | // 移動 |
| 314 | - $file = new File($app['config']['image_temp_realdir'] . '/' . $add_image); |
|
| 314 | + $file = new File($app['config']['image_temp_realdir'].'/'.$add_image); |
|
| 315 | 315 | $file->move($app['config']['image_save_realdir']); |
| 316 | 316 | } |
| 317 | 317 | |
@@ -331,7 +331,7 @@ discard block |
||
| 331 | 331 | |
| 332 | 332 | // 削除 |
| 333 | 333 | $fs = new Filesystem(); |
| 334 | - $fs->remove($app['config']['image_save_realdir'] . '/' . $delete_image); |
|
| 334 | + $fs->remove($app['config']['image_save_realdir'].'/'.$delete_image); |
|
| 335 | 335 | } |
| 336 | 336 | $app['orm.em']->persist($Product); |
| 337 | 337 | $app['orm.em']->flush(); |
@@ -430,7 +430,7 @@ discard block |
||
| 430 | 430 | foreach ($deleteImages as $deleteImage) { |
| 431 | 431 | try { |
| 432 | 432 | $fs = new Filesystem(); |
| 433 | - $fs->remove($app['config']['image_save_realdir'] . '/' . $deleteImage); |
|
| 433 | + $fs->remove($app['config']['image_save_realdir'].'/'.$deleteImage); |
|
| 434 | 434 | } catch (\Exception $e) { |
| 435 | 435 | // エラーが発生しても無視する |
| 436 | 436 | } |
@@ -475,10 +475,10 @@ discard block |
||
| 475 | 475 | |
| 476 | 476 | // 画像ファイルを新規作成 |
| 477 | 477 | $extension = pathinfo($Image->getFileName(), PATHINFO_EXTENSION); |
| 478 | - $filename = date('mdHis') . uniqid('_') . '.' . $extension; |
|
| 478 | + $filename = date('mdHis').uniqid('_').'.'.$extension; |
|
| 479 | 479 | try { |
| 480 | 480 | $fs = new Filesystem(); |
| 481 | - $fs->copy($app['config']['image_save_realdir'] . '/' . $Image->getFileName(), $app['config']['image_save_realdir'] . '/' . $filename); |
|
| 481 | + $fs->copy($app['config']['image_save_realdir'].'/'.$Image->getFileName(), $app['config']['image_save_realdir'].'/'.$filename); |
|
| 482 | 482 | } catch (\Exception $e) { |
| 483 | 483 | // エラーが発生しても無視する |
| 484 | 484 | } |
@@ -533,7 +533,7 @@ discard block |
||
| 533 | 533 | $em->getConfiguration()->setSQLLogger(null); |
| 534 | 534 | |
| 535 | 535 | $response = new StreamedResponse(); |
| 536 | - $response->setCallback(function () use ($app, $request) { |
|
| 536 | + $response->setCallback(function() use ($app, $request) { |
|
| 537 | 537 | |
| 538 | 538 | // CSV種別を元に初期化. |
| 539 | 539 | $app['eccube.service.csv.export']->initCsvType(CsvType::CSV_TYPE_PRODUCT); |
@@ -557,7 +557,7 @@ discard block |
||
| 557 | 557 | |
| 558 | 558 | // データ行の出力. |
| 559 | 559 | $app['eccube.service.csv.export']->setExportQueryBuilder($qb); |
| 560 | - $app['eccube.service.csv.export']->exportData(function ($entity, $csvService) { |
|
| 560 | + $app['eccube.service.csv.export']->exportData(function($entity, $csvService) { |
|
| 561 | 561 | |
| 562 | 562 | $Csvs = $csvService->getCsvs(); |
| 563 | 563 | |
@@ -589,9 +589,9 @@ discard block |
||
| 589 | 589 | }); |
| 590 | 590 | |
| 591 | 591 | $now = new \DateTime(); |
| 592 | - $filename = 'product_' . $now->format('YmdHis') . '.csv'; |
|
| 592 | + $filename = 'product_'.$now->format('YmdHis').'.csv'; |
|
| 593 | 593 | $response->headers->set('Content-Type', 'application/octet-stream'); |
| 594 | - $response->headers->set('Content-Disposition', 'attachment; filename=' . $filename); |
|
| 594 | + $response->headers->set('Content-Disposition', 'attachment; filename='.$filename); |
|
| 595 | 595 | $response->send(); |
| 596 | 596 | |
| 597 | 597 | return $response; |
@@ -70,10 +70,10 @@ discard block |
||
| 70 | 70 | // ファイルアップロード |
| 71 | 71 | $file = $form['payment_image']->getData(); |
| 72 | 72 | $fs = new Filesystem(); |
| 73 | - if ($file && $fs->exists($app['config']['image_temp_realdir'] . '/' . $file)) { |
|
| 73 | + if ($file && $fs->exists($app['config']['image_temp_realdir'].'/'.$file)) { |
|
| 74 | 74 | $fs->rename( |
| 75 | - $app['config']['image_temp_realdir'] . '/' . $file, |
|
| 76 | - $app['config']['image_save_realdir'] . '/' . $file |
|
| 75 | + $app['config']['image_temp_realdir'].'/'.$file, |
|
| 76 | + $app['config']['image_save_realdir'].'/'.$file |
|
| 77 | 77 | ); |
| 78 | 78 | } |
| 79 | 79 | |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | if (isset($images['payment_image_file'])) { |
| 101 | 101 | $image = $images['payment_image_file']; |
| 102 | 102 | $extension = $image->guessExtension(); |
| 103 | - $filename = date('mdHis') . uniqid('_') . '.' . $extension; |
|
| 103 | + $filename = date('mdHis').uniqid('_').'.'.$extension; |
|
| 104 | 104 | $image->move($app['config']['image_temp_realdir'], $filename); |
| 105 | 105 | } |
| 106 | 106 | |
@@ -127,12 +127,12 @@ discard block |
||
| 127 | 127 | foreach ($Payments as $Payment) { |
| 128 | 128 | if ($Payment->getId() != $id) { |
| 129 | 129 | $Payment->setRank($rank); |
| 130 | - $rank ++; |
|
| 130 | + $rank++; |
|
| 131 | 131 | } |
| 132 | 132 | } |
| 133 | 133 | $app['orm.em']->flush(); |
| 134 | 134 | |
| 135 | - $app->addSuccess('admin.delete.complete', 'admin') ; |
|
| 135 | + $app->addSuccess('admin.delete.complete', 'admin'); |
|
| 136 | 136 | |
| 137 | 137 | return $app->redirect($app->url('admin_setting_shop_payment')); |
| 138 | 138 | } |
@@ -62,7 +62,7 @@ |
||
| 62 | 62 | $log = array(); |
| 63 | 63 | $message = array(); |
| 64 | 64 | |
| 65 | - foreach (array_reverse(file($logFile, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES)) as $line) { |
|
| 65 | + foreach (array_reverse(file($logFile, FILE_IGNORE_NEW_LINES|FILE_SKIP_EMPTY_LINES)) as $line) { |
|
| 66 | 66 | // 上限に達した場合、処理を抜ける |
| 67 | 67 | if (count($log) >= $formData['line_max']) { |
| 68 | 68 | break; |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | // 現在のセキュリティ情報を更新 |
| 53 | 53 | $adminRoot = $app['config']['admin_route']; |
| 54 | 54 | |
| 55 | - $configFile = $app['config']['root_dir'] . '/app/config/eccube/config.yml'; |
|
| 55 | + $configFile = $app['config']['root_dir'].'/app/config/eccube/config.yml'; |
|
| 56 | 56 | $config = Yaml::parse(file_get_contents($configFile)); |
| 57 | 57 | // trim処理 |
| 58 | 58 | $allowHost = Str::convertLineFeed($data['admin_allow_host']); |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | |
| 83 | 83 | if ($adminRoot != $data['admin_route_dir']) { |
| 84 | 84 | // admin_routeが変更されればpath.ymlを更新 |
| 85 | - $pathFile = $app['config']['root_dir'] . '/app/config/eccube/path.yml'; |
|
| 85 | + $pathFile = $app['config']['root_dir'].'/app/config/eccube/path.yml'; |
|
| 86 | 86 | $config = Yaml::parse(file_get_contents($pathFile)); |
| 87 | 87 | $config['admin_route'] = $data['admin_route_dir']; |
| 88 | 88 | |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | $this->getSecurity($app)->setToken(null); |
| 95 | 95 | |
| 96 | 96 | // 管理者画面へ再ログイン |
| 97 | - return $app->redirect($request->getBaseUrl() . '/' . $config['admin_route']); |
|
| 97 | + return $app->redirect($request->getBaseUrl().'/'.$config['admin_route']); |
|
| 98 | 98 | } |
| 99 | 99 | |
| 100 | 100 | $app->addSuccess('admin.sysmte.security.save.complete', 'admin'); |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | if (count($allowHost) > 0) { |
| 108 | 108 | $form->get('admin_allow_host')->setData(Str::convertLineFeed(implode("\n", $allowHost))); |
| 109 | 109 | } |
| 110 | - $form->get('force_ssl')->setData((bool)$app['config']['force_ssl']); |
|
| 110 | + $form->get('force_ssl')->setData((bool) $app['config']['force_ssl']); |
|
| 111 | 111 | } |
| 112 | 112 | |
| 113 | 113 | return $app->render('Setting/System/security.twig', array( |
@@ -67,13 +67,13 @@ |
||
| 67 | 67 | $server = $app['request']; |
| 68 | 68 | |
| 69 | 69 | $arrSystemInfo = array( |
| 70 | - array('title' => 'EC-CUBE', 'value' => Constant::VERSION), |
|
| 71 | - array('title' => 'サーバーOS', 'value' => php_uname()), |
|
| 72 | - array('title' => 'DBサーバー', 'value' => $system->getDbversion()), |
|
| 73 | - array('title' => 'WEBサーバー', 'value' => $server->server->get("SERVER_SOFTWARE")), |
|
| 70 | + array('title' => 'EC-CUBE', 'value' => Constant::VERSION), |
|
| 71 | + array('title' => 'サーバーOS', 'value' => php_uname()), |
|
| 72 | + array('title' => 'DBサーバー', 'value' => $system->getDbversion()), |
|
| 73 | + array('title' => 'WEBサーバー', 'value' => $server->server->get("SERVER_SOFTWARE")), |
|
| 74 | 74 | ); |
| 75 | 75 | |
| 76 | - $value = phpversion() . ' (' . implode(', ', get_loaded_extensions()) . ')'; |
|
| 76 | + $value = phpversion().' ('.implode(', ', get_loaded_extensions()).')'; |
|
| 77 | 77 | $arrSystemInfo[] = array('title' => 'PHP', 'value' => $value); |
| 78 | 78 | $arrSystemInfo[] = array('title' => 'HTTPユーザーエージェント', 'value' => $server->headers->get('User-Agent')); |
| 79 | 79 | |
@@ -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オーナーズストアにエラーが発生しています。"; |
@@ -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) { |
@@ -38,7 +38,7 @@ |
||
| 38 | 38 | |
| 39 | 39 | if ($app['eccube.layout']) { |
| 40 | 40 | foreach ($app['eccube.layout']->getBlocPositions() as $blocPositions) { |
| 41 | - if ($blocPositions->getTargetId() == constant("Eccube\Entity\BlocPosition::" . $position)) { |
|
| 41 | + if ($blocPositions->getTargetId() == constant("Eccube\Entity\BlocPosition::".$position)) { |
|
| 42 | 42 | $blocks[] = $blocPositions->getBloc(); |
| 43 | 43 | } |
| 44 | 44 | } |