@@ -39,7 +39,7 @@ |
||
39 | 39 | { |
40 | 40 | if ($this->translateModel && defined('LANG')) { |
41 | 41 | // Если есть массив переводов и установлена константа активного языка или другого языка |
42 | - if(self::$custom_lang){ |
|
42 | + if(self::$custom_lang) { |
|
43 | 43 | self::setLang(self::$custom_lang); |
44 | 44 | } else { |
45 | 45 | self::setLang(LANG); // Устанавливаем текущий язык |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | 'class' => 'Publication', |
23 | 23 | 'model' => 'Publication', |
24 | 24 | 'where' => "", // preview_inner='0' , etc. |
25 | - 'getLink' => function($model, $lang){ |
|
25 | + 'getLink' => function($model, $lang) { |
|
26 | 26 | return $this->langUrlCustom([ |
27 | 27 | 'for' => 'publication', |
28 | 28 | 'type' => $model->getTypeSlug(), |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | ],[ |
32 | 32 | 'class' => 'Page', |
33 | 33 | 'model' => 'Page', |
34 | - 'getLink' => function($model, $lang){ |
|
34 | + 'getLink' => function($model, $lang) { |
|
35 | 35 | return $this->langUrlCustom([ |
36 | 36 | 'for' => 'page', |
37 | 37 | 'slug' => $model->getSlug()], $lang); |
@@ -47,11 +47,11 @@ discard block |
||
47 | 47 | $cache = $this->getDi()->get('cache'); |
48 | 48 | $sitemap_xml = $cache->get($this->cacheViewKey); |
49 | 49 | |
50 | - if(!$sitemap_xml){ |
|
50 | + if(!$sitemap_xml) { |
|
51 | 51 | $langs = Language::find(['columns' => 'iso,primary']); |
52 | 52 | |
53 | 53 | //link(s) for main-page(s) |
54 | - foreach ($langs as $lang){ |
|
54 | + foreach ($langs as $lang) { |
|
55 | 55 | $suffix = !$lang['primary'] ? $lang['iso'] . '/' : ''; |
56 | 56 | $this->links[] = [ |
57 | 57 | 'url' => 'http://' . $_SERVER['HTTP_HOST'] . '/' . $suffix, |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | foreach ($langs as $lang) { |
69 | 69 | foreach ($rows as $row) { |
70 | 70 | $row::setCustomLang($lang->iso); |
71 | - if($row->getSlug() !== 'index' && $row->getTitle()){ |
|
71 | + if($row->getSlug() !== 'index' && $row->getTitle()) { |
|
72 | 72 | $this->links[] = [ |
73 | 73 | 'url' => 'http://' . $_SERVER['HTTP_HOST'] . $m['getLink']($row, $lang->iso), |
74 | 74 | 'updated_at' => date('c', strtotime($row->getUpdatedAt())), |
@@ -21,7 +21,8 @@ discard block |
||
21 | 21 | * |
22 | 22 | * @return string|false The hashed password, or false on error. |
23 | 23 | */ |
24 | - function password_hash($password, $algo, array $options = array()) { |
|
24 | + function password_hash($password, $algo, array $options = array()) |
|
25 | + { |
|
25 | 26 | if (!function_exists('crypt')) { |
26 | 27 | trigger_error("Crypt must be loaded for password_hash to function", E_USER_WARNING); |
27 | 28 | return null; |
@@ -149,7 +150,8 @@ discard block |
||
149 | 150 | * |
150 | 151 | * @return array The array of information about the hash. |
151 | 152 | */ |
152 | - function password_get_info($hash) { |
|
153 | + function password_get_info($hash) |
|
154 | + { |
|
153 | 155 | $return = array( |
154 | 156 | 'algo' => 0, |
155 | 157 | 'algoName' => 'unknown', |
@@ -175,7 +177,8 @@ discard block |
||
175 | 177 | * |
176 | 178 | * @return boolean True if the password needs to be rehashed. |
177 | 179 | */ |
178 | - function password_needs_rehash($hash, $algo, array $options = array()) { |
|
180 | + function password_needs_rehash($hash, $algo, array $options = array()) |
|
181 | + { |
|
179 | 182 | $info = password_get_info($hash); |
180 | 183 | if ($info['algo'] != $algo) { |
181 | 184 | return true; |
@@ -199,7 +202,8 @@ discard block |
||
199 | 202 | * |
200 | 203 | * @return boolean If the password matches the hash |
201 | 204 | */ |
202 | - function password_verify($password, $hash) { |
|
205 | + function password_verify($password, $hash) |
|
206 | + { |
|
203 | 207 | if (!function_exists('crypt')) { |
204 | 208 | trigger_error("Crypt must be loaded for password_verify to function", E_USER_WARNING); |
205 | 209 | return false; |