@@ -226,7 +226,7 @@ |
||
226 | 226 | |
227 | 227 | // id |
228 | 228 | if (isset($searchData['id']) && StringUtil::isNotBlank($searchData['id'])) { |
229 | - $id = preg_match('/^\d{0,10}$/', $searchData['id']) ? $searchData['id'] : null; |
|
229 | + $id = preg_match('/^\d{0,10}$/', $searchData['id']) ? $searchData['id'] : null; |
|
230 | 230 | if ($id && $id > '2147483647' && $this->isPostgreSQL()) { |
231 | 231 | $id = null; |
232 | 232 | } |
@@ -17,10 +17,10 @@ |
||
17 | 17 | use Eccube\Event\EccubeEvents; |
18 | 18 | use Eccube\Event\EventArgs; |
19 | 19 | use Eccube\Form\Type\Admin\LogType; |
20 | -use Symfony\Component\Routing\Annotation\Route; |
|
21 | 20 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; |
22 | 21 | use Symfony\Component\HttpFoundation\Request; |
23 | 22 | use Symfony\Component\HttpFoundation\StreamedResponse; |
23 | +use Symfony\Component\Routing\Annotation\Route; |
|
24 | 24 | |
25 | 25 | class LogController extends AbstractController |
26 | 26 | { |
@@ -71,13 +71,13 @@ |
||
71 | 71 | if ($form->getClickedButton() && $form->getClickedButton()->getName() === 'download') { |
72 | 72 | $bufferSize = 1024 * 50; |
73 | 73 | $response = new StreamedResponse(); |
74 | - $response->headers->set('Content-Length',filesize($logFile)); |
|
75 | - $response->headers->set('Content-Disposition','attachment; filename=' . basename($logFile)); |
|
76 | - $response->headers->set('Content-Type','application/octet-stream'); |
|
77 | - $response->setCallback(function() use($logFile,$bufferSize) { |
|
78 | - if ($fh = fopen($logFile,'r')) { |
|
74 | + $response->headers->set('Content-Length', filesize($logFile)); |
|
75 | + $response->headers->set('Content-Disposition', 'attachment; filename='.basename($logFile)); |
|
76 | + $response->headers->set('Content-Type', 'application/octet-stream'); |
|
77 | + $response->setCallback(function () use($logFile, $bufferSize) { |
|
78 | + if ($fh = fopen($logFile, 'r')) { |
|
79 | 79 | while (!feof($fh)) { |
80 | - echo fread($fh,$bufferSize); |
|
80 | + echo fread($fh, $bufferSize); |
|
81 | 81 | } |
82 | 82 | } |
83 | 83 | }); |
@@ -56,7 +56,7 @@ |
||
56 | 56 | public function configureOptions(OptionsResolver $resolver) |
57 | 57 | { |
58 | 58 | $eccubeConfig = $this->eccubeConfig; |
59 | - $constraints = function(Options $options) use ($eccubeConfig) { |
|
59 | + $constraints = function (Options $options) use ($eccubeConfig) { |
|
60 | 60 | $constraints = []; |
61 | 61 | // requiredがtrueに指定されている場合, NotBlankを追加 |
62 | 62 | if (isset($options['required']) && true === $options['required']) { |
@@ -56,7 +56,7 @@ |
||
56 | 56 | public function configureOptions(OptionsResolver $resolver) |
57 | 57 | { |
58 | 58 | $eccubeConfig = $this->eccubeConfig; |
59 | - $constraints = function(Options $options) use ($eccubeConfig) { |
|
59 | + $constraints = function (Options $options) use ($eccubeConfig) { |
|
60 | 60 | $constraints = []; |
61 | 61 | // requiredがtrueに指定されている場合, NotBlankを追加 |
62 | 62 | if (isset($options['required']) && true === $options['required']) { |
@@ -555,7 +555,7 @@ |
||
555 | 555 | |
556 | 556 | // 削除 |
557 | 557 | $fs = new Filesystem(); |
558 | - $fs->remove($this->eccubeConfig['eccube_save_image_dir'] . '/' . $basename); |
|
558 | + $fs->remove($this->eccubeConfig['eccube_save_image_dir'].'/'.$basename); |
|
559 | 559 | } |
560 | 560 | } |
561 | 561 | $this->entityManager->persist($Product); |