Completed
Push — master ( 308a3c...ebb499 )
by Alexey
08:08
created
system/modules/Callbacks/Callbacks.php 1 patch
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -18,19 +18,22 @@
 block discarded – undo
18 18
             if (empty($callbacksData['text'])) {
19 19
                 $error = true;
20 20
                 Msg::add('Вы не написали текст отзыва');
21
-            } else {
21
+            }
22
+            else {
22 23
                 $callback->text = nl2br(htmlspecialchars($callbacksData['text']));
23 24
             }
24 25
             if (empty($callbacksData['name'])) {
25 26
                 $error = true;
26 27
                 Msg::add('Вы не указали свое имя');
27
-            } else {
28
+            }
29
+            else {
28 30
                 $callback->name = htmlspecialchars($callbacksData['name']);
29 31
             }
30 32
             if (empty($callbacksData['phone'])) {
31 33
                 $error = true;
32 34
                 Msg::add('Вы не указали свой номер телефона');
33
-            } else {
35
+            }
36
+            else {
34 37
                 $callback->phone = htmlspecialchars($callbacksData['phone']);
35 38
             }
36 39
             $files = filter_var($_FILES['Callbacks'], FILTER_REQUIRE_ARRAY);
Please login to merge, or discard this patch.
system/modules/Callbacks/models/Category.php 1 patch
Braces   +8 added lines, -4 removed lines patch added patch discarded remove patch
@@ -69,9 +69,11 @@  discard block
 block discarded – undo
69 69
     public function resolveTemplate() {
70 70
         if ($this->template !== 'inherit') {
71 71
             return $this->template;
72
-        } elseif ($this->template == 'inherit' && $this->category) {
72
+        }
73
+        elseif ($this->template == 'inherit' && $this->category) {
73 74
             return $this->category->resolveTemplate(true);
74
-        } else {
75
+        }
76
+        else {
75 77
             return 'current';
76 78
         }
77 79
     }
@@ -79,9 +81,11 @@  discard block
 block discarded – undo
79 81
     public function resolveViewer() {
80 82
         if ($this->viewer !== 'inherit') {
81 83
             return $this->viewer;
82
-        } elseif ($this->viewer == 'inherit' && $this->category) {
84
+        }
85
+        elseif ($this->viewer == 'inherit' && $this->category) {
83 86
             return $this->category->resolveViewer(true);
84
-        } else {
87
+        }
88
+        else {
85 89
             return (!empty(App::$cur->ecommerce->config['defaultCategoryView']) ? App::$cur->ecommerce->config['defaultCategoryView'] : 'itemList');
86 90
         }
87 91
     }
Please login to merge, or discard this patch.
system/modules/Callbacks/appControllers/CallbacksController.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,8 @@
 block discarded – undo
20 20
         }
21 21
         if ($category) {
22 22
             $callbacks = $category->callbacks(['where' => [['view', 1]], 'order' => ['weight', 'asc']]);
23
-        } else {
23
+        }
24
+        else {
24 25
             $callbacks = Callbacks\Callback::getList(['where' => [['category_id', 0], ['view', 1]], 'order' => ['weight', 'asc']]);
25 26
         }
26 27
         $this->view->setTitle($category ? $category->name : 'Отзывы');
Please login to merge, or discard this patch.
system/modules/Menu/widgets/menu.php 1 patch
Braces   +12 added lines, -8 removed lines patch added patch discarded remove patch
@@ -9,18 +9,22 @@
 block discarded – undo
9 9
 $menu = \Menu\Menu::get($code, 'code');
