Completed
Push — master ( c662bd...51e7b9 )
by Alexey
05:04
created
system/modules/Ui/widgets/Pages/pages.php 3 patches
Indentation   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -1,28 +1,28 @@
 block discarded – undo
1 1
 <ul class="<?= $class; ?>"><?php
2
-  if ($pagesInstance->params['page'] > 1) {
3
-      $getArr['page'] = $pagesInstance->params['page'] - 1;
4
-      echo "<li><a href = '{$pagesInstance->options['url']}?" . http_build_query($getArr) . "'>&larr;</a></li>";
5
-  }
2
+    if ($pagesInstance->params['page'] > 1) {
3
+        $getArr['page'] = $pagesInstance->params['page'] - 1;
4
+        echo "<li><a href = '{$pagesInstance->options['url']}?" . http_build_query($getArr) . "'>&larr;</a></li>";
5
+    }
6 6
 
7
-  for ($i = 1; $i <= $pagesInstance->params['pages']; $i++) {
8
-      if (( $i >= $pagesInstance->params['page'] - 3 && $i <= $pagesInstance->params['page'] + 3) || $i == 1 || $i == $pagesInstance->params['pages']) {
9
-          echo '<li ';
10
-          if ($pagesInstance->params['page'] == $i)
11
-              echo 'class = "active"';
12
-          echo ">";
13
-          $getArr['page'] = $i;
14
-          echo "<a href = '{$pagesInstance->options['url']}?" . http_build_query($getArr) . "'>{$i}</a></li>";
15
-      }
16
-      elseif ($i == $pagesInstance->params['page'] - 7 && $i > 1) {
17
-          $getArr['page'] = round($pagesInstance->params['page'] / 2);
18
-          echo "<li><a href = '{$pagesInstance->options['url']}?" . http_build_query($getArr) . "'>...</a></li>";
19
-      } elseif ($i == $pagesInstance->params['page'] + 7 && $i < $pagesInstance->params['pages']) {
20
-          $getArr['page'] = round(($pagesInstance->params['pages'] - $pagesInstance->params['page']) / 2) + $pagesInstance->params['page'];
21
-          echo "<li><a href = '{$pagesInstance->options['url']}?" . http_build_query($getArr) . "'>...</a></li>";
22
-      }
23
-  }
24
-  if ($pagesInstance->params['page'] < $pagesInstance->params['pages']) {
25
-      $getArr['page'] = $pagesInstance->params['page'] + 1;
26
-      echo "<li><a href = '{$pagesInstance->options['url']}?" . http_build_query($getArr) . "'>&rarr;</a></li>";
27
-  }
28
-  ?></ul>
29 7
\ No newline at end of file
8
+    for ($i = 1; $i <= $pagesInstance->params['pages']; $i++) {
9
+        if (( $i >= $pagesInstance->params['page'] - 3 && $i <= $pagesInstance->params['page'] + 3) || $i == 1 || $i == $pagesInstance->params['pages']) {
10
+            echo '<li ';
11
+            if ($pagesInstance->params['page'] == $i)
12
+                echo 'class = "active"';
13
+            echo ">";
14
+            $getArr['page'] = $i;
15
+            echo "<a href = '{$pagesInstance->options['url']}?" . http_build_query($getArr) . "'>{$i}</a></li>";
16
+        }
17
+        elseif ($i == $pagesInstance->params['page'] - 7 && $i > 1) {
18
+            $getArr['page'] = round($pagesInstance->params['page'] / 2);
19
+            echo "<li><a href = '{$pagesInstance->options['url']}?" . http_build_query($getArr) . "'>...</a></li>";
20
+        } elseif ($i == $pagesInstance->params['page'] + 7 && $i < $pagesInstance->params['pages']) {
21
+            $getArr['page'] = round(($pagesInstance->params['pages'] - $pagesInstance->params['page']) / 2) + $pagesInstance->params['page'];
22
+            echo "<li><a href = '{$pagesInstance->options['url']}?" . http_build_query($getArr) . "'>...</a></li>";
23
+        }
24
+    }
25
+    if ($pagesInstance->params['page'] < $pagesInstance->params['pages']) {
26
+        $getArr['page'] = $pagesInstance->params['page'] + 1;
27
+        echo "<li><a href = '{$pagesInstance->options['url']}?" . http_build_query($getArr) . "'>&rarr;</a></li>";
28
+    }
29
+    ?></ul>
30 30
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
   }
6 6
 
