Completed
Push — master ( 100a0b...5e98ad )
by Alexey
04:13
created
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 2 patches
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.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 
22 22
         $sections = $this->module->getSnippets('cabinetSection');
23 23
         if (!empty($sections[$activeSection]['name'])) {
24
-            $this->view->setTitle($sections[$activeSection]['name'] . ' - Личный кабинет');
24
+            $this->view->setTitle($sections[$activeSection]['name'].' - Личный кабинет');
25 25
             $bread[] = ['text' => 'Личный кабинет', 'href' => '/users/cabinet'];
26 26
             $bread[] = ['text' => $sections[$activeSection]['name']];
27 27
         } else {
@@ -100,10 +100,10 @@  discard block
 block discarded – undo
100 100
                     Users\User::$cur->mail = $user_mail;
101 101
                     if (!empty($this->module->config['needActivation'])) {
102 102
                         Users\User::$cur->activation = Tools::randomString();
103
-                        $from = 'noreply@' . INJI_DOMAIN_NAME;
103
+                        $from = 'noreply@'.INJI_DOMAIN_NAME;
104 104
                         $to = $user_mail;
105
-                        $subject = 'Активация аккаунта на сайте ' . idn_to_utf8(INJI_DOMAIN_NAME);
106
-                        $text = 'Для активации вашего аккаунта перейдите по ссылке <a href = "http://' . INJI_DOMAIN_NAME . '/users/activation/' . Users\User::$cur->id . '/' . Users\User::$cur->activation . '">http://' . idn_to_utf8(INJI_DOMAIN_NAME) . '/users/activation/' . Users\User::$cur->id . '/' . Users\User::$cur->activation . '</a>';
105
+                        $subject = 'Активация аккаунта на сайте '.idn_to_utf8(INJI_DOMAIN_NAME);
106
+                        $text = 'Для активации вашего аккаунта перейдите по ссылке <a href = "http://'.INJI_DOMAIN_NAME.'/users/activation/'.Users\User::$cur->id.'/'.Users\User::$cur->activation.'">http://'.idn_to_utf8(INJI_DOMAIN_NAME).'/users/activation/'.Users\User::$cur->id.'/'.Users\User::$cur->activation.'</a>';
107 107
                         Tools::sendMail($from, $to, $subject, $text);
108 108
                         Msg::add('На указанный почтовый ящик была выслана ваша ссылка для подтверждения E-Mail', 'success');
109 109
                     } else {
@@ -126,10 +126,10 @@  discard block
 block discarded – undo
126 126
         if (!$user->activation) {
127 127
             Tools::redirect('/', 'Пользователь уже активирован');
128 128
         }
129
-        $from = 'noreply@' . INJI_DOMAIN_NAME;
129
+        $from = 'noreply@'.INJI_DOMAIN_NAME;
130 130
         $to = $user->mail;
131
-        $subject = 'Активация аккаунта на сайте ' . idn_to_utf8(INJI_DOMAIN_NAME);
132
-        $text = 'Для активации вашего аккаунта перейдите по ссылке <a href = "http://' . INJI_DOMAIN_NAME . '/users/activation/' . $user->id . '/' . $user->activation . '">http://' . idn_to_utf8(INJI_DOMAIN_NAME) . '/users/activation/' . $user->id . '/' . $user->activation . '</a>';
131
+        $subject = 'Активация аккаунта на сайте '.idn_to_utf8(INJI_DOMAIN_NAME);
132
+        $text = 'Для активации вашего аккаунта перейдите по ссылке <a href = "http://'.INJI_DOMAIN_NAME.'/users/activation/'.$user->id.'/'.$user->activation.'">http://'.idn_to_utf8(INJI_DOMAIN_NAME).'/users/activation/'.$user->id.'/'.$user->activation.'</a>';
133 133
         Tools::sendMail($from, $to, $subject, $text);
134 134
         Tools::redirect('/', 'На указанный почтовый ящик была выслана ваша ссылка для подтверждения E-Mail', 'success');
135 135
     }
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/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.
system/modules/Users/models/User/Invite.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
     static $forms = [
46 46
         'manager' => [
47 47
             'map' => [
48
-                ['code', 'type',],
48
+                ['code', 'type', ],
49 49
                 ['user_id'],
50 50
                 ['limit', 'count'],
51 51
             ]
Please login to merge, or discard this patch.
system/modules/Users/snippets/cabinetSection/socials.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-if(!Users\Social::getList(['where' => ['active', 1]])){
2
+if (!Users\Social::getList(['where' => ['active', 1]])) {
3 3
     return false;
4 4
 }
5 5
 return [
Please login to merge, or discard this patch.
system/modules/View/appAdminControllers/content/index.php 2 patches
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,13 +11,14 @@
 block discarded – undo
11 11
     '',
12 12
     ''
13 13
 ]);
14
-if (!empty($templates['app']['installed']))
14
+if (!empty($templates['app']['installed'])) {
15 15
     foreach ($templates['app']['installed'] as $template => $name) {
16 16
         $table->addRow([
17 17
             $name,
18 18
             (empty($templates['app']['current']) || $templates['app']['current'] != $template) ? '<a href = "/admin/view/setDefault/' . $template . '">Установить по умолчанию</a>' : 'Тема по умолчанию',
19 19
             '<a href = "/admin/view/editTemplate/' . $template . '">Редактировать</a>'
20 20
         ]);
21
+}
21 22
     }
22 23
 $table->draw();
23 24
 ?>
24 25
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,8 +15,8 @@
 block discarded – undo
15 15
     foreach ($templates['app']['installed'] as $template => $name) {
16 16
         $table->addRow([
17 17
             $name,
18
-            (empty($templates['app']['current']) || $templates['app']['current'] != $template) ? '<a href = "/admin/view/setDefault/' . $template . '">Установить по умолчанию</a>' : 'Тема по умолчанию',
19
-            '<a href = "/admin/view/template/editFile/' . $template . '">Файлы</a> <a href = "/admin/view/editTemplate/' . $template . '">Редактировать</a>'
18
+            (empty($templates['app']['current']) || $templates['app']['current'] != $template) ? '<a href = "/admin/view/setDefault/'.$template.'">Установить по умолчанию</a>' : 'Тема по умолчанию',
19
+            '<a href = "/admin/view/template/editFile/'.$template.'">Файлы</a> <a href = "/admin/view/editTemplate/'.$template.'">Редактировать</a>'
20 20
         ]);
21 21
     }
22 22
 $table->draw();
23 23
\ No newline at end of file
Please login to merge, or discard this patch.
system/modules/Widgets/appAdminControllers/WidgetsController.php 2 patches
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,8 +36,9 @@
 block discarded – undo
36 36
                     $params = json_decode($widget->widget_params, true);
37 37
                     if ($params) {
38 38
                         foreach ($params as $param) {
39
-                            if (!isset($widgetCode[$i]))
40
-                                break;
39
+                            if (!isset($widgetCode[$i])) {
40
+                                                            break;
41
+                            }
41 42
                             if ($param['type'] == 'select') {
42 43
                                 $item = $param['model']::get($widgetCode[$i++]);
43 44
                                 if ($item) {
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
             $widget = false; //Widget::get($widgetCode[0], 'widget_filename');
31 31
 
32 32
             if ($widget) {
33
-                $text .= $widget->widget_name . "\n";
33
+                $text .= $widget->widget_name."\n";
34 34
                 $i = 1;
35 35
                 if (isset($widgetCode[$i]) && $widget->widget_params) {
36 36
                     $params = json_decode($widget->widget_params, true);
@@ -41,28 +41,28 @@  discard block
 block discarded – undo
41 41
                             if ($param['type'] == 'select') {
42 42
                                 $item = $param['model']::get($widgetCode[$i++]);
43 43
                                 if ($item) {
44
-                                    $text .= $param['name'] . ': ' . $item->$param['showCol'] . "\n";
44
+                                    $text .= $param['name'].': '.$item->$param['showCol']."\n";
45 45
                                 } else {
46 46
                                     $text .= $widgetCode[$i - 1];
47 47
                                 }
48 48
                             } else {
49 49
                                 $value = $widgetCode[$i++];
50 50
                                 if (mb_strlen($value, 'utf-8') > 50) {
51
-                                    $value = mb_substr($value, 0, 50) . '...';
51
+                                    $value = mb_substr($value, 0, 50).'...';
52 52
                                 }
53
-                                $text .= $param['name'] . ': ' . $value . "\n";
53
+                                $text .= $param['name'].': '.$value."\n";
54 54
                             }
55 55
                         }
56 56
                     }
57 57
                 } else {
58 58
                     unset($widgetCode[0]);
59 59
                     foreach ($widgetCode as $item) {
60
-                        $text .= $item . "\n";
60
+                        $text .= $item."\n";
61 61
                     }
62 62
                 }
63 63
             } else {
64 64
                 foreach ($widgetCode as $item) {
65
-                    $text .= $item . "\n";
65
+                    $text .= $item."\n";
66 66
                 }
67 67
             }
68 68
         } else {
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 
72 72
         header('Content-type: image/png');
73 73
         // шрифт
74
-        $font = dirname(__FILE__) . '/../fonts/Cousine/Cousine-Regular.ttf';
74
+        $font = dirname(__FILE__).'/../fonts/Cousine/Cousine-Regular.ttf';
75 75
         // вычисляем сколько места займёт текст
76 76
         $bbox = imageftbbox(10, 0, $font, $text);
77 77
 
Please login to merge, or discard this patch.
system/program/setup/modules/Main/appSetupControllers/MainController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
                 if (empty($config['failTry'])) {
32 32
                     $config['failTry'] = 1;
33 33
                 } else {
34
-                    $config['failTry'] ++;
34
+                    $config['failTry']++;
35 35
                 }
36 36
                 Config::save('share', $config);
37 37
             }
Please login to merge, or discard this patch.