@@ -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; |
@@ -64,7 +64,7 @@ |
||
| 64 | 64 | 'type' => 'many', |
| 65 | 65 | 'model' => 'Menu\Item', |
| 66 | 66 | 'col' => 'Menu_id', |
| 67 | - 'where'=>[['parent_id',0]] |
|
| 67 | + 'where'=>[['parent_id', 0]] |
|
| 68 | 68 | ], |
| 69 | 69 | 'group' => [ |
| 70 | 70 | 'col' => 'group_id', |
@@ -6,7 +6,7 @@ discard block |
||
| 6 | 6 | $code = 'main'; |
| 7 | 7 | } |
| 8 | 8 | $uid = Tools::randomString(); |
| 9 | -$childDraws = function($item, $childDraws, $uid, $activeFind) { |
|
| 9 | +$childDraws = function ($item, $childDraws, $uid, $activeFind) { |
|
| 10 | 10 | if ($item->childs(['order' => ['weight', 'asc']])) { |
| 11 | 11 | echo "<ul class ='dropdown-menu'>"; |
| 12 | 12 | |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | echo "</ul>"; |
| 24 | 24 | } |
| 25 | 25 | }; |
| 26 | -$activeFind = function($item, $activeFind) { |
|
| 26 | +$activeFind = function ($item, $activeFind) { |
|
| 27 | 27 | foreach ($item->childs(['order' => ['weight', 'asc']]) as $item) { |
| 28 | 28 | if (urldecode($_SERVER['REQUEST_URI']) == $item->href) { |
| 29 | 29 | return true; |
@@ -6,7 +6,7 @@ discard block |
||
| 6 | 6 | if (empty($code)) { |
| 7 | 7 | $code = 'main'; |
| 8 | 8 | } |
| 9 | -$childDraws = function($item, $childDraws, $activeFind) { |
|
| 9 | +$childDraws = function ($item, $childDraws, $activeFind) { |
|
| 10 | 10 | if ($item->childs(['order' => ['weight', 'asc']])) { |
| 11 | 11 | echo "<ul class ='list-unstyled'>"; |
| 12 | 12 | foreach ($item->childs(['order' => ['weight', 'asc']]) as $item) { |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | echo "</ul>"; |
| 22 | 22 | } |
| 23 | 23 | }; |
| 24 | -$activeFind = function($item, $activeFind) { |
|
| 24 | +$activeFind = function ($item, $activeFind) { |
|
| 25 | 25 | foreach ($item->childs(['order' => ['weight', 'asc']]) as $item) { |
| 26 | 26 | if (urldecode($_SERVER['REQUEST_URI']) == $item->href) { |
| 27 | 27 | return true; |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | |
| 33 | 33 | |
| 34 | 34 | $options = []; |
| 35 | - $itemParams = \Ecommerce\Item\Param::getList(['where' => ['item_id', $this->model->id],'key'=>'item_option_id']); |
|
| 35 | + $itemParams = \Ecommerce\Item\Param::getList(['where' => ['item_id', $this->model->id], 'key'=>'item_option_id']); |
|
| 36 | 36 | foreach ($this->object->object->params as $param) { |
| 37 | 37 | if ($param->type == 'paramValue' && isset($itemParams[$param->value])) { |
| 38 | 38 | $options[$param->value] = $itemParams[$param->value]->value; |
@@ -17,12 +17,12 @@ |
||
| 17 | 17 | <div class="row"> |
| 18 | 18 | <div class="col-sm-6 ecommerce-showoptions-sort"> |
| 19 | 19 | <span class="caption">Сортировка:</span> |
| 20 | - <a rel="nofollow" href="<?= $path; ?>?<?= http_build_query(array_merge($query, ['sort' => ['price' => sortToggler('price','asc')]])); ?>">По цене<?= sortDirectionIcon('price'); ?></a> |
|
| 21 | - <a rel="nofollow" href="<?= $path; ?>?<?= http_build_query(array_merge($query, ['sort' => ['sales' => sortToggler('sales','desc')]])); ?>">По популярности<?= sortDirectionIcon('sales'); ?></a> |
|
| 20 | + <a rel="nofollow" href="<?= $path; ?>?<?= http_build_query(array_merge($query, ['sort' => ['price' => sortToggler('price', 'asc')]])); ?>">По цене<?= sortDirectionIcon('price'); ?></a> |
|
| 21 | + <a rel="nofollow" href="<?= $path; ?>?<?= http_build_query(array_merge($query, ['sort' => ['sales' => sortToggler('sales', 'desc')]])); ?>">По популярности<?= sortDirectionIcon('sales'); ?></a> |
|
| 22 | 22 | <?php |
| 23 | 23 | if (!empty(App::$cur->ecommerce->config['isset_sort'])) { |
| 24 | 24 | ?> |
| 25 | - <a rel="nofollow" href="<?= $path; ?>?<?= http_build_query(array_merge($query, ['sort' => ['isset' => sortToggler('isset','desc')]])); ?>">По наличию<?= sortDirectionIcon('isset'); ?></a> |
|
| 25 | + <a rel="nofollow" href="<?= $path; ?>?<?= http_build_query(array_merge($query, ['sort' => ['isset' => sortToggler('isset', 'desc')]])); ?>">По наличию<?= sortDirectionIcon('isset'); ?></a> |
|
| 26 | 26 | <?php |
| 27 | 27 | } |
| 28 | 28 | ?> |
@@ -11,7 +11,7 @@ |
||
| 11 | 11 | class ServerController extends Controller { |
| 12 | 12 | function csrfAction($key = '') { |
| 13 | 13 | $result = new \Server\Result(); |
| 14 | - $key = (string)$key; |
|
| 14 | + $key = (string) $key; |
|
| 15 | 15 | if (!$key) { |
| 16 | 16 | $result->success = false; |
| 17 | 17 | return $result->send(); |
@@ -14,7 +14,7 @@ |
||
| 14 | 14 | ini_set('memory_limit', '2000M'); |
| 15 | 15 | ignore_user_abort(true); |
| 16 | 16 | set_time_limit(0); |
| 17 | - $reExchange = Exchange1c\Exchange::get((int)$_GET['item_pk']); |
|
| 17 | + $reExchange = Exchange1c\Exchange::get((int) $_GET['item_pk']); |
|
| 18 | 18 | |
| 19 | 19 | $exchange = new \Exchange1c\Exchange(); |
| 20 | 20 | $exchange->type = $reExchange->type; |
@@ -148,9 +148,9 @@ discard block |
||
| 148 | 148 | $new_width = $max_width; |
| 149 | 149 | $new_height = $max_height; |
| 150 | 150 | //Находим начальные координаты (центрируем новое изображение) |
| 151 | - $imgX = (int)(($ow / 2) - ($img_width / 2)); |
|
| 151 | + $imgX = (int) (($ow / 2) - ($img_width / 2)); |
|
| 152 | 152 | if ($pos == 'center') { |
| 153 | - $imgY = (int)(($oh / 2) - ($img_height / 2)); |
|
| 153 | + $imgY = (int) (($oh / 2) - ($img_height / 2)); |
|
| 154 | 154 | } else { |
| 155 | 155 | $imgY = 0; |
| 156 | 156 | } |
@@ -292,9 +292,9 @@ discard block |
||
| 292 | 292 | * @return string |
| 293 | 293 | */ |
| 294 | 294 | public static function toRusDate($date) { |
| 295 | - $yy = (int)substr($date, 0, 4); |
|
| 296 | - $mm = (int)substr($date, 5, 2); |
|
| 297 | - $dd = (int)substr($date, 8, 2); |
|
| 295 | + $yy = (int) substr($date, 0, 4); |
|
| 296 | + $mm = (int) substr($date, 5, 2); |
|
| 297 | + $dd = (int) substr($date, 8, 2); |
|
| 298 | 298 | |
| 299 | 299 | $hours = substr($date, 11, 5); |
| 300 | 300 | |