Completed
Push — master ( 6b7664...8cf912 )
by Alexey
05:42
created
system/modules/Ecommerce/widgets/cart/cardSelect.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@
 block discarded – undo
3 3
 $userCards = \Ecommerce\Card\Item::getList(['where' => ['user_id', \Users\User::$cur->id]]);
4 4
 foreach ($userCards as $userCard) {
5 5
     $checked = $cart->card_item_id == $userCard->id;
6
-    $form->input('radio', "discounts[card_item_id]", $userCard->card->name, ['value' => $userCard->id, 'checked' => $checked, 'helpText' => $userCard->level->name . ' (' . $userCard->level->discount->name . ')<br />Сумма накоплений: ' . $userCard->sum . ' руб.']);
6
+    $form->input('radio', "discounts[card_item_id]", $userCard->card->name, ['value' => $userCard->id, 'checked' => $checked, 'helpText' => $userCard->level->name.' ('.$userCard->level->discount->name.')<br />Сумма накоплений: '.$userCard->sum.' руб.']);
7 7
 }
8 8
 if (!$userCards) {
9 9
     echo '<p>У вас нет <b>дисконтной карты</b>, вы можете её оформить и сразу начать пльзоваться её приемуществами.</p>';
Please login to merge, or discard this patch.
system/modules/Ecommerce/widgets/cart/delivery.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
           } else {
10 10
               $checked = '';
11 11
           }
12
-          echo '<li' . ($checked ? ' class="active"' : '') . '><a href = "#" onclick = "document.getElementById(\'' . $hiddenId . '\').value=\'' . $delivery->id . '\';inji.Ecommerce.Cart.calcSum();return false;">';
12
+          echo '<li'.($checked ? ' class="active"' : '').'><a href = "#" onclick = "document.getElementById(\''.$hiddenId.'\').value=\''.$delivery->id.'\';inji.Ecommerce.Cart.calcSum();return false;">';
13 13
           echo $delivery->name;
14 14
           echo '</a></li>';
15 15
       }
@@ -27,10 +27,10 @@  discard block
 block discarded – undo
27 27
     if ($cart->delivery) {
28 28
         echo "<h4>Информация о доставке</h4>";
29 29
         if ($cart->delivery->price_text || $cart->delivery->price) {
30
-            echo "<div>Стоимость доставки: <b>" . ($cart->delivery->price_text ? $cart->delivery->price_text : ( $cart->delivery->price . ' ' . ($cart->delivery->currency ? $cart->delivery->currency->acronym() : 'руб.') )) . '</b></div>';
30
+            echo "<div>Стоимость доставки: <b>".($cart->delivery->price_text ? $cart->delivery->price_text : ($cart->delivery->price.' '.($cart->delivery->currency ? $cart->delivery->currency->acronym() : 'руб.'))).'</b></div>';
31 31
         }
32 32
         if ((float) $cart->delivery->max_cart_price) {
33
-            echo '<div>При заказе товаров на сумму от ' . $cart->delivery->max_cart_price . ' руб - бесплатно</div>';
33
+            echo '<div>При заказе товаров на сумму от '.$cart->delivery->max_cart_price.' руб - бесплатно</div>';
34 34
         }
35 35
         echo $cart->delivery->info;
36 36
         if ($cart->delivery->fields) {
Please login to merge, or discard this patch.
system/modules/Ecommerce/widgets/cart/payType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
9 9
           } else {
10 10
               $checked = '';
11 11
           }
12
-          echo '<li' . ($checked ? ' class="active"' : '') . '><a href = "#" onclick = "document.getElementById(\'' . $hiddenId . '\').value=\'' . $payType->id . '\';inji.Ecommerce.Cart.calcSum();return false;">';
12
+          echo '<li'.($checked ? ' class="active"' : '').'><a href = "#" onclick = "document.getElementById(\''.$hiddenId.'\').value=\''.$payType->id.'\';inji.Ecommerce.Cart.calcSum();return false;">';
13 13
           echo $payType->name;
14 14
           echo '</a></li>';
15 15
       }
Please login to merge, or discard this patch.
system/modules/Ecommerce/widgets/cart/history.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
                       if (App::$cur->money) {
62 62
                           $currency = Money\Currency::get($currency_id);
63 63
                           if ($currency) {
64
-                              echo '&nbsp;' . $currency->acronym();
64
+                              echo '&nbsp;'.$currency->acronym();
65 65
                           } else {
66 66
                               echo '&nbsp;р.';
67 67
                           }
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
                       $newRedirect = $handlers[$cart->payType->handler]['handler']($cart);
86 86
                   }
