@@ -24,8 +24,8 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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']) && $user->activation) { |
154 | - Tools::redirect('/', 'Этот аккаунт ещё не активирован. <br />Если вы не получали письмо с ссылкой для активации, нажмите на - <a href = "/users/resendActivation/' . $user->id . '"><b>повторно выслать ссылку активации</b></a>'); |
|
154 | + Tools::redirect('/', 'Этот аккаунт ещё не активирован. <br />Если вы не получали письмо с ссылкой для активации, нажмите на - <a href = "/users/resendActivation/'.$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 |
||
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 |
||
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 |
||
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 | } |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | $this->formName = $form; |
49 | 49 | $this->form = \App::$cur->ui->getModelForm($this->modelName, $form); |
50 | 50 | if (empty($this->form)) { |
51 | - throw new \Exception('empty form ' . $form); |
|
51 | + throw new \Exception('empty form '.$form); |
|
52 | 52 | } |
53 | 53 | $this->inputs = $this->getInputs(); |
54 | 54 | } |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | $this->model->_params[$modelName::index()] = 0; |
85 | 85 | } |
86 | 86 | $relOptions['model']::fixPrefix($relOptions['col']); |
87 | - $inputs[$col] = new ActiveForm(new $relOptions['model']([ $relOptions['col'] => &$this->model->_params[$modelName::index()]]), $colPath[2]); |
|
87 | + $inputs[$col] = new ActiveForm(new $relOptions['model']([$relOptions['col'] => &$this->model->_params[$modelName::index()]]), $colPath[2]); |
|
88 | 88 | } |
89 | 89 | $inputs[$col]->parent = $this; |
90 | 90 | } elseif (!empty($modelName::$cols[$col])) { |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | public function checkRequest($params = [], $ajax = false) |
99 | 99 | { |
100 | 100 | if (!$this->checkAccess()) { |
101 | - $this->drawError('you not have access to "' . $this->modelName . '" manager with name: "' . $this->formName . '"'); |
|
101 | + $this->drawError('you not have access to "'.$this->modelName.'" manager with name: "'.$this->formName.'"'); |
|
102 | 102 | return []; |
103 | 103 | } |
104 | 104 | $successId = 0; |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | if (!empty($this->form['userGroupReadonly'][\Users\User::$cur->group_id]) && in_array($col, $this->form['userGroupReadonly'][\Users\User::$cur->group_id])) { |
123 | 123 | continue; |
124 | 124 | } |
125 | - $inputClassName = '\Ui\ActiveForm\Input\\' . ucfirst($param['type']); |
|
125 | + $inputClassName = '\Ui\ActiveForm\Input\\'.ucfirst($param['type']); |
|
126 | 126 | $input = new $inputClassName(); |
127 | 127 | $input->activeForm = $this; |
128 | 128 | $input->activeFormParams = $params; |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | if ($ajax) { |
168 | 168 | \Msg::show(); |
169 | 169 | } elseif (!empty($_GET['redirectUrl'])) { |
170 | - \Tools::redirect($_GET['redirectUrl'] . (!empty($_GET['dataManagerHash']) ? '#' . $_GET['dataManagerHash'] : '')); |
|
170 | + \Tools::redirect($_GET['redirectUrl'].(!empty($_GET['dataManagerHash']) ? '#'.$_GET['dataManagerHash'] : '')); |
|
171 | 171 | } |
172 | 172 | $successId = $this->model->pk(); |
173 | 173 | } |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | public function draw($params = [], $ajax = false) |
183 | 183 | { |
184 | 184 | if (!$this->checkAccess()) { |
185 | - $this->drawError('you not have access to "' . $this->modelName . '" form with name: "' . $this->formName . '"'); |
|
185 | + $this->drawError('you not have access to "'.$this->modelName.'" form with name: "'.$this->formName.'"'); |
|
186 | 186 | return []; |
187 | 187 | } |
188 | 188 | $form = new Form(!empty($this->form['formOptions']) ? $this->form['formOptions'] : []); |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | if (is_object($options)) { |
195 | 195 | $options->draw(); |
196 | 196 | } else { |
197 | - $inputClassName = '\Ui\ActiveForm\Input\\' . ucfirst($options['type']); |
|
197 | + $inputClassName = '\Ui\ActiveForm\Input\\'.ucfirst($options['type']); |
|
198 | 198 | $input = new $inputClassName(); |
199 | 199 | $input->form = $form; |
200 | 200 | $input->activeForm = $this; |
@@ -271,7 +271,7 @@ discard block |
||
271 | 271 | } |
272 | 272 | foreach ($values as $key => $value) { |
273 | 273 | if (is_array($value) && !empty($value['input']) && empty($value['input']['noprefix'])) { |
274 | - $values[$key]['input']['name'] = $aditionalInputNamePrefix . "[{$value['input']['name']}]"; |
|
274 | + $values[$key]['input']['name'] = $aditionalInputNamePrefix."[{$value['input']['name']}]"; |
|
275 | 275 | } |
276 | 276 | } |
277 | 277 | return $values; |
@@ -295,7 +295,7 @@ discard block |
||
295 | 295 | public function checkAccess() |
296 | 296 | { |
297 | 297 | if (empty($this->form)) { |
298 | - $this->drawError('"' . $this->modelName . '" form with name: "' . $this->formName . '" not found'); |
|
298 | + $this->drawError('"'.$this->modelName.'" form with name: "'.$this->formName.'" not found'); |
|
299 | 299 | return false; |
300 | 300 | } |
301 | 301 | if (\App::$cur->Access && !\App::$cur->Access->checkAccess($this)) { |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | </select> |
38 | 38 | <?php |
39 | 39 | foreach ($widgets as $code => $options) { |
40 | - echo "<div id = 'params_" . str_replace('\\', '-', $code) . "' class = 'widgetParams' style='display:none;'>"; |
|
40 | + echo "<div id = 'params_".str_replace('\\', '-', $code)."' class = 'widgetParams' style='display:none;'>"; |
|
41 | 41 | if (isset($options['params']) && !is_array($options['params'])) { |
42 | 42 | $options['params'](); |
43 | 43 | } elseif (isset($options['params'])) { |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | if ($param['type'] == 'select') { |
49 | 49 | echo "<div class = 'form-group'> |
50 | 50 | <label>{$param['name']}</label> |
51 | - <select name = 'params[" . str_replace('\\', '-', $code) . "][]' class = 'form-control' >"; |
|
51 | + <select name = 'params[".str_replace('\\', '-', $code)."][]' class = 'form-control' >"; |
|
52 | 52 | foreach ($param['model']::get_list() as $item) { |
53 | 53 | echo "<option value = '{$item->pk()}'>{$item->$param['showCol']}</option>"; |
54 | 54 | } |
@@ -57,12 +57,12 @@ discard block |
||
57 | 57 | } elseif ($param['type'] == 'textarea') { |
58 | 58 | echo "<div class = 'form-group'> |
59 | 59 | <label>{$param['name']}</label> |
60 | - <textarea name = 'params[" . str_replace('\\', '-', $code) . "][]' class = 'form-control'></textarea> |
|
60 | + <textarea name = 'params[".str_replace('\\', '-', $code)."][]' class = 'form-control'></textarea> |
|
61 | 61 | </div>"; |
62 | 62 | } else { |
63 | 63 | echo "<div class = 'form-group'> |
64 | 64 | <label>{$param['name']}</label> |
65 | - <input name = 'params[" . str_replace('\\', '-', $code) . "][]' class = 'form-control' /> |
|
65 | + <input name = 'params[".str_replace('\\', '-', $code)."][]' class = 'form-control' /> |
|
66 | 66 | </div>"; |
67 | 67 | } |
68 | 68 | } |
@@ -37,17 +37,17 @@ discard block |
||
37 | 37 | if (!empty($this->config[$this->app->type]['current'])) { |
38 | 38 | $templateName = $this->config[$this->app->type]['current']; |
39 | 39 | if (!empty($this->config[$this->app->type]['installed'][$templateName]['location'])) { |
40 | - $this->templatesPath = App::$primary->path . "/templates"; |
|
40 | + $this->templatesPath = App::$primary->path."/templates"; |
|
41 | 41 | } |
42 | 42 | } |
43 | 43 | if (!$this->templatesPath) { |
44 | - $this->templatesPath = $this->app->path . "/templates"; |
|
44 | + $this->templatesPath = $this->app->path."/templates"; |
|
45 | 45 | } |
46 | 46 | $this->template = \View\Template::get($templateName, $this->app, $this->templatesPath); |
47 | 47 | if (!$this->template) { |
48 | 48 | $this->template = new \View\Template([ |
49 | 49 | 'name' => 'default', |
50 | - 'path' => $this->templatesPath . '/default', |
|
50 | + 'path' => $this->templatesPath.'/default', |
|
51 | 51 | 'app' => $this->app |
52 | 52 | ]); |
53 | 53 | } |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | case 'WIDGET': |
165 | 165 | $source = $this->cutTag($source, $rawTag); |
166 | 166 | $params = array_slice($tag, 2); |
167 | - $this->widget($tag[1], ['params' => $params], ':' . implode(':', $params)); |
|
167 | + $this->widget($tag[1], ['params' => $params], ':'.implode(':', $params)); |
|
168 | 168 | break; |
169 | 169 | case 'HEAD': |
170 | 170 | $source = $this->cutTag($source, $rawTag); |
@@ -187,18 +187,18 @@ discard block |
||
187 | 187 | { |
188 | 188 | $pos = strpos($source, $rawTag) - 1; |
189 | 189 | echo substr($source, 0, $pos); |
190 | - return substr($source, ( $pos + strlen($rawTag) + 2)); |
|
190 | + return substr($source, ($pos + strlen($rawTag) + 2)); |
|
191 | 191 | } |
192 | 192 | |
193 | 193 | public function getHref($type, $params) |
194 | 194 | { |
195 | 195 | $href = ''; |
196 | 196 | if (is_string($params)) { |
197 | - $href = ($this->app->type != 'app' ? '/' . $this->app->name : '' ) . $params; |
|
197 | + $href = ($this->app->type != 'app' ? '/'.$this->app->name : '').$params; |
|
198 | 198 | } elseif (empty($params['template']) && !empty($params['file'])) { |
199 | - $href = ($this->app->type != 'app' ? '/' . $this->app->name : '' ) . $params['file']; |
|
199 | + $href = ($this->app->type != 'app' ? '/'.$this->app->name : '').$params['file']; |
|
200 | 200 | } elseif (!empty($params['template']) && !empty($params['file'])) { |
201 | - $href = $this->app->templatesPath . "/{$this->template->name}/{$type}/{$params['file']}"; |
|
201 | + $href = $this->app->templatesPath."/{$this->template->name}/{$type}/{$params['file']}"; |
|
202 | 202 | } |
203 | 203 | return $href; |
204 | 204 | } |
@@ -235,16 +235,16 @@ discard block |
||
235 | 235 | |
236 | 236 | echo "<title>{$this->title}</title>\n"; |
237 | 237 | |
238 | - if (!empty($this->template->config['favicon']) && file_exists($this->template->path . "/{$this->template->config['favicon']}")) { |
|
238 | + if (!empty($this->template->config['favicon']) && file_exists($this->template->path."/{$this->template->config['favicon']}")) { |
|
239 | 239 | echo " <link rel='shortcut icon' href='/templates/{$this->template->name}/{$this->template->config['favicon']}' />"; |
240 | - } elseif (!empty($this->template->config['favicon']) && file_exists($this->app->path . "/static/images/{$this->template->config['favicon']}")) { |
|
240 | + } elseif (!empty($this->template->config['favicon']) && file_exists($this->app->path."/static/images/{$this->template->config['favicon']}")) { |
|
241 | 241 | echo " <link rel='shortcut icon' href='/static/images/{$this->template->config['favicon']}' />"; |
242 | - } elseif (file_exists($this->app->path . '/static/images/favicon.ico')) { |
|
242 | + } elseif (file_exists($this->app->path.'/static/images/favicon.ico')) { |
|
243 | 243 | echo " <link rel='shortcut icon' href='/static/images/favicon.ico' />"; |
244 | 244 | } |
245 | 245 | |
246 | 246 | foreach ($this->getMetaTags() as $meta) { |
247 | - echo "\n " . Html::el('meta', $meta, '', null); |
|
247 | + echo "\n ".Html::el('meta', $meta, '', null); |
|
248 | 248 | } |
249 | 249 | |
250 | 250 | if (!empty(Inji::$config['assets']['js'])) { |
@@ -255,7 +255,7 @@ discard block |
||
255 | 255 | |
256 | 256 | $this->checkNeedLibs(); |
257 | 257 | $this->parseCss(); |
258 | - echo "\n <script src='" . Statics::file(($this->app->type != 'app' ? '/' . $this->app->name : '' ) . "/static/system/js/Inji.js") . "'></script>"; |
|
258 | + echo "\n <script src='".Statics::file(($this->app->type != 'app' ? '/'.$this->app->name : '')."/static/system/js/Inji.js")."'></script>"; |
|
259 | 259 | } |
260 | 260 | |
261 | 261 | public function parseCss() |
@@ -279,25 +279,25 @@ discard block |
||
279 | 279 | if (file_exists($path)) { |
280 | 280 | $this->loadedCss[$href] = $href; |
281 | 281 | $urls[$href] = $path; |
282 | - $timeStr.=filemtime($path); |
|
282 | + $timeStr .= filemtime($path); |
|
283 | 283 | } else { |
284 | 284 | echo "\n <link href='{$href}' rel='stylesheet' type='text/css' />"; |
285 | 285 | } |
286 | 286 | } |
287 | 287 | $timeMd5 = md5($timeStr); |
288 | 288 | $cacheDir = Cache::getDir('static'); |
289 | - if (!file_exists($cacheDir . '/all' . $timeMd5 . '.css')) { |
|
289 | + if (!file_exists($cacheDir.'/all'.$timeMd5.'.css')) { |
|
290 | 290 | foreach ($urls as $primaryUrl => $url) { |
291 | 291 | $source = file_get_contents($url); |
292 | 292 | $rootPath = substr($primaryUrl, 0, strrpos($primaryUrl, '/')); |
293 | 293 | $levelUpPath = substr($rootPath, 0, strrpos($rootPath, '/')); |
294 | - $source = preg_replace('!url\((\'?"?)[\.]{2}!isU', 'url($1' . $levelUpPath, $source); |
|
295 | - $source = preg_replace('!url\((\'?"?)[\.]{1}!isU', 'url($1' . $rootPath, $source); |
|
296 | - $source = preg_replace('#url\(([\'"]){1}(?!http|https|/|data\:)([^/])#isU', 'url($1' . $rootPath . '/$2', $source); |
|
297 | - $source = preg_replace('#url\((?!http|https|/|data\:|\'|")([^/])#isU', 'url(' . $rootPath . '/$1$2', $source); |
|
294 | + $source = preg_replace('!url\((\'?"?)[\.]{2}!isU', 'url($1'.$levelUpPath, $source); |
|
295 | + $source = preg_replace('!url\((\'?"?)[\.]{1}!isU', 'url($1'.$rootPath, $source); |
|
296 | + $source = preg_replace('#url\(([\'"]){1}(?!http|https|/|data\:)([^/])#isU', 'url($1'.$rootPath.'/$2', $source); |
|
297 | + $source = preg_replace('#url\((?!http|https|/|data\:|\'|")([^/])#isU', 'url('.$rootPath.'/$1$2', $source); |
|
298 | 298 | $cssAll .= $source; |
299 | 299 | } |
300 | - file_put_contents($cacheDir . '/all' . $timeMd5 . '.css', $cssAll); |
|
300 | + file_put_contents($cacheDir.'/all'.$timeMd5.'.css', $cssAll); |
|
301 | 301 | } |
302 | 302 | echo "\n <link href='/{$cacheDir}/all{$timeMd5}.css' rel='stylesheet' type='text/css' />"; |
303 | 303 | } |
@@ -329,7 +329,7 @@ discard block |
||
329 | 329 | if (strpos($css, '//') !== false) |
330 | 330 | $href = $css; |
331 | 331 | else |
332 | - $href = ($this->app->type != 'app' ? '/' . $this->app->name : '' ) . $css; |
|
332 | + $href = ($this->app->type != 'app' ? '/'.$this->app->name : '').$css; |
|
333 | 333 | $hrefs[$href] = $href; |
334 | 334 | } |
335 | 335 | break; |
@@ -342,7 +342,7 @@ discard block |
||
342 | 342 | if (strpos($css, '://') !== false) |
343 | 343 | $href = $css; |
344 | 344 | else |
345 | - $href = $this->app->templatesPath . "/{$this->template->name}/css/{$css}"; |
|
345 | + $href = $this->app->templatesPath."/{$this->template->name}/css/{$css}"; |
|
346 | 346 | $hrefs[$href] = $href; |
347 | 347 | } |
348 | 348 | break; |
@@ -355,7 +355,7 @@ discard block |
||
355 | 355 | if (strpos($css, '//') !== false) |
356 | 356 | $href = $css; |
357 | 357 | else |
358 | - $href = ($this->app->type != 'app' ? '/' . $this->app->name : '' ) . $css; |
|
358 | + $href = ($this->app->type != 'app' ? '/'.$this->app->name : '').$css; |
|
359 | 359 | $hrefs[$href] = $href; |
360 | 360 | } |
361 | 361 | break; |
@@ -375,9 +375,9 @@ discard block |
||
375 | 375 | if (!empty($this->app->config['site']['metatags'])) { |
376 | 376 | foreach ($this->app->config['site']['metatags'] as $meta) { |
377 | 377 | if (!empty($meta['name'])) { |
378 | - $metas['metaName:' . $meta['name']] = $meta; |
|
378 | + $metas['metaName:'.$meta['name']] = $meta; |
|
379 | 379 | } elseif (!empty($meta['property'])) { |
380 | - $metas['metaProperty:' . $meta['property']] = $meta; |
|
380 | + $metas['metaProperty:'.$meta['property']] = $meta; |
|
381 | 381 | } |
382 | 382 | } |
383 | 383 | } |
@@ -390,9 +390,9 @@ discard block |
||
390 | 390 | public function addMetaTag($meta) |
391 | 391 | { |
392 | 392 | if (!empty($meta['name'])) { |
393 | - $this->dynMetas['metaName:' . $meta['name']] = $meta; |
|
393 | + $this->dynMetas['metaName:'.$meta['name']] = $meta; |
|
394 | 394 | } elseif (!empty($meta['property'])) { |
395 | - $this->dynMetas['metaProperty:' . $meta['property']] = $meta; |
|
395 | + $this->dynMetas['metaProperty:'.$meta['property']] = $meta; |
|
396 | 396 | } |
397 | 397 | } |
398 | 398 | |
@@ -416,7 +416,7 @@ discard block |
||
416 | 416 | if (file_exists($path)) { |
417 | 417 | $nativeUrl[$script] = $script; |
418 | 418 | $urls[$script] = $path; |
419 | - $timeStr.=filemtime($path); |
|
419 | + $timeStr .= filemtime($path); |
|
420 | 420 | } else { |
421 | 421 | $noParsedScripts[$script] = $script; |
422 | 422 | } |
@@ -431,7 +431,7 @@ discard block |
||
431 | 431 | if (!empty($script['name'])) { |
432 | 432 | $onLoadModules[$script['name']] = $script['name']; |
433 | 433 | } |
434 | - $timeStr.=filemtime($path); |
|
434 | + $timeStr .= filemtime($path); |
|
435 | 435 | } else { |
436 | 436 | $noParsedScripts[$script] = $script; |
437 | 437 | } |
@@ -440,20 +440,20 @@ discard block |
||
440 | 440 | |
441 | 441 | $timeMd5 = md5($timeStr); |
442 | 442 | $cacheDir = Cache::getDir('static'); |
443 | - if (!file_exists($cacheDir . '/all' . $timeMd5 . '.js')) { |
|
443 | + if (!file_exists($cacheDir.'/all'.$timeMd5.'.js')) { |
|
444 | 444 | foreach ($urls as $url) { |
445 | - $scriptAll .= ';' . file_get_contents($url); |
|
445 | + $scriptAll .= ';'.file_get_contents($url); |
|
446 | 446 | } |
447 | - file_put_contents($cacheDir . '/all' . $timeMd5 . '.js', $scriptAll); |
|
447 | + file_put_contents($cacheDir.'/all'.$timeMd5.'.js', $scriptAll); |
|
448 | 448 | } |
449 | 449 | $options = [ |
450 | 450 | 'scripts' => array_values($noParsedScripts), |
451 | 451 | 'compresedScripts' => $nativeUrl, |
452 | 452 | 'styles' => [], |
453 | - 'appRoot' => $this->app->type == 'app' ? '/' : '/' . $this->app->name . '/', |
|
453 | + 'appRoot' => $this->app->type == 'app' ? '/' : '/'.$this->app->name.'/', |
|
454 | 454 | 'onLoadModules' => $onLoadModules |
455 | 455 | ]; |
456 | - $options['scripts'][] = '/' . $cacheDir . '/all' . $timeMd5 . '.js'; |
|
456 | + $options['scripts'][] = '/'.$cacheDir.'/all'.$timeMd5.'.js'; |
|
457 | 457 | $this->widget('View\bodyEnd', compact('options')); |
458 | 458 | } |
459 | 459 | |
@@ -500,7 +500,7 @@ discard block |
||
500 | 500 | if (strpos($js, '//') !== false) |
501 | 501 | $href = $js; |
502 | 502 | else |
503 | - $href = $this->app->templatesPath . "/{$this->template->name}/js/{$js}"; |
|
503 | + $href = $this->app->templatesPath."/{$this->template->name}/js/{$js}"; |
|
504 | 504 | $resultArray[] = $href; |
505 | 505 | } |
506 | 506 | break; |
@@ -537,7 +537,7 @@ discard block |
||
537 | 537 | { |
538 | 538 | if ($add && !empty($this->app->config['site']['name'])) { |
539 | 539 | if ($title) { |
540 | - $this->title = $title . ' - ' . $this->app->config['site']['name']; |
|
540 | + $this->title = $title.' - '.$this->app->config['site']['name']; |
|
541 | 541 | } else { |
542 | 542 | $this->title = $this->app->config['site']['name']; |
543 | 543 | } |
@@ -566,7 +566,7 @@ discard block |
||
566 | 566 | } |
567 | 567 | } |
568 | 568 | if (!$paramArray) |
569 | - $lineParams = ':' . implode(':', $_params); |
|
569 | + $lineParams = ':'.implode(':', $_params); |
|
570 | 570 | } |
571 | 571 | } |
572 | 572 | echo "<!--start:{WIDGET:{$_widgetName}{$lineParams}}-->\n"; |
@@ -585,24 +585,24 @@ discard block |
||
585 | 585 | if (strpos($widgetName, '\\')) { |
586 | 586 | $widgetName = explode('\\', $widgetName); |
587 | 587 | |
588 | - $paths['templatePath_widgetDir'] = $this->templatesPath . '/' . $this->template->name . '/widgets/' . $widgetName[0] . '/' . $widgetName[1] . '/' . $widgetName[1] . '.php'; |
|
589 | - $paths['templatePath'] = $this->templatesPath . '/' . $this->template->name . '/widgets/' . $widgetName[0] . '/' . $widgetName[1] . '.php'; |
|
588 | + $paths['templatePath_widgetDir'] = $this->templatesPath.'/'.$this->template->name.'/widgets/'.$widgetName[0].'/'.$widgetName[1].'/'.$widgetName[1].'.php'; |
|
589 | + $paths['templatePath'] = $this->templatesPath.'/'.$this->template->name.'/widgets/'.$widgetName[0].'/'.$widgetName[1].'.php'; |
|
590 | 590 | App::$cur->$widgetName[0]; |
591 | 591 | $modulePaths = Module::getModulePaths(ucfirst($widgetName[0])); |
592 | 592 | foreach ($modulePaths as $pathName => $path) { |
593 | - $paths[$pathName . '_widgetDir'] = $path . '/widgets/' . $widgetName[1] . '/' . $widgetName[1] . '.php'; |
|
594 | - $paths[$pathName] = $path . '/widgets/' . $widgetName[1] . '.php'; |
|
593 | + $paths[$pathName.'_widgetDir'] = $path.'/widgets/'.$widgetName[1].'/'.$widgetName[1].'.php'; |
|
594 | + $paths[$pathName] = $path.'/widgets/'.$widgetName[1].'.php'; |
|
595 | 595 | } |
596 | 596 | return $paths; |
597 | 597 | } else { |
598 | - $paths['templatePath_widgetDir'] = $this->templatesPath . '/' . $this->template->name . '/widgets/' . $widgetName . '/' . $widgetName . '.php'; |
|
599 | - $paths['templatePath'] = $this->templatesPath . '/' . $this->template->name . '/widgets/' . $widgetName . '.php'; |
|
598 | + $paths['templatePath_widgetDir'] = $this->templatesPath.'/'.$this->template->name.'/widgets/'.$widgetName.'/'.$widgetName.'.php'; |
|
599 | + $paths['templatePath'] = $this->templatesPath.'/'.$this->template->name.'/widgets/'.$widgetName.'.php'; |
|
600 | 600 | |
601 | - $paths['curAppPath_widgetDir'] = $this->app->path . '/widgets/' . $widgetName . '/' . $widgetName . '.php'; |
|
602 | - $paths['curAppPath'] = $this->app->path . '/widgets/' . $widgetName . '.php'; |
|
601 | + $paths['curAppPath_widgetDir'] = $this->app->path.'/widgets/'.$widgetName.'/'.$widgetName.'.php'; |
|
602 | + $paths['curAppPath'] = $this->app->path.'/widgets/'.$widgetName.'.php'; |
|
603 | 603 | |
604 | - $paths['systemPath_widgetDir'] = INJI_SYSTEM_DIR . '/widgets/' . $widgetName . '/' . $widgetName . '.php'; |
|
605 | - $paths['systemPath'] = INJI_SYSTEM_DIR . '/widgets/' . $widgetName . '.php'; |
|
604 | + $paths['systemPath_widgetDir'] = INJI_SYSTEM_DIR.'/widgets/'.$widgetName.'/'.$widgetName.'.php'; |
|
605 | + $paths['systemPath'] = INJI_SYSTEM_DIR.'/widgets/'.$widgetName.'.php'; |
|
606 | 606 | } |
607 | 607 | return $paths; |
608 | 608 | } |
@@ -3,9 +3,9 @@ |
||
3 | 3 | <hr/> |
4 | 4 | <?php |
5 | 5 | foreach ($template->config['css'] as $file) { |
6 | - if (file_exists($template->path . '/css/' . $file)) { |
|
6 | + if (file_exists($template->path.'/css/'.$file)) { |
|
7 | 7 | ?> |
8 | - <a href ='/admin/view/template/editFile/<?= $template->name; ?>?path=<?= 'css/' . $file; ?>'><?= $file; ?></a> |
|
8 | + <a href ='/admin/view/template/editFile/<?= $template->name; ?>?path=<?= 'css/'.$file; ?>'><?= $file; ?></a> |
|
9 | 9 | <?php |
10 | 10 | } |
11 | 11 | } |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | { |
28 | 28 | header("Content-Type: text/xml"); |
29 | 29 | header("Expires: Thu, 19 Feb 1998 13:24:18 GMT"); |
30 | - header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); |
|
30 | + header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); |
|
31 | 31 | header("Cache-Control: no-cache, must-revalidate"); |
32 | 32 | header("Cache-Control: post-check=0,pre-check=0"); |
33 | 33 | header("Cache-Control: max-age=0"); |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | $root->setAttribute("xmlns", "http://www.sitemaps.org/schemas/sitemap/0.9"); |
40 | 40 | $root = $xml->appendChild($root); |
41 | 41 | |
42 | - $addToXml = function ($xml, $parent, $nodeName, $text) { |
|
42 | + $addToXml = function($xml, $parent, $nodeName, $text) { |
|
43 | 43 | $node = $parent->appendChild($xml->createElement($nodeName)); |
44 | 44 | $node->appendChild($xml->createTextNode($text)); |
45 | 45 | return $node; |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -return function ($step = NULL, $params = []) { |
|
3 | +return function($step = NULL, $params = []) { |
|
4 | 4 | |
5 | 5 | $groups = [ |
6 | 6 | [ |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | |
42 | 42 | if (!empty($conf['files']['aditionTemplateFiels'])) { |
43 | 43 | foreach ($conf['files']['aditionTemplateFiels'] as $file) { |
44 | - $return[$file['file']] = '- ' . $file['name']; |
|
44 | + $return[$file['file']] = '- '.$file['name']; |
|
45 | 45 | } |
46 | 46 | } |
47 | 47 | return $return; |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | |
78 | 78 | if (!empty($conf['files']['aditionTemplateFiels'])) { |
79 | 79 | foreach ($conf['files']['aditionTemplateFiels'] as $file) { |
80 | - $return[$file['file']] = '- ' . $file['name']; |
|
80 | + $return[$file['file']] = '- '.$file['name']; |
|
81 | 81 | } |
82 | 82 | } |
83 | 83 | return $return; |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | $map[] = [ |
92 | 92 | 'name' => $mat->name, |
93 | 93 | 'url' => [ |
94 | - 'loc' => (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://' . INJI_DOMAIN_NAME . ($mat->getHref()) |
|
94 | + 'loc' => (!empty($_SERVER['HTTPS']) ? 'https' : 'http').'://'.INJI_DOMAIN_NAME.($mat->getHref()) |
|
95 | 95 | ], |
96 | 96 | ]; |
97 | 97 | } |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | $map[] = [ |
105 | 105 | 'name' => $mat->name, |
106 | 106 | 'url' => [ |
107 | - 'loc' => (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://' . INJI_DOMAIN_NAME . ($mat->getHref()) |
|
107 | + 'loc' => (!empty($_SERVER['HTTPS']) ? 'https' : 'http').'://'.INJI_DOMAIN_NAME.($mat->getHref()) |
|
108 | 108 | ], |
109 | 109 | ]; |
110 | 110 | } |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | <td class="text-left" style="width: 50%;"> |
19 | 19 | <?php |
20 | 20 | foreach ($orderDeatilCols as $col => $label) { |
21 | - echo "<b>{$label}</b> " . $cart->$col . "<br>"; |
|
21 | + echo "<b>{$label}</b> ".$cart->$col."<br>"; |
|
22 | 22 | } |
23 | 23 | ?> |
24 | 24 | </td> |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | <?php |
42 | 42 | if ($cart->infos) { |
43 | 43 | foreach ($cart->infos as $info) { |
44 | - echo "<b>{$info->field->name()}</b> " . $info->value . "<br>"; |
|
44 | + echo "<b>{$info->field->name()}</b> ".$info->value."<br>"; |
|
45 | 45 | } |
46 | 46 | } |
47 | 47 | ?> |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | if (App::$cur->money) { |
126 | 126 | $currency = Money\Currency::get($currency_id); |
127 | 127 | if ($currency) { |
128 | - echo ' ' . $currency->acronym(); |
|
128 | + echo ' '.$currency->acronym(); |
|
129 | 129 | } else { |
130 | 130 | echo ' руб.'; |
131 | 131 | } |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | if (App::$cur->money) { |
169 | 169 | $currency = Money\Currency::get($currency_id); |
170 | 170 | if ($currency) { |
171 | - echo ' ' . $currency->acronym(); |
|
171 | + echo ' '.$currency->acronym(); |
|
172 | 172 | } else { |
173 | 173 | echo ' руб.'; |
174 | 174 | } |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | case'2': |
208 | 208 | $price = Ecommerce\Item\Offer\Price::get($status->info); |
209 | 209 | if ($price) { |
210 | - echo "<a href = '/ecommerce/view/{$item->id}'>" . $price->offer->item->name() . "</a>"; |
|
210 | + echo "<a href = '/ecommerce/view/{$item->id}'>".$price->offer->item->name()."</a>"; |
|
211 | 211 | } else { |
212 | 212 | echo 'Товар удален'; |
213 | 213 | } |
@@ -216,7 +216,7 @@ discard block |
||
216 | 216 | $info = explode('|', $status->info); |
217 | 217 | $price = Ecommerce\Item\Offer\Price::get($info[0]); |
218 | 218 | if ($price) { |
219 | - echo "<a href = '/ecommerce/view/{$item->id}'>" . $price->offer->item->name() . "</a> " . ($info[1] > 0 ? '+' . $info[1] : $info[1]); |
|
219 | + echo "<a href = '/ecommerce/view/{$item->id}'>".$price->offer->item->name()."</a> ".($info[1] > 0 ? '+'.$info[1] : $info[1]); |
|
220 | 220 | } else { |
221 | 221 | echo 'Товар удален'; |
222 | 222 | } |