Completed
Push — master ( ebb499...f17270 )
by Alexey
03:58
created
system/modules/Dashboard/appAdminControllers/content/siteConfig.php 1 patch
Braces   +24 added lines, -6 removed lines patch added patch discarded remove patch
@@ -2,27 +2,45 @@
 block discarded – undo
2 2
 <form action = '' method = 'POST' enctype="multipart/form-data">
3 3
     <div class ="form-group">
4 4
         <label>Название сайта</label>
5
-        <input class ="form-control" type = 'text' name = 'site_name' value = '<?php if (!empty(\App::$primary->config['site']['name'])) echo \App::$primary->config['site']['name']; ?>' />
5
+        <input class ="form-control" type = 'text' name = 'site_name' value = '<?php if (!empty(\App::$primary->config['site']['name'])) {
6
+    echo \App::$primary->config['site']['name'];
7
+}
8
+?>' />
6 9
     </div>
7 10
     <div class ="form-group">
8 11
         <label>Название компании</label>
9
-        <input class ="form-control" type = 'text' name = 'company_name' value = '<?php if (!empty(\App::$primary->config['site']['company_name'])) echo \App::$primary->config['site']['company_name']; ?>' />
12
+        <input class ="form-control" type = 'text' name = 'company_name' value = '<?php if (!empty(\App::$primary->config['site']['company_name'])) {
13
+    echo \App::$primary->config['site']['company_name'];
14
+}
15
+?>' />
10 16
     </div>
11 17
     <div class ="form-group">
12 18
         <label>Основной домен</label>
13
-        <input class ="form-control" type = 'text' name = 'site_domain' value = '<?php if (!empty(\App::$primary->config['site']['domain'])) echo \App::$primary->config['site']['domain']; ?>' />
19
+        <input class ="form-control" type = 'text' name = 'site_domain' value = '<?php if (!empty(\App::$primary->config['site']['domain'])) {
20
+    echo \App::$primary->config['site']['domain'];
21
+}
22
+?>' />
14 23
     </div>
15 24
     <div class ="form-group">
16 25
         <label>Контактный email</label>
17
-        <input class ="form-control" type = 'text' name = 'site_email' value = '<?php if (!empty(\App::$primary->config['site']['email'])) echo \App::$primary->config['site']['email']; ?>' />
26
+        <input class ="form-control" type = 'text' name = 'site_email' value = '<?php if (!empty(\App::$primary->config['site']['email'])) {
27
+    echo \App::$primary->config['site']['email'];
28
+}
29
+?>' />
18 30
     </div>
19 31
     <div class ="form-group">
20 32
         <label>Ключевые слова</label>
21
-        <input class ="form-control" type = 'text' name = 'site_keywords' value = '<?php if (!empty(\App::$primary->config['site']['keywords'])) echo \App::$primary->config['site']['keywords']; ?>' />
33
+        <input class ="form-control" type = 'text' name = 'site_keywords' value = '<?php if (!empty(\App::$primary->config['site']['keywords'])) {
34
+    echo \App::$primary->config['site']['keywords'];
35
+}
36
+?>' />
22 37
     </div>
23 38
     <div class ="form-group">
24 39
         <label>Краткое описание сайта</label>
25
-        <input class ="form-control" type = 'text' name = 'site_description' value = '<?php if (!empty(\App::$primary->config['site']['description'])) echo \App::$primary->config['site']['description']; ?>' />
40
+        <input class ="form-control" type = 'text' name = 'site_description' value = '<?php if (!empty(\App::$primary->config['site']['description'])) {
41
+    echo \App::$primary->config['site']['description'];
42
+}
43
+?>' />
26 44
     </div>
27 45
     <?php
28 46
     $form = new Ui\Form();
Please login to merge, or discard this patch.
system/modules/Modules/appAdminControllers/content/install.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,8 +6,9 @@
 block discarded – undo
6 6
   $systemModules = array_slice(scandir(INJI_SYSTEM_DIR . '/modules'), 2);
