@@ -221,7 +221,7 @@ discard block |
||
| 221 | 221 | if ($file) { |
| 222 | 222 | $photoId = Tools::randomString(); |
| 223 | 223 | $value = '<a href = "' . $file->path . '" id="' . $photoId . '"><img src="' . $file->path . '?resize=60x120" /></a>'; |
| 224 | - $value .='<script>inji.onLoad(function(){$("#' . $photoId . '").fancybox();});</script>'; |
|
| 224 | + $value .= '<script>inji.onLoad(function(){$("#' . $photoId . '").fancybox();});</script>'; |
|
| 225 | 225 | } else { |
| 226 | 226 | $value = '<img src="/static/system/images/no-image.png?resize=60x120" />'; |
| 227 | 227 | } |
@@ -1120,7 +1120,7 @@ discard block |
||
| 1120 | 1120 | $items[$item[$arrayKey]] = new $class($item); |
| 1121 | 1121 | } |
| 1122 | 1122 | if (!empty($options['order'])) { |
| 1123 | - usort($items, function($a, $b) use($options) { |
|
| 1123 | + usort($items, function ($a, $b) use($options) { |
|
| 1124 | 1124 | if ($a->{$options['order'][0]} > $b->{$options['order'][0]} && $options['order'][1] = 'asc') { |
| 1125 | 1125 | return 1; |
| 1126 | 1126 | } elseif ($a->{$options['order'][0]} < $b->{$options['order'][0]} && $options['order'][1] = 'asc') { |
@@ -1303,7 +1303,7 @@ discard block |
||
| 1303 | 1303 | } else { |
| 1304 | 1304 | $cols .= '*'; |
| 1305 | 1305 | } |
| 1306 | - $cols .=') as `count`' . (!empty($options['cols']) ? ',' . $options['cols'] : ''); |
|
| 1306 | + $cols .= ') as `count`' . (!empty($options['cols']) ? ',' . $options['cols'] : ''); |
|
| 1307 | 1307 | $query->cols = $cols; |
| 1308 | 1308 | if (!empty($options['group'])) { |
| 1309 | 1309 | $query->group($options['group']); |
@@ -1962,7 +1962,7 @@ discard block |
||
| 1962 | 1962 | if (!$value && !empty(static::$cols[$shortName]) && in_array('emptyValue', array_keys(static::$cols[$shortName]))) { |
| 1963 | 1963 | $value = static::$cols[$shortName]['emptyValue']; |
| 1964 | 1964 | } |
| 1965 | - if(is_null($value) && empty(static::$cols[$shortName]['null'])){ |
|
| 1965 | + if (is_null($value) && empty(static::$cols[$shortName]['null'])) { |
|
| 1966 | 1966 | $value = ''; |
| 1967 | 1967 | } |
| 1968 | 1968 | if (!empty($className::$cols[$shortName])) { |
@@ -1962,7 +1962,7 @@ |
||
| 1962 | 1962 | if (!$value && !empty(static::$cols[$shortName]) && in_array('emptyValue', array_keys(static::$cols[$shortName]))) { |
| 1963 | 1963 | $value = static::$cols[$shortName]['emptyValue']; |
| 1964 | 1964 | } |
| 1965 | - if(is_null($value) && empty(static::$cols[$shortName]['null'])){ |
|
| 1965 | + if(is_null($value) && empty(static::$cols[$shortName]['null'])) { |
|
| 1966 | 1966 | $value = ''; |
| 1967 | 1967 | } |
| 1968 | 1968 | if (!empty($className::$cols[$shortName])) { |
@@ -1,7 +1,7 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | return [ |
| 4 | - 'up' => function() { |
|
| 4 | + 'up' => function () { |
|
| 5 | 5 | Materials\Material::createCol('date_publish'); |
| 6 | 6 | foreach (Materials\Material::getList() as $material) { |
| 7 | 7 | $material->date_publish = $material->date_create; |
@@ -56,7 +56,7 @@ |
||
| 56 | 56 | $this->categoryAction($category->id); |
| 57 | 57 | } |
| 58 | 58 | } |
| 59 | - } elseif(!$material) { |
|
| 59 | + } elseif (!$material) { |
|
| 60 | 60 | $material = Materials\Material::get(1, 'default'); |
| 61 | 61 | } |
| 62 | 62 | if ($material) { |