87 87
                   if (!empty($newRedirect[0])) {
88
-                      echo '<a class="btn btn-warning btn-sm" href = "' . $newRedirect[0] . '">Оплатить</a>';
88
+                      echo '<a class="btn btn-warning btn-sm" href = "'.$newRedirect[0].'">Оплатить</a>';
89 89
                   } else {
90 90
                       echo 'Не оплачено';
91 91
                   }
Please login to merge, or discard this patch.
system/modules/Ecommerce/objects/CloseCartBtn.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
             $cart->save();
50 50
         }
51 51
         $count = count($carts);
52
-        return 'Завершено <b>' . $count . '</b> ' . \Tools::getNumEnding($count, ['корзина', 'корзины', 'корзин']);
52
+        return 'Завершено <b>'.$count.'</b> '.\Tools::getNumEnding($count, ['корзина', 'корзины', 'корзин']);
53 53
     }
54 54
 
55 55
 }
Please login to merge, or discard this patch.
system/modules/Ecommerce/snippets/payTypeHandler/onlinePay.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
                         'currency_id' => $currency_id,
21 21
                         'user_id' => \Users\User::$cur->id,
22 22
                         'sum' => $sum,
23
-                        'description' => 'Оплата заказа №' . $cart->id . ' в онлайн-магазине',
23
+                        'description' => 'Оплата заказа №'.$cart->id.' в онлайн-магазине',
24 24
                         'type' => 'pay',
25 25
                         'pay_status_id' => 1,
26 26
                         'callback_module' => 'Ecommerce',
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
                     $pay->save();
33 33
                 }
34 34
             }
35
-            return ['/money/merchants/pay/?data=' . $cart->id, 'Ваш заказ был создан. Вам необходимо оплатить счета, после чего с вами свяжется администратор для уточнения дополнительной информации', 'success'];
35
+            return ['/money/merchants/pay/?data='.$cart->id, 'Ваш заказ был создан. Вам необходимо оплатить счета, после чего с вами свяжется администратор для уточнения дополнительной информации', 'success'];
36 36
         }
37 37
     }
38 38
         ];
Please login to merge, or discard this patch.
system/modules/Ecommerce/Ecommerce.php 1 patch
Spacing   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
         $name = '';
53 53
         foreach ($fields as $field) {
54 54
             if ($field->save && !empty($data[$field->id])) {
55
-                $name .= htmlspecialchars($data[$field->id]) . ' ';
55
+                $name .= htmlspecialchars($data[$field->id]).' ';
56 56
             }
57 57
         }
58 58
         $name = trim($name);
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
         $name = '';
110 110
         foreach ($fields as $field) {
111 111
             if ($field->save && !empty($data[$field->id])) {
112
-                $name .= htmlspecialchars($data[$field->id]) . ' ';
112
+                $name .= htmlspecialchars($data[$field->id]).' ';
113 113
             }
114 114
         }