7 7
   foreach ($systemModules as $module) {
8 8
       $info = Module::getInfo($module);
9
-      if (!$info || isset($modules[$module]))
10
-          continue;
9
+      if (!$info || isset($modules[$module])) {
10
+                continue;
11
+      }
11 12
       ?>
12 13
         <div class ="form-group">
13 14
             <div class="checkbox">
Please login to merge, or discard this patch.
system/modules/Users/snippets/cabinetSection/usersTree.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-if (App::$cur->users->config['invites']) {
3
+if (App::$cur->users->config['invites']) {
4 4
     return [
5 5
         'name' => 'Мои партнеры',
6 6
         'fullWidget' => 'Users\cabinet/usersTree'
Please login to merge, or discard this patch.
system/modules/View/appAdminControllers/content/Template/chooseFile.php 1 patch
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2,8 +2,8 @@
 block discarded – undo
2 2
 <a href ='/admin/view/template/editFile/<?= $template->name; ?>?path=<?= $template->config['file']; ?>'>Основной файл темы</a>
3 3
 <hr/>
4 4
 <?php
5
-foreach ($template->config['css'] as $file) {
6
-    if (file_exists($template->path . '/css/' . $file)) {
5
+foreach ($template->config['css'] as $file) {
6
+    if (file_exists($template->path . '/css/' . $file)) {
7 7
         ?>
8 8
         <a href ='/admin/view/template/editFile/<?= $template->name; ?>?path=<?= 'css/' . $file; ?>'><?= $file; ?></a>
9 9
         <?php
Please login to merge, or discard this patch.
system/modules/View/appAdminControllers/content/index.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,12 +11,13 @@
 block discarded – undo
11 11
     '',
12 12
     ''
13 13
 ]);
14
-if (!empty($templates['app']['installed']))
14
+if (!empty($templates['app']['installed'])) {
15 15
     foreach ($templates['app']['installed'] as $template => $name) {
16 16
         $table->addRow([
17 17
             $name,
18 18
             (empty($templates['app']['current']) || $templates['app']['current'] != $template) ? '<a href = "/admin/view/setDefault/' . $template . '">Установить по умолчанию</a>' : 'Тема по умолчанию',
19 19
             '<a href = "/admin/view/template/editFile/' . $template . '">Файлы</a> <a href = "/admin/view/editTemplate/' . $template . '">Редактировать</a>'
20 20
         ]);
21
+}
21 22
     }
22 23
 $table->draw();
Please login to merge, or discard this patch.
system/modules/Money/snippets/userActivity/lastPurchase.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 
3 3
 return [
4 4
     'name' => 'Последняя покупка не позднее 90 дней',
5
-    'checker' => function($user) {
5
+    'checker' => function($user) {
6 6
         $query = 'SELECT * FROM inji_ecommerce_cart iec WHERE iec.cart_cart_status_id >= 5 AND iec.cart_date_create >= NOW() - INTERVAL 90 DAY AND cart_user_id = ?';
7 7
         $result = \App::$cur->db->query(['query' => $query, 'params' => [$user->id]]);
8 8
         return (bool) $result ? $result->fetch() : false;
Please login to merge, or discard this patch.
system/modules/Money/widgets/cabinet/walletsWidget.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 <?php
3 3
 $blocked = App::$cur->money->getUserBlocks();
4 4
 $wallets = App::$cur->money->getUserWallets();
5
-foreach ($wallets as $wallet) {
5
+foreach ($wallets as $wallet) {
6 6
     ?>
7 7
     <b><?= $wallet->showAmount(); ?></b> <?= $wallet->currency->acronym(); ?><br />
8 8
     <?php
Please login to merge, or discard this patch.
system/modules/UserForms/widgets/userForm.php 1 patch
Braces   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,13 +1,13 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if (!empty($params[0])) {
2
+if (!empty($params[0])) {
3 3
     $form_id = $params[0];
4 4
 }
5
-if (empty($form_id)) {
5
+if (empty($form_id)) {
6 6
     echo('form not found');
7 7
     return;
8 8
 }
9 9
 $userForm = \UserForms\Form::get((int) $form_id);
10
-if (!$userForm) {
10
+if (!$userForm) {
11 11
     echo('form not found');
12 12
     return;
13 13
 }
@@ -15,10 +15,10 @@  discard block
 block discarded – undo
15 15
 $form->begin();
16 16
 ?>
17 17
 <?php
18
-if ($userForm->description) {
18
+if ($userForm->description) {
19 19
     echo "<p class = 'text-center'>{$userForm->description}</p>";
20 20
 }
21
-foreach ($userForm->inputs(['order' => ['weight']]) as $input) {
21
+foreach ($userForm->inputs(['order' => ['weight']]) as $input) {
22 22
     $form->input($input->type, 'UserForms[' . (int) $form_id . '][input' . $input->id . ']', $input->label, ['required' => $input->required]);
23 23
 }
24 24
 ?>
Please login to merge, or discard this patch.
system/Inji/Model.php 1 patch
Braces   +39 added lines, -30 removed lines patch added patch discarded remove patch
@@ -898,22 +898,27 @@  discard block
 block discarded – undo
898 898
         if (!$query) {
899 899
             return [];
900 900
         }
901
-        if (!empty($options['where']))
902
-            $query->where($options['where']);
903
-        if (!empty($options['cols']))
904
-            $query->cols = $options['cols'];
901
+        if (!empty($options['where'])) {
902
+                    $query->where($options['where']);
903
+        }
904
+        if (!empty($options['cols'])) {
905
+                    $query->cols = $options['cols'];
906
+        }
905 907
         if (!empty($options['group'])) {
906 908
             $query->group($options['group']);
907 909
         }
908 910
         if (!empty($options['having'])) {
909 911
             $query->having($options['having']);
910 912
         }
911
-        if (!empty($options['order']))
912
-            $query->order($options['order']);
913
-        if (!empty($options['join']))
914
-            $query->join($options['join']);
915
-        if (!empty($options['distinct']))
916
-            $query->distinct = $options['distinct'];
913
+        if (!empty($options['order'])) {
914
+                    $query->order($options['order']);
915
+        }
916
+        if (!empty($options['join'])) {
917
+                    $query->join($options['join']);
918
+        }
919
+        if (!empty($options['distinct'])) {
920
+                    $query->distinct = $options['distinct'];
921
+        }
917 922
 
918 923
         foreach (static::$relJoins as $join) {
919 924
             $query->join($join[0], $join[1]);
@@ -939,14 +944,14 @@  discard block
 block discarded – undo
939 944
         }
940 945
         static::$needJoin = [];
941 946
 
942
-        if (!empty($options['limit']))
943
-            $limit = (int) $options['limit'];
944
-        else {
947
+        if (!empty($options['limit'])) {
948
+                    $limit = (int) $options['limit'];
949
+        } else {
945 950
             $limit = 0;
946 951
         }
947
-        if (!empty($options['start']))
948
-            $start = (int) $options['start'];
949
-        else {
952
+        if (!empty($options['start'])) {
953
+                    $start = (int) $options['start'];
954
+        } else {
950 955
             $start = 0;
951 956
         }
952 957
         if ($limit || $start) {
@@ -1221,21 +1226,23 @@  discard block
 block discarded – undo
1221 1226
         if (!empty($options['group'])) {
1222 1227
             static::fixPrefix($options['group'], 'first');
1223 1228
         }
1224
-        if (!empty($options['where']))
1225
-            $query->where($options['where']);
1226
-        if (!empty($options['join']))
1227
-            $query->join($options['join']);
1229
+        if (!empty($options['where'])) {
1230
+                    $query->where($options['where']);
1231
+        }
1232
+        if (!empty($options['join'])) {
1233
+                    $query->join($options['join']);
1234
+        }
1228 1235
         if (!empty($options['order'])) {
1229 1236
             $query->order($options['order']);
1230 1237
         }
1231
-        if (!empty($options['limit']))
1232
-            $limit = (int) $options['limit'];
1233
-        else {
1238
+        if (!empty($options['limit'])) {
1239
+                    $limit = (int) $options['limit'];
1240
+        } else {
1234 1241
             $limit = 0;
1235 1242
         }
1236
-        if (!empty($options['start']))
1237
-            $start = (int) $options['start'];
1238
-        else {
1243
+        if (!empty($options['start'])) {
1244
+                    $start = (int) $options['start'];
1245
+        } else {
1239 1246
             $start = 0;
1240 1247
         }
1241 1248
         if ($limit || $start) {
@@ -1312,8 +1319,9 @@  discard block
 block discarded – undo
1312 1319
 
1313 1320
         $values = [];
1314 1321
         foreach ($cols as $col => $param) {
1315
-            if (isset($params[$col]))
1316
-                $values[$col] = $params[$col];
1322
+            if (isset($params[$col])) {
1323
+                            $values[$col] = $params[$col];
1324
+            }
1317 1325
         }
1318 1326
         if (empty($values)) {
1319 1327
             return false;
@@ -1650,8 +1658,9 @@  discard block
 block discarded – undo
1650 1658
     public static function findRelation($col) {
1651 1659
 
1652 1660
         foreach (static::relations() as $relName => $rel) {
1653
-            if ($rel['col'] == $col)
1654
-                return $relName;
1661
+            if ($rel['col'] == $col) {
1662
+                            return $relName;
1663
+            }
1655 1664
         }
1656 1665
         return NULL;
1657 1666
     }
Please login to merge, or discard this patch.