Completed
Push — master ( c52a8b...f81666 )
by Alexey
06:18
created
system/modules/UserForms/widgets/userForm.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -14,29 +14,29 @@
 block discarded – undo
14 14
 ?>
15 15
 <form method = "POST" action = "">
16 16
   <?php
17
-  if ($form->description) {
18
-      echo "<p class = 'text-center'>{$form->description}</p>";
19
-  }
20
-  foreach ($form->inputs as $input) {
21
-      switch ($input->type) {
22
-          case 'text':
17
+    if ($form->description) {
18
+        echo "<p class = 'text-center'>{$form->description}</p>";
19
+    }
20
+    foreach ($form->inputs as $input) {
21
+        switch ($input->type) {
22
+            case 'text':
23 23
               ?>
24 24
               <div class ='form-group'>
25 25
                 <label><?= $input->label; ?></label>
26 26
                 <input class ='form-control' type ='text' name ='UserForms[<?= (int) $form_id; ?>][input<?= $input->id; ?>]' <?= $input->required ? 'required' : ''; ?> />
27 27
               </div>
28 28
               <?php
29
-              break;
30
-          case 'textarea':
29
+                break;
30
+            case 'textarea':
31 31
               ?>
32 32
               <div class ='form-group'>
33 33
                 <label><?= $input->label; ?></label>
34 34
                 <textarea class ='form-control' name ='UserForms[<?= (int) $form_id; ?>][input<?= $input->id; ?>]' <?= $input->required ? 'required' : ''; ?> /></textarea>
35 35
               </div>
36 36
               <?php
37
-              break;
38
-      }
39
-  }
40
-  ?>
37
+                break;
38
+        }
39
+    }
40
+    ?>
41 41
   <button class = 'btn btn-success btn-block'>Отправить</button>
42 42
 </form>
43 43
\ No newline at end of file
Please login to merge, or discard this patch.
system/modules/Users/appAdminControllers/content/edit.php 1 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/appControllers/UsersController.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -168,20 +168,20 @@
 block discarded – undo
168 168
                 <h5 class="<?= $complete ? 'text-success' : 'text-danger'; ?>"><?= $condition->name(); ?></h5>
169 169
                 <ul>
170 170
                   <?php
171
-                  foreach ($condition->items as $item) {
172
-                      $itemComplete = $item->checkComplete($userId);
173
-                      switch ($item->type) {
174
-                          case 'event':
171
+                    foreach ($condition->items as $item) {
172
+                        $itemComplete = $item->checkComplete($userId);
173
+                        switch ($item->type) {
174
+                            case 'event':
175 175
                               $name = \Events\Event::get($item->value, 'event')->name();
176
-                              break;
177
-                      }
178
-                      ?>
176
+                                break;
177
+                        }
178
+                        ?>
179 179
                       <li> 
180 180
                         <b class="<?= $itemComplete ? 'text-success' : 'text-danger'; ?>"><?= $name; ?> <?= $item->recivedCount($userId); ?></b>/<?= $item->count; ?> <br />
181 181
                       </li>
182 182
                       <?php
183
-                  }
184
-                  ?>
183
+                    }
184
+                    ?>
185 185
                 </ul>
186 186
                 <?php
187 187
             }
Please login to merge, or discard this patch.
system/modules/Users/appControllers/content/cabinet.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -24,20 +24,20 @@
 block discarded – undo
24 24
     </div>
25 25
     <div class="col-sm-9">
26 26
       <?php
27
-      if (empty($activeSection) || empty($sections[$activeSection]['fullWidget'])) {
28
-          foreach ($sections as $section) {
29
-              if (!empty($section['smallWidget'])) {
30
-                  $widgetName = is_array($section['smallWidget']) ? $section['smallWidget']['widget'] : $section['smallWidget'];
31
-                  $widgetSize = !empty($section['smallWidget']['size']) ? $section['smallWidget']['size'] : 1;
32
-                  ?>
27
+        if (empty($activeSection) || empty($sections[$activeSection]['fullWidget'])) {
28
+            foreach ($sections as $section) {
29
+                if (!empty($section['smallWidget'])) {
30
+                    $widgetName = is_array($section['smallWidget']) ? $section['smallWidget']['widget'] : $section['smallWidget'];
31
+                    $widgetSize = !empty($section['smallWidget']['size']) ? $section['smallWidget']['size'] : 1;
32
+                    ?>
33 33
                   <div class="col-sm-<?= $widgetSize * 4; ?>" style="margin-bottom: 10px;"><?= $this->widget($widgetName); ?></div>
34 34
                   <?php
35
-              }
36
-          }
37
-      } else {
38
-          $this->widget($sections[$activeSection]['fullWidget']);
39
-      }
40
-      ?>
35
+                }
36
+            }
37
+        } else {
38
+            $this->widget($sections[$activeSection]['fullWidget']);
39
+        }
40
+        ?>
41 41
     </div>