115 115
         $name = trim($name);
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
             foreach ($options['sort'] as $col => $direction) {
197 197
                 switch ($col) {
198 198
                     case 'price':
199
-                        $selectOptions['order'][] = [Ecommerce\Item\Offer\Price::colPrefix() . 'price', strtolower($direction) == 'desc' ? 'desc' : 'asc'];
199
+                        $selectOptions['order'][] = [Ecommerce\Item\Offer\Price::colPrefix().'price', strtolower($direction) == 'desc' ? 'desc' : 'asc'];
200 200
                         break;
201 201
                     case 'name':
202 202
                         $selectOptions['order'][] = ['name', strtolower($direction) == 'desc' ? 'desc' : 'asc'];
@@ -217,10 +217,10 @@  discard block
 block discarded – undo
217 217
         if (!empty($this->config['view_filter'])) {
218 218
             if (!empty($this->config['view_filter']['options'])) {
219 219
                 foreach ($this->config['view_filter']['options'] as $optionId => $optionValue) {
220
-                    $selectOptions['join'][] = [Ecommerce\Item\Param::table(), Ecommerce\Item::index() . ' = ' . 'option' . $optionId . '.' . Ecommerce\Item\Param::colPrefix() . Ecommerce\Item::index() . ' AND ' .
221
-                        'option' . $optionId . '.' . Ecommerce\Item\Param::colPrefix() . Ecommerce\Item\Option::index() . ' = "' . (int) $optionId . '" AND ' .
222
-                        'option' . $optionId . '.' . Ecommerce\Item\Param::colPrefix() . 'value = "' . (int) $optionValue . '"',
223
-                        'inner', 'option' . $optionId];
220
+                    $selectOptions['join'][] = [Ecommerce\Item\Param::table(), Ecommerce\Item::index().' = '.'option'.$optionId.'.'.Ecommerce\Item\Param::colPrefix().Ecommerce\Item::index().' AND '.
221
+                        'option'.$optionId.'.'.Ecommerce\Item\Param::colPrefix().Ecommerce\Item\Option::index().' = "'.(int) $optionId.'" AND '.
222
+                        'option'.$optionId.'.'.Ecommerce\Item\Param::colPrefix().'value = "'.(int) $optionValue.'"',
223
+                        'inner', 'option'.$optionId];
224 224
                 }
225 225
             }
226 226
         }
@@ -230,18 +230,18 @@  discard block
 block discarded – undo
230 230
                 switch ($col) {
231 231
                     case 'price':
232 232
                         if (!empty($filter['min'])) {
233
-                            $selectOptions['where'][] = [Ecommerce\Item\Offer\Price::colPrefix() . 'price', (float) $filter['min'], '>='];
233
+                            $selectOptions['where'][] = [Ecommerce\Item\Offer\Price::colPrefix().'price', (float) $filter['min'], '>='];
234 234
                         }
235 235
                         if (!empty($filter['max'])) {
236
-                            $selectOptions['where'][] = [Ecommerce\Item\Offer\Price::colPrefix() . 'price', (float) $filter['max'], '<='];
236
+                            $selectOptions['where'][] = [Ecommerce\Item\Offer\Price::colPrefix().'price', (float) $filter['max'], '<='];
237 237
                         }
238 238
                         break;
239 239
                     case 'options':
240 240
                         foreach ($filter as $optionId => $optionValue) {
241
-                            $selectOptions['join'][] = [Ecommerce\Item\Param::table(), Ecommerce\Item::index() . ' = ' . 'option' . $optionId . '.' . Ecommerce\Item\Param::colPrefix() . Ecommerce\Item::index() . ' AND ' .
242
-                                'option' . $optionId . '.' . Ecommerce\Item\Param::colPrefix() . Ecommerce\Item\Option::index() . ' = "' . (int) $optionId . '" AND ' .
243
-                                'option' . $optionId . '.' . Ecommerce\Item\Param::colPrefix() . 'value = "' . (int) $optionValue . '"',
244
-                                'inner', 'option' . $optionId];
241
+                            $selectOptions['join'][] = [Ecommerce\Item\Param::table(), Ecommerce\Item::index().' = '.'option'.$optionId.'.'.Ecommerce\Item\Param::colPrefix().Ecommerce\Item::index().' AND '.
242
+                                'option'.$optionId.'.'.Ecommerce\Item\Param::colPrefix().Ecommerce\Item\Option::index().' = "'.(int) $optionId.'" AND '.
243
+                                'option'.$optionId.'.'.Ecommerce\Item\Param::colPrefix().'value = "'.(int) $optionValue.'"',
244
+                                'inner', 'option'.$optionId];
245 245
                         }
246 246
                         break;
247 247
                 }
@@ -256,13 +256,13 @@  discard block
 block discarded – undo
256 256
                     continue;
257 257
                 }
258 258
                 $category = \Ecommerce\Category::get($categoryId);
259
-                $where[] = ['tree_path', $category->tree_path . (int) $categoryId . '/%', 'LIKE', $first ? 'AND' : 'OR'];
259
+                $where[] = ['tree_path', $category->tree_path.(int) $categoryId.'/%', 'LIKE', $first ? 'AND' : 'OR'];
260 260
                 $first = false;
261 261
             }
262 262
             $selectOptions['where'][] = $where;
263 263
         } elseif (!empty($options['parent'])) {
264 264
             $category = \Ecommerce\Category::get($options['parent']);
265
-            $selectOptions['where'][] = ['tree_path', $category->tree_path . (int) $options['parent'] . '/%', 'LIKE'];
265
+            $selectOptions['where'][] = ['tree_path', $category->tree_path.(int) $options['parent'].'/%', 'LIKE'];
266 266
         }
267 267
 
