@@ -314,10 +314,10 @@ |
||
314 | 314 | ?> |
315 | 315 | <script> |
316 | 316 | setInterval(function () { |
317 | - var hash = '<?=$hash;?>'; |
|
318 | - var files = '<?=http_build_query(['files' => array_keys($urls)]);?>'; |
|
317 | + var hash = '<?=$hash; ?>'; |
|
318 | + var files = '<?=http_build_query(['files' => array_keys($urls)]); ?>'; |
|
319 | 319 | var timeHash = '<?=$timeMd5?>'; |
320 | - var id = '<?=$id;?>'; |
|
320 | + var id = '<?=$id; ?>'; |
|
321 | 321 | // 1. Создаём новый объект XMLHttpRequest |
322 | 322 | var xhr = new XMLHttpRequest(); |
323 | 323 |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | $material = null; |
18 | 18 | $path = trim(implode('/', $args)); |
19 | 19 | if (is_numeric($path)) { |
20 | - $material = Material::get([['id', (int)$path], ['date_publish', null, 'IS NOT']]); |
|
20 | + $material = Material::get([['id', (int) $path], ['date_publish', null, 'IS NOT']]); |
|
21 | 21 | } |
22 | 22 | if (!$material && $args) { |
23 | 23 | foreach ($args as $key => $alias) { |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | if ($category) { |
44 | 44 | $where = [ |
45 | 45 | ['category_id', $category->id], |
46 | - ['id', (int)$args[count($args) - 1]], |
|
46 | + ['id', (int) $args[count($args) - 1]], |
|
47 | 47 | ['date_publish', null, 'IS NOT'] |
48 | 48 | ]; |
49 | 49 | } else { |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | $path = trim(implode('/', $args)); |
77 | 77 | $category = null; |
78 | 78 | if (is_numeric($path)) { |
79 | - $category = Category::get((int)$path); |
|
79 | + $category = Category::get((int) $path); |
|
80 | 80 | } |
81 | 81 | if (!$category) { |
82 | 82 | foreach ($args as $alias) { |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | $material = false; |
112 | 112 | if ($alias) { |
113 | 113 | if (is_numeric($alias)) { |
114 | - $material = Material::get([['id', (int)$alias], ['date_publish', null, 'IS NOT']]); |
|
114 | + $material = Material::get([['id', (int) $alias], ['date_publish', null, 'IS NOT']]); |
|
115 | 115 | } |
116 | 116 | if (!$material) { |
117 | 117 | $material = Material::get([['alias', $alias], ['date_publish', null, 'IS NOT']]); |
@@ -2,9 +2,9 @@ |
||
2 | 2 | <div class="row"> |
3 | 3 | <div class="col-md-3"> |
4 | 4 | <?php |
5 | - $category = $material->category; |
|
6 | - $this->widget('Materials\categoryTree', ['category' => $category]); |
|
7 | - ?> |
|
5 | + $category = $material->category; |
|
6 | + $this->widget('Materials\categoryTree', ['category' => $category]); |
|
7 | + ?> |
|
8 | 8 | </div> |
9 | 9 | <div class="col-md-9"> |
10 | 10 | <div class="content"> |
@@ -126,8 +126,8 @@ discard block |
||
126 | 126 | } |
127 | 127 | |
128 | 128 | public function activationAction($userId = 0, $hash = '') { |
129 | - $user = User::get((int)$userId); |
|
130 | - if (!$user || !$hash || $user->activation !== (string)$hash) { |
|
129 | + $user = User::get((int) $userId); |
|
130 | + if (!$user || !$hash || $user->activation !== (string) $hash) { |
|
131 | 131 | Tools::redirect('/', 'Во время активации произошли ошибки', 'danger'); |
132 | 132 | } |
133 | 133 | $user->activation = ''; |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | } |
171 | 171 | |
172 | 172 | public function resendActivationAction($userId = 0) { |
173 | - $user = User::get((int)$userId); |
|
173 | + $user = User::get((int) $userId); |
|
174 | 174 | if (!$user) { |
175 | 175 | Tools::redirect('/', 'Не указан пользователь', 'danger'); |
176 | 176 | } |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | } |
187 | 187 | |
188 | 188 | public function getPartnerInfoAction($userId = 0) { |
189 | - $userId = (int)$userId; |
|
189 | + $userId = (int) $userId; |
|
190 | 190 | $result = new Result(); |
191 | 191 | if (!$userId) { |
192 | 192 | $result->success = false; |