7 7
   for ($i = 1; $i <= $pagesInstance->params['pages']; $i++) {
8
-      if (( $i >= $pagesInstance->params['page'] - 3 && $i <= $pagesInstance->params['page'] + 3) || $i == 1 || $i == $pagesInstance->params['pages']) {
8
+      if (($i >= $pagesInstance->params['page'] - 3 && $i <= $pagesInstance->params['page'] + 3) || $i == 1 || $i == $pagesInstance->params['pages']) {
9 9
           echo '<li ';
10 10
           if ($pagesInstance->params['page'] == $i)
11 11
               echo 'class = "active"';
Please login to merge, or discard this patch.
Braces   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -7,13 +7,13 @@
 block discarded – undo
7 7
   for ($i = 1; $i <= $pagesInstance->params['pages']; $i++) {
8 8
       if (( $i >= $pagesInstance->params['page'] - 3 && $i <= $pagesInstance->params['page'] + 3) || $i == 1 || $i == $pagesInstance->params['pages']) {
9 9
           echo '<li ';
10
-          if ($pagesInstance->params['page'] == $i)
11
-              echo 'class = "active"';
10
+          if ($pagesInstance->params['page'] == $i) {
11
+                        echo 'class = "active"';
12
+          }
12 13
           echo ">";
13 14
           $getArr['page'] = $i;
14 15
           echo "<a href = '{$pagesInstance->options['url']}?" . http_build_query($getArr) . "'>{$i}</a></li>";
15
-      }
16
-      elseif ($i == $pagesInstance->params['page'] - 7 && $i > 1) {
16
+      } elseif ($i == $pagesInstance->params['page'] - 7 && $i > 1) {
17 17
           $getArr['page'] = round($pagesInstance->params['page'] / 2);
18 18
           echo "<li><a href = '{$pagesInstance->options['url']}?" . http_build_query($getArr) . "'>...</a></li>";
19 19
       } elseif ($i == $pagesInstance->params['page'] + 7 && $i < $pagesInstance->params['pages']) {
Please login to merge, or discard this patch.
system/modules/Ui/widgets/Table/body.php 1 patch
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -5,19 +5,19 @@
 block discarded – undo
5 5
           <div class ='pull-right'>
6 6
             <div class="btn-group">
7 7
               <?php
8
-              $html = '';
9
-              foreach ($table->buttons as $button) {
10
-                  $html .= '<a class = "btn btn-primary btn-sm"';
11
-                  if (!empty($button['href'])) {
12
-                      $html .= " href = '{$button['href']}'";
13
-                  }
14
-                  if (!empty($button['onclick'])) {
15
-                      $html .= " onclick = '{$button['onclick']}'";
16
-                  }
17
-                  $html .= ">{$button['text']}</a> ";
18
-              }
19
-              echo $html;
20
-              ?>
8
+                $html = '';
9
+                foreach ($table->buttons as $button) {
10
+                    $html .= '<a class = "btn btn-primary btn-sm"';
11
+                    if (!empty($button['href'])) {
12
+                        $html .= " href = '{$button['href']}'";
13
+                    }
14
+                    if (!empty($button['onclick'])) {
15
+                        $html .= " onclick = '{$button['onclick']}'";
16
+                    }
17
+                    $html .= ">{$button['text']}</a> ";
18
+                }
19
+                echo $html;
20
+                ?>
21 21
             </div>
22 22
           </div>
23 23
       <?php } ?>
Please login to merge, or discard this patch.
system/modules/UserForms/UserForms.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
                 $text = '';
44 44
                 foreach ($form->inputs as $input) {
45 45
                     if (isset($inputs['input' . $input->id])) {
46
-                        $text .="<b>{$input->label}:</b> " . htmlspecialchars($inputs['input' . $input->id]) . "<br />";
46
+                        $text .= "<b>{$input->label}:</b> " . htmlspecialchars($inputs['input' . $input->id]) . "<br />";
47 47
                     }
48 48
                 }
49 49
                 if ($text) {
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,8 +16,9 @@
 block discarded – undo
16 16
         if (!empty($_POST['UserForms'])) {
17 17
             foreach ($_POST['UserForms'] as $form_id => $inputs) {
18 18
                 $form = \UserForms\Form::get((int) $form_id);
19
-                if (!$form)
20
-                    continue;
19
+                if (!$form) {
20
+                                    continue;
21
+                }
21 22
                 $formRecive = new \UserForms\Recive();
22 23
                 $formRecive->user_id = (int) \Users\User::$cur->id;
23 24
                 $formRecive->form_id = (int) $form_id;
Please login to merge, or discard this patch.
system/modules/UserForms/models/Form.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,8 +24,8 @@
 block discarded – undo
24 24
     static $cols = [
25 25
         'name' => ['type' => 'text'],
26 26
         'description' => ['type' => 'html'],
27
-        'user_id' => [ 'type' => 'select', 'source' => 'relation', 'relation' => 'user'],
28
-        'inputs' => [ 'type' => 'dataManager', 'relation' => 'inputs'],
27
+        'user_id' => ['type' => 'select', 'source' => 'relation', 'relation' => 'user'],
28
+        'inputs' => ['type' => 'dataManager', 'relation' => 'inputs'],
29 29
         'date_create' => ['type' => 'dateTime'],
30 30
     ];
31 31
     static $dataManagers = [
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.