Completed
Push — master ( 125ee5...b3888f )
by Alexey
05:20
created
system/modules/Money/widgets/cabinet/walletBlocked.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
     $table->addRow([
39 39
         $history->id,
40 40
         $history->wallet->currency->name(),
41
-        '<span class = "' . ($amount > 0 ? "text-success" : 'text-danger') . '">' . $amount . '</span>',
41
+        '<span class = "'.($amount > 0 ? "text-success" : 'text-danger').'">'.$amount.'</span>',
42 42
         $history->comment,
43 43
         $history->date_create
44 44
     ]);
Please login to merge, or discard this patch.
system/modules/Users/Users.php 1 patch
Spacing   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -24,8 +24,8 @@  discard block
 block discarded – undo
24 24
         if (isset($_GET['logout'])) {
25 25
             return $this->logOut();
26 26
         }
27
-        if (filter_input(INPUT_COOKIE, $this->cookiePrefix . '_user_session_hash') && filter_input(INPUT_COOKIE, $this->cookiePrefix . '_user_id')) {
28
-            return $this->cuntinueSession(filter_input(INPUT_COOKIE, $this->cookiePrefix . '_user_session_hash'), filter_input(INPUT_COOKIE, $this->cookiePrefix . '_user_id'));
27
+        if (filter_input(INPUT_COOKIE, $this->cookiePrefix.'_user_session_hash') && filter_input(INPUT_COOKIE, $this->cookiePrefix.'_user_id')) {
28
+            return $this->cuntinueSession(filter_input(INPUT_COOKIE, $this->cookiePrefix.'_user_session_hash'), filter_input(INPUT_COOKIE, $this->cookiePrefix.'_user_id'));
29 29
         }
30 30
         if (isset($_POST['autorization']) && trim(filter_input(INPUT_POST, 'user_login')) && trim(filter_input(INPUT_POST, 'user_pass'))) {
31 31
             unset($_POST['autorization']);
@@ -41,18 +41,18 @@  discard block
 block discarded – undo
41 41
 
42 42
     public function logOut($redirect = true)
43 43
     {
44
-        if (!empty($_COOKIE[$this->cookiePrefix . "_user_session_hash"]) && !empty($_COOKIE[$this->cookiePrefix . "_user_id"])) {
44
+        if (!empty($_COOKIE[$this->cookiePrefix."_user_session_hash"]) && !empty($_COOKIE[$this->cookiePrefix."_user_id"])) {
45 45
             $session = Users\Session::get([
46
-                        ['user_id', $_COOKIE[$this->cookiePrefix . "_user_id"]],
47
-                        ['hash', $_COOKIE[$this->cookiePrefix . "_user_session_hash"]]
46
+                        ['user_id', $_COOKIE[$this->cookiePrefix."_user_id"]],
47
+                        ['hash', $_COOKIE[$this->cookiePrefix."_user_session_hash"]]
48 48
             ]);
49 49
             if ($session) {
50 50
                 $session->delete();
51 51
             }
52 52
         }
53 53
         if (!headers_sent()) {
54
-            setcookie($this->cookiePrefix . "_user_session_hash", '', 0, "/");
55
-            setcookie($this->cookiePrefix . "_user_id", '', 0, "/");
54
+            setcookie($this->cookiePrefix."_user_session_hash", '', 0, "/");
55
+            setcookie($this->cookiePrefix."_user_id", '', 0, "/");
56 56
         }
57 57
         if ($redirect) {
58 58
             if (!empty($this->config['logoutUrl'][$this->app->type])) {
@@ -70,25 +70,25 @@  discard block
 block discarded – undo
70 70
         ]);
71 71
         if ($session && $session->user && $session->user->blocked) {
72 72
             if (!headers_sent()) {
73
-                setcookie($this->cookiePrefix . "_user_session_hash", '', 0, "/");
74
-                setcookie($this->cookiePrefix . "_user_id", '', 0, "/");
73
+                setcookie($this->cookiePrefix."_user_session_hash", '', 0, "/");
74
+                setcookie($this->cookiePrefix."_user_id", '', 0, "/");
75 75
             }
76 76
             Msg::add('Ваш аккаунт заблокирован', 'info');
77 77
             return;
78 78
         }
79 79
         if ($session && $session->user && !$session->user->blocked) {
80 80
             if (!headers_sent()) {
81
-                setcookie($this->cookiePrefix . "_user_session_hash", $session->hash, time() + 360000, "/");
82
-                setcookie($this->cookiePrefix . "_user_id", $session->user_id, time() + 360000, "/");
81
+                setcookie($this->cookiePrefix."_user_session_hash", $session->hash, time() + 360000, "/");
82
+                setcookie($this->cookiePrefix."_user_id", $session->user_id, time() + 360000, "/");
83 83
             }
84 84
             if (!empty($this->config['needActivation']) && $session->user->activation) {
85 85
                 if (!headers_sent()) {
86
-                    setcookie($this->cookiePrefix . "_user_session_hash", '', 0, "/");
87
-                    setcookie($this->cookiePrefix . "_user_id", '', 0, "/");
86
+                    setcookie($this->cookiePrefix."_user_session_hash", '', 0, "/");
87
+                    setcookie($this->cookiePrefix."_user_id", '', 0, "/");
88 88
                 }
89
-                Tools::redirect('/', 'Этот аккаунт ещё не активирован. <br />Если вы не получали письмо с ссылкой для активации, нажмите на - <a href = "/users/resendActivation/' . $session->user->id . '"><b>повторно выслать ссылку активации</b></a>');
89
+                Tools::redirect('/', 'Этот аккаунт ещё не активирован. <br />Если вы не получали письмо с ссылкой для активации, нажмите на - <a href = "/users/resendActivation/'.$session->user->id.'"><b>повторно выслать ссылку активации</b></a>');
90 90
             } elseif ($session->user->activation) {
91
-                Msg::add('Этот аккаунт ещё не активирован, не все функции могут быть доступны. <br />Если вы не получали письмо с ссылкой для активации, нажмите на - <a href = "/users/resendActivation/' . $session->user->id . '"><b>повторно выслать ссылку активации</b></a>');
91
+                Msg::add('Этот аккаунт ещё не активирован, не все функции могут быть доступны. <br />Если вы не получали письмо с ссылкой для активации, нажмите на - <a href = "/users/resendActivation/'.$session->user->id.'"><b>повторно выслать ссылку активации</b></a>');
92 92
             }
93 93
             if (!$session->user->mail && !empty($this->config['noMailNotify'])) {
94 94
                 Msg::add($this->config['noMailNotify']);
@@ -98,8 +98,8 @@  discard block
 block discarded – undo
98 98
             Users\User::$cur->save();
99 99
         } else {
100 100
             if (!headers_sent()) {
101
-                setcookie($this->cookiePrefix . "_user_session_hash", '', 0, "/");
102
-                setcookie($this->cookiePrefix . "_user_id", '', 0, "/");
101
+                setcookie($this->cookiePrefix."_user_session_hash", '', 0, "/");
102
+                setcookie($this->cookiePrefix."_user_id", '', 0, "/");
103 103
             }
104 104
             Msg::add('Ваша сессия устарела или более недействительна, вам необходимо пройти <a href = "/users/login">авторизацию</a> заново', 'info');
105 105
         }
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
     {
110 110
         $user = $this->get($user_mail, 'mail');
111 111
         if (!$user) {
112
-            Msg::add('Пользователь ' . $user_mail . ' не найден, проверьте првильность ввода e-mail или зарегистрируйтесь', 'danger');
112
+            Msg::add('Пользователь '.$user_mail.' не найден, проверьте првильность ввода e-mail или зарегистрируйтесь', 'danger');
113 113
             return false;
114 114
         }
115 115
         $passre = Users\Passre::get([['user_id', $user->id], ['status', 1]]);
@@ -117,10 +117,10 @@  discard block
 block discarded – undo
117 117
             $passre->status = 2;
118 118
             $passre->save();
119 119
         }
120
-        $hash = $user->id . '_' . Tools::randomString(50);
120
+        $hash = $user->id.'_'.Tools::randomString(50);
121 121
         $passre = new Users\Passre(['user_id' => $user->id, 'status' => 1, 'hash' => $hash]);
122 122
         $passre->save();
123
-        Tools::sendMail('noreply@' . INJI_DOMAIN_NAME, $user_mail, 'Восстановление пароля на сайте ' . idn_to_utf8(INJI_DOMAIN_NAME), 'Было запрошено восстановление пароля на сайте ' . idn_to_utf8(INJI_DOMAIN_NAME) . '<br />для продолжения восстановления пароля перейдите по ссылке: <a href = "http://' . idn_to_utf8(INJI_DOMAIN_NAME) . '/?passrecont=1&hash=' . $hash . '">' . idn_to_utf8(INJI_DOMAIN_NAME) . '/?passrecont=1&hash=' . $hash . '</a>');
123
+        Tools::sendMail('noreply@'.INJI_DOMAIN_NAME, $user_mail, 'Восстановление пароля на сайте '.idn_to_utf8(INJI_DOMAIN_NAME), 'Было запрошено восстановление пароля на сайте '.idn_to_utf8(INJI_DOMAIN_NAME).'<br />для продолжения восстановления пароля перейдите по ссылке: <a href = "http://'.idn_to_utf8(INJI_DOMAIN_NAME).'/?passrecont=1&hash='.$hash.'">'.idn_to_utf8(INJI_DOMAIN_NAME).'/?passrecont=1&hash='.$hash.'</a>');
124 124
         Tools::redirect('/', 'На указанный почтовый ящик была выслана инструкция по восстановлению пароля', 'success');
125 125
     }
126 126
 
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
             $user->pass = $this->hashpass($pass);
139 139
             $user->save();
140 140
             $this->autorization($user->mail, $user->pass, 'mail');
141
-            Tools::sendMail('noreply@' . INJI_DOMAIN_NAME, $user->mail, 'Новый пароль на сайте ' . idn_to_utf8(INJI_DOMAIN_NAME), 'Было запрошено восстановление пароля на сайте ' . idn_to_utf8(INJI_DOMAIN_NAME) . '<br />Ваш новый пароль: ' . $pass);
141
+            Tools::sendMail('noreply@'.INJI_DOMAIN_NAME, $user->mail, 'Новый пароль на сайте '.idn_to_utf8(INJI_DOMAIN_NAME), 'Было запрошено восстановление пароля на сайте '.idn_to_utf8(INJI_DOMAIN_NAME).'<br />Ваш новый пароль: '.$pass);
142 142
             Tools::redirect('/', 'На указанный почтовый ящик был выслан новый пароль', 'success');
143 143
         }
144 144
     }
@@ -151,9 +151,9 @@  discard block
 block discarded – undo
151 151
         $user = $this->get($login, $ltype);
152 152
         if ($user && $this->verifypass($pass, $user->pass) && !$user->blocked) {
153 153
             if (!empty($this->config['needActivation']) && $session->user->activation) {
154
-                Tools::redirect('/', 'Этот аккаунт ещё не активирован. <br />Если вы не получали письмо с ссылкой для активации, нажмите на - <a href = "/users/resendActivation/' . $session->user->id . '"><b>повторно выслать ссылку активации</b></a>');
154
+                Tools::redirect('/', 'Этот аккаунт ещё не активирован. <br />Если вы не получали письмо с ссылкой для активации, нажмите на - <a href = "/users/resendActivation/'.$session->user->id.'"><b>повторно выслать ссылку активации</b></a>');
155 155
             } elseif ($user->activation) {
156
-                Msg::add('Этот аккаунт ещё не активирован, не все функции могут быть доступны. <br />Если вы не получали письмо с ссылкой для активации, нажмите на - <a href = "/users/resendActivation/' . $user->id . '"><b>повторно выслать ссылку активации</b></a>');
156
+                Msg::add('Этот аккаунт ещё не активирован, не все функции могут быть доступны. <br />Если вы не получали письмо с ссылкой для активации, нажмите на - <a href = "/users/resendActivation/'.$user->id.'"><b>повторно выслать ссылку активации</b></a>');
157 157
             }
158 158
             if (!$user->mail && !empty($this->config['noMailNotify'])) {
159 159
                 Msg::add($this->config['noMailNotify']);
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
             if ($user && $user->blocked) {
173 173
                 Msg::add('Вы заблокированы', 'danger');
174 174
             } elseif ($user) {
175
-                Msg::add('Вы ошиблись при наборе пароля или логина, попробуйте ещё раз или воспользуйтесь <a href = "?passre=1&user_mail=' . $user->mail . '">Восстановлением пароля</a>', 'danger');
175
+                Msg::add('Вы ошиблись при наборе пароля или логина, попробуйте ещё раз или воспользуйтесь <a href = "?passre=1&user_mail='.$user->mail.'">Восстановлением пароля</a>', 'danger');
176 176
             } else {
177 177
                 Msg::add('Данный почтовый ящик не зарегистрирован в системе', 'danger');
178 178
             }
@@ -195,8 +195,8 @@  discard block
 block discarded – undo
195 195
         $session->save();
196 196
 
197 197
         if (!headers_sent()) {
198
-            setcookie($this->cookiePrefix . "_user_session_hash", $session->hash, time() + 360000, "/");
199
-            setcookie($this->cookiePrefix . "_user_id", $session->user_id, time() + 360000, "/");
198
+            setcookie($this->cookiePrefix."_user_session_hash", $session->hash, time() + 360000, "/");
199
+            setcookie($this->cookiePrefix."_user_id", $session->user_id, time() + 360000, "/");
200 200
         } else {
201 201
             Msg::add('Не удалось провести авторизацию. Попробуйте позже', 'info');
202 202
         }
@@ -318,20 +318,20 @@  discard block
 block discarded – undo
318 318
             $this->autorization($user_mail, $pass, 'mail');
319 319
         }
320 320
         if (!empty($this->config['needActivation'])) {
321
-            $from = 'noreply@' . INJI_DOMAIN_NAME;
321
+            $from = 'noreply@'.INJI_DOMAIN_NAME;
322 322
             $to = $user_mail;
323
-            $subject = 'Регистрация на сайте ' . idn_to_utf8(INJI_DOMAIN_NAME);
324
-            $text = 'Вы были зарегистрированы на сайте ' . idn_to_utf8(INJI_DOMAIN_NAME) . '<br />для входа используйте ваш почтовый ящик в качестве логина и пароль: ' . $pass;
325
-            $text .='<br />';
323
+            $subject = 'Регистрация на сайте '.idn_to_utf8(INJI_DOMAIN_NAME);
324
+            $text = 'Вы были зарегистрированы на сайте '.idn_to_utf8(INJI_DOMAIN_NAME).'<br />для входа используйте ваш почтовый ящик в качестве логина и пароль: '.$pass;
326 325
             $text .= '<br />';
327
-            $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>';
326
+            $text .= '<br />';
327
+            $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>';
328 328
             Tools::sendMail($from, $to, $subject, $text);
329 329
             Msg::add('Вы были зарегистрированы. На указанный почтовый ящик был выслан ваш пароль и ссылка для активации', 'success');
330 330
         } else {
331
-            $from = 'noreply@' . INJI_DOMAIN_NAME;
331
+            $from = 'noreply@'.INJI_DOMAIN_NAME;
332 332
             $to = $user_mail;
333
-            $subject = 'Регистрация на сайте ' . idn_to_utf8(INJI_DOMAIN_NAME);
334
-            $text = 'Вы были зарегистрированы на сайте ' . idn_to_utf8(INJI_DOMAIN_NAME) . '<br />для входа используйте ваш почтовый ящик в качестве логина и пароль: ' . $pass;
333
+            $subject = 'Регистрация на сайте '.idn_to_utf8(INJI_DOMAIN_NAME);
334
+            $text = 'Вы были зарегистрированы на сайте '.idn_to_utf8(INJI_DOMAIN_NAME).'<br />для входа используйте ваш почтовый ящик в качестве логина и пароль: '.$pass;
335 335
             Tools::sendMail($from, $to, $subject, $text);
336 336
             Msg::add('Вы были зарегистрированы. На указанный почтовый ящик был выслан ваш пароль', 'success');
337 337
         }
Please login to merge, or discard this patch.
system/modules/Ecommerce/appControllers/EcommerceController.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
             foreach ($fields as $field) {
44 44
                 if (empty($_POST['userAdds']['fields'][$field->id]) && $field->required) {
45 45
                     $error = 1;
46
-                    Msg::add('Вы не указали: ' . $field->name);
46
+                    Msg::add('Вы не указали: '.$field->name);
47 47
                 }
48 48
             }
49 49
             if (!$error) {
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
                 $extra->price = $card->price;
72 72
                 $extra->count = 1;
73 73
                 $extra->cart_id = $cart->id;
74
-                $extra->info = 'card:' . $card->id . '|cardItem:' . $cardItem->id;
74
+                $extra->info = 'card:'.$card->id.'|cardItem:'.$cardItem->id;
75 75
                 $extra->save();
76 76
                 Tools::redirect('/ecommerce/cart/success');
77 77
             }
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
             $items = $this->ecommerce->getItems();
87 87
             $return = [];
88 88
             foreach ($items as $item) {
89
-                $return[] = ['name' => $item->name(), 'search' => $item->search_index . ' ' . $item->name];
89
+                $return[] = ['name' => $item->name(), 'search' => $item->search_index.' '.$item->name];
90 90
             }
91 91
             $return = json_encode($return);
92 92
             Cache::set('itemsAutocomplete', [], $return);
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
             $categoryIds = array_values(array_filter(explode('/', $category->tree_path)));
163 163
             foreach ($categoryIds as $id) {
164 164
                 $cat = Ecommerce\Category::get($id);
165
-                $bread[] = array('text' => $cat->name, 'href' => '/ecommerce/itemList/' . $cat->id);
165
+                $bread[] = array('text' => $cat->name, 'href' => '/ecommerce/itemList/'.$cat->id);
166 166
             }
167 167
             $this->view->setTitle($category->name);
168 168
         }
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
         foreach ($catalogIds as $id) {
227 227
             $cat = Ecommerce\Category::get($id);
228 228
             if ($cat) {
229
-                $bread[] = ['text' => $cat->name, 'href' => '/ecommerce/itemList/' . $cat->id];
229
+                $bread[] = ['text' => $cat->name, 'href' => '/ecommerce/itemList/'.$cat->id];
230 230
             }
231 231
         }
232 232
         $bread[] = ['text' => $item->name()];
@@ -241,9 +241,9 @@  discard block
 block discarded – undo
241 241
         $this->view->addMetaTag(['property' => 'og:title', 'content' => $item->name]);
242 242
         $this->view->addMetaTag(['property' => 'og:description', 'content' => $item->description]);
243 243
         if ($item->image) {
244
-            $this->view->addMetaTag(['property' => 'og:image', 'content' => 'http://' . INJI_DOMAIN_NAME . $item->image->path]);
244
+            $this->view->addMetaTag(['property' => 'og:image', 'content' => 'http://'.INJI_DOMAIN_NAME.$item->image->path]);
245 245
         }
246
-        $this->view->addMetaTag(['property' => 'og:url', 'content' => 'http://' . INJI_DOMAIN_NAME . '/view/' . $item->id]);
246
+        $this->view->addMetaTag(['property' => 'og:url', 'content' => 'http://'.INJI_DOMAIN_NAME.'/view/'.$item->id]);
247 247
 
248 248
         $options['content'] = $item->view ? $item->view : 'view';
249 249
         $this->view->page($options);
Please login to merge, or discard this patch.
system/modules/Exchange1c/objects/Parser/Item/Images.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -23,11 +23,11 @@  discard block
 block discarded – undo
23 23
         $dir = pathinfo($this->object->walker->migtarionLog->source, PATHINFO_DIRNAME);
24 24
         $this->model->image_file_id = 0;
25 25
         foreach ($value as $key => $imagePath) {
26
-            if (!$imagePath || !file_exists($dir . '/' . $imagePath)) {
26
+            if (!$imagePath || !file_exists($dir.'/'.$imagePath)) {
27 27
                 continue;
28 28
             }
29 29
             $notEq = true;
30
-            $md5Cur = md5_file($dir . '/' . $imagePath);
30
+            $md5Cur = md5_file($dir.'/'.$imagePath);
31 31
             foreach ($this->model->images as $imageId => $image) {
32 32
                 $file = $image->file;
33 33
                 $md5File = '';
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
                 }
46 46
             }
47 47
             if ($notEq) {
48
-                $file_id = \App::$primary->files->uploadFromUrl($dir . '/' . $imagePath, ['accept_group' => 'image', 'upload_code' => 'MigrationUpload']);
48
+                $file_id = \App::$primary->files->uploadFromUrl($dir.'/'.$imagePath, ['accept_group' => 'image', 'upload_code' => 'MigrationUpload']);
49 49
                 $image = new \Ecommerce\Item\Image([
50 50
                     'item_id' => $this->model->pk(),
51 51
                     'file_id' => $file_id
Please login to merge, or discard this patch.
system/modules/Ui/objects/DataManager/Action/ChangeParams.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
                 $model->save();
30 30
             }
31 31
         }
32
-        return 'Измненено <b>' . $count . '</b> ' . \Tools::getNumEnding($count, ['запись', 'записи', 'записей']);
32
+        return 'Измненено <b>'.$count.'</b> '.\Tools::getNumEnding($count, ['запись', 'записи', 'записей']);
33 33
     }
34 34
 
35 35
 }
Please login to merge, or discard this patch.
system/modules/Ui/objects/DataManager.php 1 patch
Spacing   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
             $this->name = $this->managerOptions['name'];
59 59
         }
60 60
 
61
-        $this->managerId = str_replace('\\', '_', 'dataManager_' . $this->modelName . '_' . $this->managerName . '_' . \Tools::randomString());
61
+        $this->managerId = str_replace('\\', '_', 'dataManager_'.$this->modelName.'_'.$this->managerName.'_'.\Tools::randomString());
62 62
     }