42 42
   </div>
43 43
 </div>
44 44
\ No newline at end of file
Please login to merge, or discard this patch.
system/modules/Users/appControllers/content/registration.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -8,10 +8,10 @@  discard block
 block discarded – undo
8 8
         <div class="form-group">
9 9
           <label>Регистрация через соц.сети</label><br />
10 10
           <?php
11
-          foreach (Users\Social::getList(['where' => ['active', 1]]) as $social) {
12
-              echo "<a href = '/users/social/auth/{$social->code}'>{$social->name()}</a> ";
13
-          }
14
-          ?>
11
+            foreach (Users\Social::getList(['where' => ['active', 1]]) as $social) {
12
+                echo "<a href = '/users/social/auth/{$social->code}'>{$social->name()}</a> ";
13
+            }
14
+            ?>
15 15
         </div>
16 16
         <?php
17 17
     }
@@ -27,15 +27,15 @@  discard block
 block discarded – undo
27 27
           <?php $form->input('date', 'user_birthday', 'Дата рождения'); ?>
28 28
           <?php $form->input('text', 'user_city', 'Город'); ?>
29 29
           <?php
30
-          if (!empty(App::$cur->users->config['invites'])) {
31
-              ?>
30
+            if (!empty(App::$cur->users->config['invites'])) {
31
+                ?>
32 32
               <div class ='form-group'>
33 33
                 <label><?= !empty(App::$cur->users->config['invitesName']) ? App::$cur->users->config['invitesName'] : 'Код приглашения'; ?></label>
34 34
                 <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'] : ''))))); ?>" />
35 35
               </div>   
36 36
               <?php
37
-          }
38
-          ?>
37
+            }
38
+            ?>
39 39
         </div>
40 40
         <div class="col-sm-6">
41 41
           <div class ='form-group'>
Please login to merge, or discard this patch.
Users/extensions/Dashboard/snippets/adminDashboardWidget/userStatistic.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
           <div class="panel-heading">Пользователи</div>
7 7
           <div class="panel-body">
8 8
             <p>Всего: <?= Users\User::getCount(); ?></p>
9
-            <p>Новых сегодня: <?= Users\User::getCount(['where'=>['date_create',date('Y-m-d 00:00:00'),'>']]); ?></p>
9
+            <p>Новых сегодня: <?= Users\User::getCount(['where'=>['date_create', date('Y-m-d 00:00:00'), '>']]); ?></p>
10 10
           </div>
11 11
           <div class="panel-footer">
12 12
             <a href ="/admin/users/User">Управление</a>
Please login to merge, or discard this patch.
system/modules/Users/install_script.php 1 patch
Spacing   +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
-return function ($step = NULL, $params = []) {
3
+return function($step = NULL, $params = []) {
4 4
 
5 5
     $groups = [
6 6
         [
Please login to merge, or discard this patch.
system/modules/Users/models/Group.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Group
4
- *
5
- * @author Alexey Krupskiy <[email protected]>
6
- * @link http://inji.ru/
7
- * @copyright 2015 Alexey Krupskiy
8
- * @license https://github.com/injitools/cms-Inji/blob/master/LICENSE
9
- */
3
+     * Group
4
+     *
5
+     * @author Alexey Krupskiy <[email protected]>
6
+     * @link http://inji.ru/
7
+     * @copyright 2015 Alexey Krupskiy
8
+     * @license https://github.com/injitools/cms-Inji/blob/master/LICENSE
9
+     */
10 10
 namespace Users;
11 11
 
12 12
 class Group extends \Model
Please login to merge, or discard this patch.
system/modules/Users/models/User.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
         'role_id' => ['type' => 'select', 'source' => 'relation', 'relation' => 'role'],
38 38
         'admin_text' => ['type' => 'html'],
39 39
         'activation' => ['type' => 'text'],
40
-        'blocked' => ['type' => 'bool',],
40
+        'blocked' => ['type' => 'bool', ],
41 41
         'date_last_active' => ['type' => 'dateTime'],
42 42
         'date_create' => ['type' => 'dateTime']
43 43
     ];
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
                 ]
101 101
             ],
102 102
             'map' => [
103
-                ['login', 'mail',],
103
+                ['login', 'mail', ],
104 104
                 ['group_id', 'role_id'],
105 105
                 ['userSearch', 'blocked'],
106 106
                 ['pass'],
Please login to merge, or discard this patch.