@@ -29,7 +29,7 @@ |
||
| 29 | 29 | /** |
| 30 | 30 | * Initialize module |
| 31 | 31 | * @param array $params Collection of parameters |
| 32 | - * @return bool True if success |
|
| 32 | + * @return boolean|null True if success |
|
| 33 | 33 | */ |
| 34 | 34 | public function init(array $params = array()) |
| 35 | 35 | { |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | return array('status' => true, 'html' => $this->getHTML($materialFieldId)); |
| 130 | 130 | } |
| 131 | 131 | |
| 132 | - /** |
|
| 132 | + /** |
|
| 133 | 133 | * Controller for getting quantity image in gallery. |
| 134 | 134 | * |
| 135 | 135 | * @param integer $materialFieldId identefier Table MaterialField |
@@ -148,7 +148,7 @@ discard block |
||
| 148 | 148 | return $response; |
| 149 | 149 | } |
| 150 | 150 | |
| 151 | - /** |
|
| 151 | + /** |
|
| 152 | 152 | * Controller for update material image properties alt from gallery. |
| 153 | 153 | * |
| 154 | 154 | * @param int $imageId Gallery image identifier |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | |
| 108 | 108 | foreach (array_keys($scale->thumnails_sizes) as $folder) { |
| 109 | 109 | // Form image path for scale module |
| 110 | - $imageScalePath = $this->formImagePath($image->Path . $folder . '/', $image->Src); |
|
| 110 | + $imageScalePath = $this->formImagePath($image->Path.$folder.'/', $image->Src); |
|
| 111 | 111 | if ($this->imageExists($imageScalePath)) { |
| 112 | 112 | $this->fs->delete($imageScalePath); |
| 113 | 113 | } |
@@ -236,7 +236,7 @@ discard block |
||
| 236 | 236 | } |
| 237 | 237 | } |
| 238 | 238 | } else { |
| 239 | - $errorText = "Файл ( " . urldecode($_SERVER['HTTP_X_FILE_NAME']) . " ) не является картинкой!"; |
|
| 239 | + $errorText = "Файл ( ".urldecode($_SERVER['HTTP_X_FILE_NAME'])." ) не является картинкой!"; |
|
| 240 | 240 | $result = array('status' => false, 'errorText' => $errorText); |
| 241 | 241 | } |
| 242 | 242 | |
@@ -399,7 +399,7 @@ discard block |
||
| 399 | 399 | } |
| 400 | 400 | |
| 401 | 401 | // set image size string representation, if it is not 0 |
| 402 | - $size = ($image->size == 0) ? '' : $size . $this->humanFileSize($image->size); |
|
| 402 | + $size = ($image->size == 0) ? '' : $size.$this->humanFileSize($image->size); |
|
| 403 | 403 | |
| 404 | 404 | // Render gallery image tumb |
| 405 | 405 | $items_html .= $this->view('tumbs/item') |
@@ -430,9 +430,9 @@ discard block |
||
| 430 | 430 | { |
| 431 | 431 | /** @var string $sizeLetters Size shortcuts */ |
| 432 | 432 | $sizeLetters = 'BKBMBGBTBPB'; |
| 433 | - $factor = (int)(floor((strlen($bytes) - 1) / 3)); |
|
| 433 | + $factor = (int) (floor((strlen($bytes) - 1) / 3)); |
|
| 434 | 434 | $sizeLetter = ($factor <= 0) ? substr($sizeLetters, 0, 1) : substr($sizeLetters, $factor * 2 - 1, 2); |
| 435 | - return sprintf("%.{$decimals}f", $bytes / pow(1024, $factor)) . $sizeLetter; |
|
| 435 | + return sprintf("%.{$decimals}f", $bytes / pow(1024, $factor)).$sizeLetter; |
|
| 436 | 436 | } |
| 437 | 437 | |
| 438 | 438 | /** |
@@ -468,7 +468,7 @@ discard block |
||
| 468 | 468 | if (empty($imagePath)) { |
| 469 | 469 | $path = $imageSrc; |
| 470 | 470 | } else { // Use new CORRECT way |
| 471 | - $path = $imagePath . $imageSrc; |
|
| 471 | + $path = $imagePath.$imageSrc; |
|
| 472 | 472 | } |
| 473 | 473 | |
| 474 | 474 | // form relative path to the image |
@@ -478,7 +478,7 @@ discard block |
||
| 478 | 478 | if ($dir == '/') { |
| 479 | 479 | return substr($path, 1); |
| 480 | 480 | } else { |
| 481 | - return preg_replace('/' . addcslashes($dir, '/') . '/', '', $path); |
|
| 481 | + return preg_replace('/'.addcslashes($dir, '/').'/', '', $path); |
|
| 482 | 482 | } |
| 483 | 483 | } |
| 484 | 484 | |
@@ -9,7 +9,6 @@ |
||
| 9 | 9 | namespace samsoncms\app\gallery\tab; |
| 10 | 10 | |
| 11 | 11 | use samson\activerecord\field; |
| 12 | -use samson\cms\Navigation; |
|
| 13 | 12 | use samsoncms\form\tab\Generic; |
| 14 | 13 | use samsonframework\core\RenderInterface; |
| 15 | 14 | use samsonframework\orm\QueryInterface; |