Completed
Pull Request — master (#4)
by
unknown
05:09
created
system/modules/Ui/widgets/Form/select.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
     }
13 13
     if (
14 14
             (!is_array($primaryValue) && ($key === $primaryValue || (isset($form->userDataTree[$name]) && $form->userDataTree[$name] === $key))) ||
15
-            (is_array($primaryValue) && (in_array($key,$primaryValue) || (isset($form->userDataTree[$name]) && in_array($key,$form->userDataTree[$name]))))
15
+            (is_array($primaryValue) && (in_array($key, $primaryValue) || (isset($form->userDataTree[$name]) && in_array($key, $form->userDataTree[$name]))))
16 16
             ) {
17 17
         $selected = ' selected="selected"';
18 18
     }
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
             $showedInput = count($aditionalInputs) - 1;
23 23
             $aditionValue = !empty($options['aditionalValue']) ? $options['aditionalValue'] : '';
24 24
         }
25
-        $optionsHtml .= "<option data-aditionalInput='" . ( count($aditionalInputs) - 1) . "' value ='{$key}'{$selected}>{$value['text']}</option>";
25
+        $optionsHtml .= "<option data-aditionalInput='" . (count($aditionalInputs) - 1) . "' value ='{$key}'{$selected}>{$value['text']}</option>";
26 26
     } else {
27 27
         $optionsHtml .= "<option value ='{$key}'{$selected}>{$value}</option>";
28 28
     }
Please login to merge, or discard this patch.
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/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.
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/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.