63 63
 
64 64
     /**
@@ -102,13 +102,13 @@  discard block
 block discarded – undo
102 102
         if (!empty($this->managerOptions['filters'])) {
103 103
             $buttons[] = [
104 104
                 'text' => 'Фильтры',
105
-                'onclick' => '  var modal = $("#' . $this->managerId . '_filters");
105
+                'onclick' => '  var modal = $("#'.$this->managerId.'_filters");
106 106
                 modal.modal("show");',
107 107
             ];
108 108
         }
109 109
         $buttons[] = [
110 110
             'text' => 'Добавить элемент',
111
-            'onclick' => 'inji.Ui.forms.popUp("' . str_replace('\\', '\\\\', $modelName) . '",' . json_encode($formParams) . ')',
111
+            'onclick' => 'inji.Ui.forms.popUp("'.str_replace('\\', '\\\\', $modelName).'",'.json_encode($formParams).')',
112 112
         ];
113 113
 
114 114
         return $buttons;
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
                     'className' => $action
139 139
                 ];
140 140
             }
141
-            $return[$key]['className'] = strpos($return[$key]['className'], '\\') === false && class_exists('Ui\DataManager\Action\\' . $return[$key]['className']) ? 'Ui\DataManager\Action\\' . $return[$key]['className'] : $return[$key]['className'];
141
+            $return[$key]['className'] = strpos($return[$key]['className'], '\\') === false && class_exists('Ui\DataManager\Action\\'.$return[$key]['className']) ? 'Ui\DataManager\Action\\'.$return[$key]['className'] : $return[$key]['className'];
142 142
             if (!class_exists($return[$key]['className']) || ($onlyGroupActions && !$return[$key]['className']::$groupAction)) {
143 143
                 unset($return[$key]);
144 144
             }
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
               <?php
171 171
               foreach ($actions as $action => $actionParams) {
172 172
                   if (class_exists($actionParams['className']) && $actionParams['className']::$groupAction) {
173
-                      echo "<li><a href ='' onclick='inji.Ui.dataManagers.get(this).groupAction(\"" . str_replace('\\', '\\\\', $action) . "\");return false;'>{$actionParams['className']::$name}</a></li>";
173
+                      echo "<li><a href ='' onclick='inji.Ui.dataManagers.get(this).groupAction(\"".str_replace('\\', '\\\\', $action)."\");return false;'>{$actionParams['className']::$name}</a></li>";
174 174
                   }
175 175
               }
176 176
               ?>
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
             return [];
222 222
         }
223 223
         if (!$this->checkAccess()) {
224
-            $this->drawError('you not have access to "' . $this->modelName . '" manager with name: "' . $this->managerName . '"');
224
+            $this->drawError('you not have access to "'.$this->modelName.'" manager with name: "'.$this->managerName.'"');
225 225
             return [];
226 226
         }
227 227
         $modelName = $this->modelName;
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
             $queryParams['start'] = $this->page * $this->limit - $this->limit;
238 238
         }
239 239
         if (!empty($params['categoryPath']) && $modelName::$categoryModel) {
240
-            $queryParams['where'][] = ['tree_path', $params['categoryPath'] . '%', 'LIKE'];
240
+            $queryParams['where'][] = ['tree_path', $params['categoryPath'].'%', 'LIKE'];
241 241
         }
242 242
         if (!empty($params['appType'])) {
243 243
             $queryParams['appType'] = $params['appType'];
@@ -296,7 +296,7 @@  discard block
 block discarded – undo
296 296
                         if (!empty($params['filters'][$col]['max'])) {
297 297
                             if ($colInfo['colParams']['type'] == 'dateTime' && !strpos($params['filters'][$col]['max'], ' ')) {
298 298
 
299
-                                $date = $params['filters'][$col]['max'] . ' 23:59:59';
299
+                                $date = $params['filters'][$col]['max'].' 23:59:59';
300 300
                             } else {
301 301
                                 $date = $params['filters'][$col]['max'];
302 302
                             }
@@ -323,16 +323,16 @@  discard block
 block discarded – undo
323 323
                         }
324 324
                         switch ($params['filters'][$col]['compareType']) {
325 325
                             case 'contains':
326
-                                $queryParams['where'][] = [$col, '%' . $params['filters'][$col]['value'] . '%', 'LIKE'];
326
+                                $queryParams['where'][] = [$col, '%'.$params['filters'][$col]['value'].'%', 'LIKE'];
327 327
                                 break;
328 328
                             case 'equals':
329 329
                                 $queryParams['where'][] = [$col, $params['filters'][$col]['value']];
330 330
                                 break;
331 331
                             case 'starts_with':
332
-                                $queryParams['where'][] = [$col, $params['filters'][$col]['value'] . '%', 'LIKE'];
332
+                                $queryParams['where'][] = [$col, $params['filters'][$col]['value'].'%', 'LIKE'];
333 333
                                 break;
334 334
                             case 'ends_with':
335
-                                $queryParams['where'][] = [$col, '%' . $params['filters'][$col]['value'], 'LIKE'];
335
+                                $queryParams['where'][] = [$col, '%'.$params['filters'][$col]['value'], 'LIKE'];
336 336
                                 break;
337 337
                         }
338 338
                         break;
@@ -371,7 +371,7 @@  discard block
 block discarded – undo
371 371
                 $item = $relation['relModel']::get([[$item->index(), $item->id], [$model->index(), $model->id]]);
372 372
             }
373 373
             $row = [];
374
-            $row[] = '<input type ="checkbox" name = "pk[]" value =' . $item->pk() . '>';
374
+            $row[] = '<input type ="checkbox" name = "pk[]" value ='.$item->pk().'>';
375 375
             $row[] = $item->pk();
376 376
             foreach ($this->managerOptions['cols'] as $key => $colName) {
377 377
                 if (!empty($params['download'])) {
@@ -417,16 +417,16 @@  discard block
 block discarded – undo
417 417
                     $managerParams = ['relation' => $modelName::$cols[$colName]['relation']];
418 418
                     $count = $item->{$modelName::$cols[$colName]['relation']}(array_merge($params, ['count' => 1]));
419 419
                     $count = $count ? $count : 'Нет';
420
-                    return "<a class = 'btn btn-xs btn-primary' onclick = 'inji.Ui.dataManagers.popUp(\"" . str_replace('\\', '\\\\', $modelName) . ":" . $item->pk() . "\"," . json_encode(array_merge($params, $managerParams)) . ")'>{$count}</a>";
420
+                    return "<a class = 'btn btn-xs btn-primary' onclick = 'inji.Ui.dataManagers.popUp(\"".str_replace('\\', '\\\\', $modelName).":".$item->pk()."\",".json_encode(array_merge($params, $managerParams)).")'>{$count}</a>";
421 421
                 case 'many':
422 422
                     $managerParams = ['relation' => $modelName::$cols[$colName]['relation']];
423 423
                     $count = $item->{$modelName::$cols[$colName]['relation']}(array_merge($params, ['count' => 1]));
424 424
                     $count = $count ? $count : 'Нет';
425
-                    return "<a class = 'btn btn-xs btn-primary' onclick = 'inji.Ui.dataManagers.popUp(\"" . str_replace('\\', '\\\\', $modelName) . ":" . $item->pk() . "\"," . json_encode(array_merge($params, $managerParams)) . ")'>{$count}</a>";
425
+                    return "<a class = 'btn btn-xs btn-primary' onclick = 'inji.Ui.dataManagers.popUp(\"".str_replace('\\', '\\\\', $modelName).":".$item->pk()."\",".json_encode(array_merge($params, $managerParams)).")'>{$count}</a>";
426 426
                 default :
427 427
                     if ($item->{$modelName::$cols[$colName]['relation']}) {
428 428
                         if (\App::$cur->name == 'admin') {
429
-                            $href = "<a href ='/admin/" . str_replace('\\', '/view/', $relations[$modelName::$cols[$colName]['relation']]['model']) . "/" . $item->{$modelName::$cols[$colName]['relation']}->pk() . "'>";
429
+                            $href = "<a href ='/admin/".str_replace('\\', '/view/', $relations[$modelName::$cols[$colName]['relation']]['model'])."/".$item->{$modelName::$cols[$colName]['relation']}->pk()."'>";
430 430
                             if (!empty($modelName::$cols[$colName]['showCol'])) {
431 431
                                 $href .= $item->{$modelName::$cols[$colName]['relation']}->{$modelName::$cols[$colName]['showCol']};
432 432
                             } else {
@@ -456,18 +456,18 @@  discard block
 block discarded – undo
456 456
                     case'many':
457 457
                         $managerParams = ['relation' => $modelName::$cols[$colName]['relation']];
458 458
                         $count = $item->{$modelName::$cols[$colName]['relation']}(array_merge($params, ['count' => 1]));
459
-                        return "<a class = 'btn btn-xs btn-primary' onclick = 'inji.Ui.dataManagers.popUp(\"" . str_replace('\\', '\\\\', $modelName) . ":" . $item->pk() . "\"," . json_encode(array_merge($params, $managerParams)) . ")'>{$count} " . \Tools::getNumEnding($count, ['Элемент', 'Элемента', 'Элементов']) . "</a>";
459
+                        return "<a class = 'btn btn-xs btn-primary' onclick = 'inji.Ui.dataManagers.popUp(\"".str_replace('\\', '\\\\', $modelName).":".$item->pk()."\",".json_encode(array_merge($params, $managerParams)).")'>{$count} ".\Tools::getNumEnding($count, ['Элемент', 'Элемента', 'Элементов'])."</a>";
460 460
                     default:
461 461
                         return $item->$colName;
462 462
                 }
463 463
             } elseif (!empty($modelName::$cols[$colName]['type'])) {
464
-                if (\App::$cur->name == 'admin' && $originalCol == 'name' || ( $dataManager && !empty($dataManager->managerOptions['colToView']) && $dataManager->managerOptions['colToView'] == $originalCol)) {
464
+                if (\App::$cur->name == 'admin' && $originalCol == 'name' || ($dataManager && !empty($dataManager->managerOptions['colToView']) && $dataManager->managerOptions['colToView'] == $originalCol)) {
465 465
                     $formName = $dataManager && !empty($dataManager->managerOptions['editForm']) ? $dataManager->managerOptions['editForm'] : 'manager';
466
-                    $redirectUrl = !empty($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '/admin/' . str_replace('\\', '/', get_class($originalItem));
467
-                    return "<a href ='/admin/" . str_replace('\\', '/view/', get_class($originalItem)) . "/{$originalItem->id}?formName={$formName}&redirectUrl={$redirectUrl}'>{$item->$colName}</a>";
466
+                    $redirectUrl = !empty($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '/admin/'.str_replace('\\', '/', get_class($originalItem));
467
+                    return "<a href ='/admin/".str_replace('\\', '/view/', get_class($originalItem))."/{$originalItem->id}?formName={$formName}&redirectUrl={$redirectUrl}'>{$item->$colName}</a>";
468 468
                 } elseif (\App::$cur->name == 'admin' && $colName == 'name') {
469
-                    $redirectUrl = !empty($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '/admin/' . str_replace('\\', '/', get_class($originalItem));
470
-                    return "<a href ='/admin/" . str_replace('\\', '/view/', get_class($item)) . "/{$item->id}?redirectUrl={$redirectUrl}'>{$item->$colName}</a>";
469
+                    $redirectUrl = !empty($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '/admin/'.str_replace('\\', '/', get_class($originalItem));
470
+                    return "<a href ='/admin/".str_replace('\\', '/view/', get_class($item))."/{$item->id}?redirectUrl={$redirectUrl}'>{$item->$colName}</a>";
471 471
                 } else {
472 472
                     return \Model::resloveTypeValue($item, $colName);
473 473
                 }
@@ -502,7 +502,7 @@  discard block
 block discarded – undo
502 502
             return [];
503 503
         }
504 504
         if (!$this->checkAccess()) {
505
-            $this->drawError('you not have access to "' . $this->modelName . '" manager with name: "' . $this->managerName . '"');
505
+            $this->drawError('you not have access to "'.$this->modelName.'" manager with name: "'.$this->managerName.'"');
506 506
             return [];
507 507
         }
508 508
         if (!empty($params['limit'])) {
@@ -516,7 +516,7 @@  discard block
 block discarded – undo
516 516
         ];
517 517
         $modelName = $this->modelName;
518 518
         if (!empty($params['categoryPath']) && $modelName::$categoryModel) {
519
-            $queryParams['where'][] = ['tree_path', $params['categoryPath'] . '%', 'LIKE'];
519
+            $queryParams['where'][] = ['tree_path', $params['categoryPath'].'%', 'LIKE'];
520 520
         }
521 521
         if (!empty($this->managerOptions['userGroupFilter'][\Users\User::$cur->group_id]['getRows'])) {
522 522
             foreach ($this->managerOptions['userGroupFilter'][\Users\User::$cur->group_id]['getRows'] as $colName => $colOptions) {
@@ -570,7 +570,7 @@  discard block
 block discarded – undo
570 570
                         if (!empty($params['filters'][$col]['max'])) {
571 571
                             if ($colInfo['colParams']['type'] == 'dateTime' && !strpos($params['filters'][$col]['max'], ' ')) {
572 572
 
573
-                                $date = $params['filters'][$col]['max'] . ' 23:59:59';
573
+                                $date = $params['filters'][$col]['max'].' 23:59:59';
574 574
                             } else {
575 575
                                 $date = $params['filters'][$col]['max'];
576 576
                             }
@@ -597,16 +597,16 @@  discard block
 block discarded – undo
597 597
                         }
598 598
                         switch ($params['filters'][$col]['compareType']) {
599 599
                             case 'contains':
600
-                                $queryParams['where'][] = [$col, '%' . $params['filters'][$col]['value'] . '%', 'LIKE'];
600
+                                $queryParams['where'][] = [$col, '%'.$params['filters'][$col]['value'].'%', 'LIKE'];
601 601
                                 break;
602 602
                             case 'equals':
603 603
                                 $queryParams['where'][] = [$col, $params['filters'][$col]['value']];
604 604
                                 break;
605 605
                             case 'starts_with':
606
-                                $queryParams['where'][] = [$col, $params['filters'][$col]['value'] . '%', 'LIKE'];
606
+                                $queryParams['where'][] = [$col, $params['filters'][$col]['value'].'%', 'LIKE'];
607 607
                                 break;
608 608
                             case 'ends_with':
609
-                                $queryParams['where'][] = [$col, '%' . $params['filters'][$col]['value'], 'LIKE'];
609
+                                $queryParams['where'][] = [$col, '%'.$params['filters'][$col]['value'], 'LIKE'];
610 610
                                 break;
611 611
                         }
612 612
                         break;
@@ -640,7 +640,7 @@  discard block
 block discarded – undo
640 640
             $tableCols[] = !empty($colOptions['label']) ? $colOptions['label'] : $colName;
641 641
         }
642 642
         $tableCols[] = '';
643
-        $this->table->class .=' datamanagertable';
643
+        $this->table->class .= ' datamanagertable';
644 644
         $this->table->setCols($tableCols);
645 645
     }
646 646
 
@@ -663,13 +663,13 @@  discard block
 block discarded – undo
663 663
             return false;
664 664
         }
665 665
         if (!$this->checkAccess()) {
666
-            $this->drawError('you not have access to "' . $this->modelName . '" manager with name: "' . $this->managerName . '"');
666
+            $this->drawError('you not have access to "'.$this->modelName.'" manager with name: "'.$this->managerName.'"');
667 667
             return [];
668 668
         }
669 669
         $tree = new Tree();
670 670
         $tree->ul($this->managerOptions['categorys']['model'], 0, function($category) {
671
-            return "<a href='#' onclick='inji.Ui.dataManagers.get(this).switchCategory(this);return false;' data-path ='" . $category->tree_path . ($category->pk() ? $category->pk() . "/" : '') . "'> " . $category->name . "</a> 
672
-                                    <a href = '#' onclick = 'inji.Ui.forms.popUp(\"" . str_replace('\\', '\\\\', get_class($category)) . ':' . $category->pk() . "\")' class ='glyphicon glyphicon-edit'></a>&nbsp;    
671
+            return "<a href='#' onclick='inji.Ui.dataManagers.get(this).switchCategory(this);return false;' data-path ='".$category->tree_path.($category->pk() ? $category->pk()."/" : '')."'> ".$category->name."</a> 
672
+                                    <a href = '#' onclick = 'inji.Ui.forms.popUp(\"" . str_replace('\\', '\\\\', get_class($category)).':'.$category->pk()."\")' class ='glyphicon glyphicon-edit'></a>&nbsp;    
673 673
                 <a onclick='inji.Ui.dataManagers.get(this).delCategory({$category->pk()});return false;' class ='glyphicon glyphicon-remove'></a>";
674 674
         });
675 675
         ?>
Please login to merge, or discard this patch.
system/modules/Ui/Controllers/DataManagerController.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
             ob_end_clean();
97 97
             header('Content-Encoding: UTF-8');
98 98
             header("Content-Type: text/csv");
99
-            header("Content-Disposition: attachment; filename=" . $request['modelName']::$objectName . '.csv');
99
+            header("Content-Disposition: attachment; filename=".$request['modelName']::$objectName.'.csv');
100 100
             echo "\xEF\xBB\xBF"; // UTF-8 BOM
101 101
 
102 102
 
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
                     echo ";";
109 109
                 }
110 110
                 $endRow = false;
111
-                echo '"' . $options['label'] . '"';
111
+                echo '"'.$options['label'].'"';
112 112
             }
113 113
             echo "\n";
114 114
             $endRow = true;
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
                         echo ";";
123 123
                     }
124 124
                     $endRow = false;
125
-                    echo '"' . str_replace(["\n", '"'], ['“'], $col) . '"';
125
+                    echo '"'.str_replace(["\n", '"'], ['“'], $col).'"';
126 126
                 }
127 127
                 echo "\n";
128 128
                 $endRow = true;
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
             $pages = $dataManager->getPages($request['params'], $request['model']);
144 144
             if ($pages) {
145 145
                 $pages->draw();
146
-                echo '<div style="background:#fff;">записей: <b>' . $pages->options['count'] . '</b>. страница <b>' . $pages->params['page'] . '</b> из <b>' . $pages->params['pages'] . '</b></div>';
146
+                echo '<div style="background:#fff;">записей: <b>'.$pages->options['count'].'</b>. страница <b>'.$pages->params['page'].'</b> из <b>'.$pages->params['pages'].'</b></div>';
147 147
             }
148 148
             $result->content['pages'] = ob_get_contents();
149 149
             ob_end_clean();
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
                 if (!empty($actions[$request['action']])) {
220 220
                     $actionParams = $actions[$request['action']];
221 221
                     if (!empty($actionParams['access']['groups']) && !in_array(\Users\User::$cur->group_id, $actionParams['access']['groups'])) {
222
-                        $result->content = 'У вас нет прав доступа к операции ' . (!isset($actionParams['name']) ? $actionParams['className']::$name : $actionParams['name']);
222
+                        $result->content = 'У вас нет прав доступа к операции '.(!isset($actionParams['name']) ? $actionParams['className']::$name : $actionParams['name']);
223 223
                     } else {
224 224
                         try {
225 225
                             $result->successMsg = $actionParams['className']::groupAction($dataManager, $ids, $actionParams, !empty($_GET['adInfo']) ? $_GET['adInfo'] : []);
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
                 }
232 232
             }
233 233
         } else {
234
-            $result->content = 'У вас нет прав доступа к менеджеру ' . $request['managerName'] . ' модели ' . $request['modelName'];
234
+            $result->content = 'У вас нет прав доступа к менеджеру '.$request['managerName'].' модели '.$request['modelName'];
235 235
         }
236 236
         $result->send();
237 237
     }
Please login to merge, or discard this patch.
system/modules/Ui/widgets/Form/begin.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <?php
2 2
 if (empty($params['activeForm']) || $params['activeForm']->parent === null) {
3 3
     ?>
4
-    <form <?= $form->id ? 'id="' . $form->id . '"' : ''; ?> action ="<?= $form->action; ?>" method ="<?= $form->method; ?>"  enctype="multipart/form-data"
4
+    <form <?= $form->id ? 'id="'.$form->id.'"' : ''; ?> action ="<?= $form->action; ?>" method ="<?= $form->method; ?>"  enctype="multipart/form-data"
5 5
     <?php
6 6
     foreach ($options as $attribute => $value) {
7 7
         echo " {$attribute} = '{$value}' ";
Please login to merge, or discard this patch.
system/modules/Ecommerce/models/Cart.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -216,7 +216,7 @@
 block discarded – undo
216 216
 
217 217
     public static function itemName($item)
218 218
     {
219
-        return $item->pk() . '. ' . $item->name();
219
+        return $item->pk().'. '.$item->name();
220 220
     }
221 221
 
222 222
     public static $forms = [
Please login to merge, or discard this patch.