268 268
         //search
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
             foreach (explode(' ', $searchStr) as $part) {
273 273
                 $part = trim($part);
274 274
                 if ($part && strlen($part) > 2) {
275
-                    $searchArr[] = ['search_index', '%' . $part . '%', 'LIKE'];
275
+                    $searchArr[] = ['search_index', '%'.$part.'%', 'LIKE'];
276 276
                 }
277 277
             }
278 278
             if (!empty($searchArr)) {
@@ -282,18 +282,18 @@  discard block
 block discarded – undo
282 282
         if (empty($this->config['view_empty_warehouse'])) {
283 283
             $selectOptions['where'][] = [
284 284
                 '(
285
-          (SELECT COALESCE(sum(`' . \Ecommerce\Item\Offer\Warehouse::colPrefix() . 'count`),0) 
286
-            FROM ' . \App::$cur->db->table_prefix . \Ecommerce\Item\Offer\Warehouse::table() . ' iciw 
287
-            WHERE iciw.' . \Ecommerce\Item\Offer\Warehouse::colPrefix() . \Ecommerce\Item\Offer::index() . ' = ' . \Ecommerce\Item\Offer::index() . '
285
+          (SELECT COALESCE(sum(`' . \Ecommerce\Item\Offer\Warehouse::colPrefix().'count`),0) 
286
+            FROM ' . \App::$cur->db->table_prefix.\Ecommerce\Item\Offer\Warehouse::table().' iciw 
287
+            WHERE iciw.' . \Ecommerce\Item\Offer\Warehouse::colPrefix().\Ecommerce\Item\Offer::index().' = '.\Ecommerce\Item\Offer::index().'
288 288
             )
289 289
           -
290
-          (SELECT COALESCE(sum(' . \Ecommerce\Warehouse\Block::colPrefix() . 'count) ,0)
291
-            FROM ' . \App::$cur->db->table_prefix . \Ecommerce\Warehouse\Block::table() . ' iewb
292
-            inner JOIN ' . \App::$cur->db->table_prefix . \Ecommerce\Cart::table() . ' icc ON icc.' . \Ecommerce\Cart::index() . ' = iewb.' . \Ecommerce\Warehouse\Block::colPrefix() . \Ecommerce\Cart::index() . ' AND (
293
-                (`' . \Ecommerce\Cart::colPrefix() . 'warehouse_block` = 1 and `' . \Ecommerce\Cart::colPrefix() . 'cart_status_id` in(2,3,6)) ||
294
-                (`' . \Ecommerce\Cart::colPrefix() . \Ecommerce\Cart\Status::index() . '` in(0,1) and `' . \Ecommerce\Cart::colPrefix() . 'date_last_activ` >=subdate(now(),INTERVAL 30 MINUTE))
290
+          (SELECT COALESCE(sum(' . \Ecommerce\Warehouse\Block::colPrefix().'count) ,0)
291
+            FROM ' . \App::$cur->db->table_prefix.\Ecommerce\Warehouse\Block::table().' iewb
292
+            inner JOIN ' . \App::$cur->db->table_prefix.\Ecommerce\Cart::table().' icc ON icc.'.\Ecommerce\Cart::index().' = iewb.'.\Ecommerce\Warehouse\Block::colPrefix().\Ecommerce\Cart::index().' AND (
293
+                (`' . \Ecommerce\Cart::colPrefix().'warehouse_block` = 1 and `'.\Ecommerce\Cart::colPrefix().'cart_status_id` in(2,3,6)) ||
294
+                (`' . \Ecommerce\Cart::colPrefix().\Ecommerce\Cart\Status::index().'` in(0,1) and `'.\Ecommerce\Cart::colPrefix().'date_last_activ` >=subdate(now(),INTERVAL 30 MINUTE))
295 295
             )
296
-            WHERE iewb.' . \Ecommerce\Warehouse\Block::colPrefix() . \Ecommerce\Item\Offer::index() . ' = ' . \Ecommerce\Item\Offer::index() . ')
296
+            WHERE iewb.' . \Ecommerce\Warehouse\Block::colPrefix().\Ecommerce\Item\Offer::index().' = '.\Ecommerce\Item\Offer::index().')
297 297
           )',
298 298
                 0,
299 299
                 '>'
@@ -301,15 +301,15 @@  discard block
 block discarded – undo
301 301
         }
302 302
 
303 303
 
304
-        $selectOptions['join'][] = [Ecommerce\Item\Offer::table(), Ecommerce\Item::index() . ' = ' . Ecommerce\Item\Offer::colPrefix() . Ecommerce\Item::index(), 'inner'];
304
+        $selectOptions['join'][] = [Ecommerce\Item\Offer::table(), Ecommerce\Item::index().' = '.Ecommerce\Item\Offer::colPrefix().Ecommerce\Item::index(), 'inner'];
305 305
         $selectOptions['join'][] = [Ecommerce\Item\Offer\Price::table(),
306
-            Ecommerce\Item\Offer::index() . ' = ' . Ecommerce\Item\Offer\Price::colPrefix() . Ecommerce\Item\Offer::index() . ' and ' . Ecommerce\Item\Offer\Price::colPrefix() . 'price>0', 'inner'];
306
+            Ecommerce\Item\Offer::index().' = '.Ecommerce\Item\Offer\Price::colPrefix().Ecommerce\Item\Offer::index().' and '.Ecommerce\Item\Offer\Price::colPrefix().'price>0', 'inner'];
307 307
         $selectOptions['join'][] = [
308
-            Ecommerce\Item\Offer\Price\Type::table(), Ecommerce\Item\Offer\Price::colPrefix() . Ecommerce\Item\Offer\Price\Type::index() . ' = ' . Ecommerce\Item\Offer\Price\Type::index() .
309
-            ' and (' . Ecommerce\Item\Offer\Price\Type::colPrefix() . 'roles="" || ' . Ecommerce\Item\Offer\Price\Type::colPrefix() . 'roles LIKE "%|' . \Users\User::$cur->role_id . '|%")'
308
+            Ecommerce\Item\Offer\Price\Type::table(), Ecommerce\Item\Offer\Price::colPrefix().Ecommerce\Item\Offer\Price\Type::index().' = '.Ecommerce\Item\Offer\Price\Type::index().
309
+            ' and ('.Ecommerce\Item\Offer\Price\Type::colPrefix().'roles="" || '.Ecommerce\Item\Offer\Price\Type::colPrefix().'roles LIKE "%|'.\Users\User::$cur->role_id.'|%")'
310 310
         ];
311 311
         $selectOptions['where'][] = [
312
-            [Ecommerce\Item\Offer\Price::colPrefix() . Ecommerce\Item\Offer\Price\Type::index(), 0],
312
+            [Ecommerce\Item\Offer\Price::colPrefix().Ecommerce\Item\Offer\Price\Type::index(), 0],
313 313
             [Ecommerce\Item\Offer\Price\Type::index(), 0, '>', 'OR']
314 314
         ];
315 315
 
@@ -332,7 +332,7 @@  discard block
 block discarded – undo
332 332
         $items = Ecommerce\Item::getList($selectOptions);
333 333
         $items = Ecommerce\Item\Param::getList([
334 334
                     'where' => ['item_id', array_keys($items), 'IN'],
335
-                    'join' => [[Ecommerce\Item\Option::table(), Ecommerce\Item\Option::index() . ' = ' . \Ecommerce\Item\Param::colPrefix() .Ecommerce\Item\Option::index(). ' and ' . \Ecommerce\Item\Option::colPrefix() . 'searchable = 1', 'inner']],
335
+                    'join' => [[Ecommerce\Item\Option::table(), Ecommerce\Item\Option::index().' = '.\Ecommerce\Item\Param::colPrefix().Ecommerce\Item\Option::index().' and '.\Ecommerce\Item\Option::colPrefix().'searchable = 1', 'inner']],
336 336
                     'distinct' => \Ecommerce\Item\Option::index()
337 337
         ]);
338 338
         return $items;
@@ -365,7 +365,7 @@  discard block
 block discarded – undo
365 365
         if (is_array($counts)) {
366 366
             $sum = 0;
367 367
             foreach ($counts as $count) {
368
-                $sum +=$count['count'];
368
+                $sum += $count['count'];
369 369
             }
370 370
             return $sum;
371 371
         }
@@ -401,7 +401,7 @@  discard block
 block discarded – undo
401 401
 
402 402
         if (!empty($conf['files']['aditionTemplateFiels'])) {
403 403
             foreach ($conf['files']['aditionTemplateFiels'] as $file) {
404
-                $return[$file['file']] = '- ' . $file['name'];
404
+                $return[$file['file']] = '- '.$file['name'];
405 405
             }
406 406
         }
407 407
         return $return;
Please login to merge, or discard this patch.
system/modules/Libs/Libs.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
     public function loadLib($libName, $options = [])
14 14
     {
15 15
 
16
-        $className = 'Libs\\' . ucfirst($libName);
16
+        $className = 'Libs\\'.ucfirst($libName);
17 17
         if (class_exists($className)) {
18 18
             if (!empty($className::$composerPacks)) {
19 19
                 foreach ($className::$composerPacks as $packageName => $version) {
@@ -25,12 +25,12 @@  discard block
 block discarded – undo
25 25
                     $this->loadLib($rLib);
26 26
                 }
27 27
             }
28
-            if (!empty($className::$files['css']) && (!isset($options['loadCss']) || $options['loadCss'] )) {
28
+            if (!empty($className::$files['css']) && (!isset($options['loadCss']) || $options['loadCss'])) {
29 29
                 foreach ($className::$files['css'] as $file) {
30 30
                     if (strpos($file, '/') === 0 || strpos($file, 'http') === 0) {
31 31
                         App::$cur->view->customAsset('css', $file, $libName);
32 32
                     } else {
33
-                        App::$cur->view->customAsset('css', '/static/libs/vendor/' . ucfirst($libName) . '/' . $file, $libName);
33
+                        App::$cur->view->customAsset('css', '/static/libs/vendor/'.ucfirst($libName).'/'.$file, $libName);
34 34
                     }
35 35
                 }
36 36
             }
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
                     if (strpos($file, '/') === 0 || strpos($file, 'http') === 0) {
40 40
                         App::$cur->view->customAsset('js', $file, $libName);
41 41
                     } else {
42
-                        App::$cur->view->customAsset('js', '/static/libs/vendor/' . ucfirst($libName) . '/' . $file, $libName);
42
+                        App::$cur->view->customAsset('js', '/static/libs/vendor/'.ucfirst($libName).'/'.$file, $libName);
43 43
                     }
44 44
                 }
45 45
             }
@@ -50,30 +50,30 @@  discard block
 block discarded – undo
50 50
     {
51 51
         $libPath = preg_replace('!^libs/!', '', $file);
52 52
         $libName = substr($libPath, 0, strpos($libPath, '/'));
53
-        $className = 'Libs\\' . ucfirst($libName);
53
+        $className = 'Libs\\'.ucfirst($libName);
54 54
         if (class_exists($className)) {
55 55
             if (!empty($className::$programDirs)) {
56 56
                 $fileDir = substr($libPath, strlen($libName) + 1, strpos($libPath, '/', strlen($libName) + 1) - strlen($libName) - 1);
57 57
                 foreach ($className::$programDirs as $programDir) {
58 58
                     if ($programDir == $fileDir) {
59
-                        include $dir . $file;
59
+                        include $dir.$file;
60 60
                         exit();
61 61
                     }
62 62
                 }
63 63
             }
64 64
         }
65
-        return $dir . $file;
65
+        return $dir.$file;
66 66
     }
67 67
 
68 68
     public function getPath($args)
69 69
     {
70 70
         if (!empty($args[0])) {
71
-            $libName = 'Libs\\' . ucfirst($args[0]);
71
+            $libName = 'Libs\\'.ucfirst($args[0]);
72 72
             if (class_exists($libName)) {
73 73
                 $file = implode('/', array_slice($args, 1));
74 74
                 foreach ($libName::$staticDirs as $dir) {
75 75
                     if (strpos($file, $dir) === 0) {
76
-                        return \App::$primary->path . '/vendor/' . $file;
76
+                        return \App::$primary->path.'/vendor/'.$file;
77 77
                     }
78 78
                 }
79 79
             }
Please login to merge, or discard this patch.
system/modules/View/appAdminControllers/content/index.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,8 +15,8 @@
 block discarded – undo
15 15
     foreach ($templates['app']['installed'] as $template => $name) {
16 16
         $table->addRow([
17 17
             $name,
18
-            (empty($templates['app']['current']) || $templates['app']['current'] != $template) ? '<a href = "/admin/view/setDefault/' . $template . '">Установить по умолчанию</a>' : 'Тема по умолчанию',
19
-            '<a href = "/admin/view/editTemplate/' . $template . '">Редактировать</a>'
18
+            (empty($templates['app']['current']) || $templates['app']['current'] != $template) ? '<a href = "/admin/view/setDefault/'.$template.'">Установить по умолчанию</a>' : 'Тема по умолчанию',
19
+            '<a href = "/admin/view/editTemplate/'.$template.'">Редактировать</a>'
20 20
         ]);
21 21
     }
22 22
 $table->draw();
23 23
\ No newline at end of file
Please login to merge, or discard this patch.