10 10
 if ($menu) {
11 11
     foreach ($menu->items(['where' => ['parent_id', 0], 'order' => ['weight', 'asc']]) as $item) {
12
-        if (urldecode($_SERVER['REQUEST_URI']) == $item->href)
13
-            $active = ' class = "active" ';
14
-        else
15
-            $active = '';
12
+        if (urldecode($_SERVER['REQUEST_URI']) == $item->href) {
13
+                    $active = ' class = "active" ';
14
+        }
15
+        else {
16
+                    $active = '';
17
+        }
16 18
         echo "<li {$active}><a href = '{$item->href}'>{$item->name}</a>";
17 19
         if ($item->childs(['order' => ['weight', 'asc']])) {
18 20
             echo "<ul>";
19 21
             foreach ($item->childs as $item) {
20
-                if (urldecode($_SERVER['REQUEST_URI']) == $item->href)
21
-                    $active = ' class = "active" ';
22
-                else
23
-                    $active = '';
22
+                if (urldecode($_SERVER['REQUEST_URI']) == $item->href) {
23
+                                    $active = ' class = "active" ';
24
+                }
25
+                else {
26
+                                    $active = '';
27
+                }
24 28
                 echo "<li {$active}><a href = '{$item->href}'>{$item->name}</a>";
25 29
             }
26 30
             echo "</ul>";
Please login to merge, or discard this patch.
system/modules/Users/appAdminControllers/UsersController.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,8 @@
 block discarded – undo
13 13
     public function loginAction() {
14 14
         if (!Users\User::$cur->user_id) {
15 15
             $this->view->page(['page' => 'login', 'content' => 'login']);
16
-        } else {
16
+        }
17
+        else {
17 18
             $this->view->page(['content' => 'profile']);
18 19
         }
19 20
     }
Please login to merge, or discard this patch.
system/modules/Users/appAdminControllers/content/create.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -42,10 +42,10 @@
 block discarded – undo
42 42
                         <div class="col-lg-10">
43 43
                             <select class="form-control" name = 'user_role_id'>
44 44
                               <?php
45
-                              foreach ($roles as $role) {
46
-                                  echo "<option value = '{$role['role_id']}'>{$role['role_name']}</option>";
47
-                              }
48
-                              ?>
45
+                                foreach ($roles as $role) {
46
+                                    echo "<option value = '{$role['role_id']}'>{$role['role_name']}</option>";
47
+                                }
48
+                                ?>
49 49
                             </select>
50 50
                         </div>
51 51
                     </div>
Please login to merge, or discard this patch.
system/modules/Users/appAdminControllers/content/edit.php 2 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -41,14 +41,14 @@
 block discarded – undo
41 41
                         <div class="col-lg-10">
42 42
                             <select class="form-control" name = 'user_role_id'>
43 43
                               <?php
44
-                              foreach ($roles as $role) {
45
-                                  if ($role['role_id'] == $user->user_role_id)
46
-                                      $selected = 'selected = "selected"';
47
-                                  else
48
-                                      $selected = '';
49
-                                  echo "<option {$selected} value = '{$role['role_id']}'>{$role['role_name']}</option>";
50
-                              }
51
-                              ?>
44
+                                foreach ($roles as $role) {
45
+                                    if ($role['role_id'] == $user->user_role_id)
46
+                                        $selected = 'selected = "selected"';
47
+                                    else
48
+                                        $selected = '';
49
+                                    echo "<option {$selected} value = '{$role['role_id']}'>{$role['role_name']}</option>";
50
+                                }
51
+                                ?>
52 52
                             </select>
53 53
                         </div>
54 54
                     </div>
Please login to merge, or discard this patch.
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -42,10 +42,12 @@
 block discarded – undo
42 42
                             <select class="form-control" name = 'user_role_id'>
43 43
                               <?php
44 44
                               foreach ($roles as $role) {
45
-                                  if ($role['role_id'] == $user->user_role_id)
46
-                                      $selected = 'selected = "selected"';
47
-                                  else
48
-                                      $selected = '';
45
+                                  if ($role['role_id'] == $user->user_role_id) {
46
+                                                                        $selected = 'selected = "selected"';
47
+                                  }
48
+                                  else {
49
+                                                                        $selected = '';
50
+                                  }
49 51
                                   echo "<option {$selected} value = '{$role['role_id']}'>{$role['role_name']}</option>";
50 52
                               }
51 53
                               ?>
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/Users/objects/SocialHelper/Vk.php 2 patches
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -62,7 +62,8 @@  discard block
 block discarded – undo
62 62
             if (!empty(\App::$cur->users->config['loginUrl'][\App::$cur->type])) {
63 63
                 \Tools::redirect(\App::$cur->users->config['loginUrl'][\App::$cur->type]);
64 64
             }
65
-        } else {
65
+        }
66
+        else {
66 67
             if ($userSocial && !$userSocial->user) {
67 68
                 $userSocial->delete();
68 69
             }
@@ -104,7 +105,8 @@  discard block
 block discarded – undo
104 105
                     $userInfo->user_id = $user->id;
105 106
                     $userInfo->save();
106 107
                 }
107
-            } else {
108
+            }
109
+            else {
108 110
                 $user = \Users\User::$cur;
109 111
             }
110 112
             if (!$user->info->photo_file_id && !empty($userDetail['response'][0]['photo_max_orig'])) {
@@ -172,7 +174,8 @@  discard block
 block discarded – undo
172 174
             $social->social_id = 1;
173 175
             $social->uid = $userResult['response'][0]['uid'];
174 176
             $social->save();
175
-        } else {
177
+        }
178
+        else {
176 179
             $user = $socUser->user;
177 180
         }
178 181
         return $user;
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -145,7 +145,7 @@
 block discarded – undo
145 145
         $auth_key = md5($config['appId'] . '_' . $viewer_id . '_' . $config['secret']);
146 146
 
147 147
         if ($auth_key !== $get_auth_key) {
148
-            return FALSE;
148
+            return false;
149 149
         }
150 150
         $userQuery = [
151 151
             'user_id' => $viewer_id,
Please login to merge, or discard this patch.