Completed
Push — master ( 4b8bb5...60b638 )
by Alexey
04:19
created
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   +5 added lines, -4 removed lines patch added patch discarded remove patch
@@ -42,10 +42,11 @@
 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
+                                  } else {
48
+                                                                        $selected = '';
49
+                                  }
49 50
                                   echo "<option {$selected} value = '{$role['role_id']}'>{$role['role_name']}</option>";
50 51
                               }
51 52
                               ?>
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 1 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.
system/modules/Users/appControllers/UsersController.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -167,14 +167,14 @@
 block discarded – undo
167 167
                 <h5 class="<?= $complete ? 'text-success' : 'text-danger'; ?>"><?= $condition->name(); ?></h5>
168 168
                 <ul>
169 169
                   <?php
170
-                  foreach ($condition->items as $item) {
171
-                      $itemComplete = $item->checkComplete($userId);
172
-                      switch ($item->type) {
173
-                          case 'event':
170
+                    foreach ($condition->items as $item) {
171
+                        $itemComplete = $item->checkComplete($userId);
172
+                        switch ($item->type) {
173
+                            case 'event':
174 174
                               $name = \Events\Event::get($item->value, 'event')->name();
175
-                              break;
176
-                      }
177
-                      ?>
175
+                                break;
176
+                        }
177
+                        ?>
178 178
                         <li> 
179 179
                             <b class="<?= $itemComplete ? 'text-success' : 'text-danger'; ?>"><?= $name; ?> <?= $item->recivedCount($userId); ?></b>/<?= $item->count; ?> <br />
180 180
                         </li>
Please login to merge, or discard this patch.
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -138,13 +138,13 @@
 block discarded – undo
138 138
         $userId = (int) $userId;
139 139
         $result = new \Server\Result();
140 140
         if (!$userId) {
141
-            $result->success = FALSE;
141
+            $result->success = false;
142 142
             $result->content = 'Не указан пользователь';
143 143
             $result->send();
144 144
         }
145 145
         $partners = App::$cur->users->getUserPartners(Users\User::$cur, 8);
146 146
         if (empty($partners['users'][$userId])) {
147
-            $result->success = FALSE;
147
+            $result->success = false;
148 148
             $result->content = 'Этот пользователь не находится в вашей структуре';
149 149
             $result->send();
150 150
         }
Please login to merge, or discard this patch.
system/modules/Users/appControllers/content/cabinet.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -26,12 +26,12 @@
 block discarded – undo
26 26
                 </div>
27 27
                 <div class="col-sm-9">
28 28
                   <?php
29
-                  if (empty($activeSection) || empty($sections[$activeSection]['fullWidget'])) {
30
-                      foreach ($sections as $section) {
31
-                          if (!empty($section['smallWidget'])) {
32
-                              $widgetName = is_array($section['smallWidget']) ? $section['smallWidget']['widget'] : $section['smallWidget'];
33
-                              $widgetSize = !empty($section['smallWidget']['size']) ? $section['smallWidget']['size'] : 1;
34
-                              ?>
29
+                    if (empty($activeSection) || empty($sections[$activeSection]['fullWidget'])) {
30
+                        foreach ($sections as $section) {
31
+                            if (!empty($section['smallWidget'])) {
32
+                                $widgetName = is_array($section['smallWidget']) ? $section['smallWidget']['widget'] : $section['smallWidget'];
33
+                                $widgetSize = !empty($section['smallWidget']['size']) ? $section['smallWidget']['size'] : 1;
34
+                                ?>
35 35
                                 <div class="col-sm-<?= $widgetSize * 4; ?>" style="margin-bottom: 10px;"><?= $this->widget($widgetName); ?></div>
36 36
                                 <?php
37 37
                             }
Please login to merge, or discard this patch.
system/modules/Users/appControllers/content/registration.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,8 +41,8 @@
 block discarded – undo
41 41
                     <div class ='row'>
42 42
                         <div class="col-sm-6">
43 43
                           <?php
44
-                          if (!empty(App::$cur->users->config['invites'])) {
45
-                              ?>
44
+                            if (!empty(App::$cur->users->config['invites'])) {
45
+                                ?>
46 46
                                 <div class ='form-group'>
47 47
                                     <label><?= !empty(App::$cur->users->config['invitesName']) ? App::$cur->users->config['invitesName'] : 'Код приглашения'; ?></label>
48 48
                                     <input type ='text' name ='invite_code' class ='form-control' value ="<?= (isset($_POST['invite_code']) ? $_POST['invite_code'] : ((!empty($_COOKIE['invite_code']) ? $_COOKIE['invite_code'] : ((!empty($_GET['invite_code']) ? $_GET['invite_code'] : ''))))); ?>" />
Please login to merge, or discard this patch.
system/modules/Users/appControllers/content/login.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -5,15 +5,15 @@
 block discarded – undo
5 5
                 <h3>Вход</h3>
6 6
                 <div class="form-group">
7 7
                   <?php
8
-                  $socials = Users\Social::getList(['where' => ['active', 1]]);
9
-                  if ($socials) {
10
-                      echo 'Войти через: ';
11
-                      foreach (Users\Social::getList(['where' => ['active', 1]]) as $social) {
12
-                          $text = $social->image ? '<img src ="' . Statics::file($social->image->path) . '">' : $social->name();
13
-                          echo "<a href = '/users/social/auth/{$social->code}'>{$text}</a> ";
14
-                      }
15
-                  }
16
-                  ?>
8
+                    $socials = Users\Social::getList(['where' => ['active', 1]]);
9
+                    if ($socials) {
10
+                        echo 'Войти через: ';
11
+                        foreach (Users\Social::getList(['where' => ['active', 1]]) as $social) {
12
+                            $text = $social->image ? '<img src ="' . Statics::file($social->image->path) . '">' : $social->name();
13
+                            echo "<a href = '/users/social/auth/{$social->code}'>{$text}</a> ";
14
+                        }
15
+                    }
16
+                    ?>
17 17
                 </div>
18 18
                 <form action = '' method = 'POST' >
19 19
                     <div class ='row'>
Please login to merge, or discard this patch.
system/modules/Ui/appAdminControllers/content/dataManager/view.php 2 patches
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -35,11 +35,11 @@  discard block
 block discarded – undo
35 35
 ?>
36 36
 <div>
37 37
     <h3>Комментарии (<?=
38
-      \Dashboard\Comment::getCount(['where' => [
39
-              ['item_id', $item->id],
40
-              ['model', $modelName],
41
-      ]]);
42
-      ?>)</h3>
38
+        \Dashboard\Comment::getCount(['where' => [
39
+                ['item_id', $item->id],
40
+                ['model', $modelName],
41
+        ]]);
42
+        ?>)</h3>
43 43
     <?php
44 44
     foreach (\Dashboard\Comment::getList([ 'where' => [
45 45
             ['item_id', $item->id],
@@ -61,11 +61,11 @@  discard block
 block discarded – undo
61 61
 </div>
62 62
 <div>
63 63
   <?php
64
-  $form = new \Ui\Form();
65
-  $form->begin('Оставить комментарий');
66
-  $form->input('textarea', 'comment', 'Комментарий');
67
-  $form->end();
68
-  ?>
64
+    $form = new \Ui\Form();
65
+    $form->begin('Оставить комментарий');
66
+    $form->input('textarea', 'comment', 'Комментарий');
67
+    $form->end();
68
+    ?>
69 69
 </div>
70 70
 <div>
71 71
     <h1>Хронология</h1>
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
       ]]);
42 42
       ?>)</h3>
43 43
     <?php
44
-    foreach (\Dashboard\Comment::getList([ 'where' => [
44
+    foreach (\Dashboard\Comment::getList(['where' => [
45 45
             ['item_id', $item->id],
46 46
             ['model', $modelName],
47 47
         ], 'order' => ['date_create', 'desc']]) as $comment) {
Please login to merge, or discard this patch.
system/modules/Ui/objects/ActiveForm/Input/ChangePassword.php 1 patch
Upper-Lower-Casing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -17,15 +17,15 @@
 block discarded – undo
17 17
         if (!empty($request[$this->colName]['pass']) && !empty($request[$this->colName]['pass'])) {
18 18
             if (empty($request[$this->colName]['pass'])) {
19 19
                 \Msg::add('Вы не ввели пароль в первое поле', 'danger');
20
-                return FALSE;
20
+                return false;
21 21
             }
22 22
             if (empty($request[$this->colName]['repeat'])) {
23 23
                 \Msg::add('Вы не ввели пароль во второе поле', 'danger');
24
-                return FALSE;
24
+                return false;
25 25
             }
26 26
             if ($request[$this->colName]['pass'] != $request[$this->colName]['repeat']) {
27 27
                 \Msg::add('Введенные пароли не совпадают', 'danger');
28
-                return FALSE;
28
+                return false;
29 29
             }
30 30
             $this->activeForm->model->{$this->colName} = \App::$cur->users->hashpass($request[$this->colName]['pass']);
31 31
         }
Please login to merge, or discard this patch.