@@ -108,7 +108,7 @@ |
||
108 | 108 | * If match was not found - mirror is not allowed! |
109 | 109 | */ |
110 | 110 | if ($this->mirror_index === -1) { |
111 | - throw new ExitException("Mirror $this->host not allowed", 400); |
|
111 | + throw new ExitException("mirror $this->host not allowed", 400); |
|
112 | 112 | } |
113 | 113 | $results = $this->analyze_route_path($this->path); |
114 | 114 | $this->handle_redirect($Config, $results['path_normalized']); |
@@ -10,16 +10,16 @@ |
||
10 | 10 | ArrayAccess, |
11 | 11 | SimpleXMLElement; |
12 | 12 | /** |
13 | - * False_class is used for chained calling, when some method may return false. |
|
14 | - * |
|
15 | - * Usage of class is simple, just return his instance instead of real boolean <i>false</i>. |
|
16 | - * On every call of any method or getting of any property or getting any element of array instance of the this class will be returned. |
|
17 | - * Access to anything of this class instance will be casted to boolean <i>false</i> |
|
18 | - * |
|
19 | - * Inherits SimpleXMLElement in order to be casted from object to boolean as <i>false</i> |
|
20 | - * |
|
21 | - * @property string $error |
|
22 | - */ |
|
13 | + * False_class is used for chained calling, when some method may return false. |
|
14 | + * |
|
15 | + * Usage of class is simple, just return his instance instead of real boolean <i>false</i>. |
|
16 | + * On every call of any method or getting of any property or getting any element of array instance of the this class will be returned. |
|
17 | + * Access to anything of this class instance will be casted to boolean <i>false</i> |
|
18 | + * |
|
19 | + * Inherits SimpleXMLElement in order to be casted from object to boolean as <i>false</i> |
|
20 | + * |
|
21 | + * @property string $error |
|
22 | + */ |
|
23 | 23 | class False_class extends SimpleXMLElement implements ArrayAccess { |
24 | 24 | /** |
25 | 25 | * Use this method to obtain correct instance |
@@ -24,7 +24,7 @@ |
||
24 | 24 | 'group' => 'text', |
25 | 25 | 'label' => 'text' |
26 | 26 | ]; |
27 | - protected $table = '[prefix]permissions'; |
|
27 | + protected $table = '[prefix]permissions'; |
|
28 | 28 | /** |
29 | 29 | * Array of all permissions for quick selecting |
30 | 30 | * @var array |
@@ -9,8 +9,8 @@ |
||
9 | 9 | use |
10 | 10 | cs\Language; |
11 | 11 | /** |
12 | - * Class for simplified work with translations, when using common prefix |
|
13 | - */ |
|
12 | + * Class for simplified work with translations, when using common prefix |
|
13 | + */ |
|
14 | 14 | class Prefix { |
15 | 15 | /** |
16 | 16 | * @var string |
@@ -43,7 +43,7 @@ |
||
43 | 43 | "public_key" : "@public_key" |
44 | 44 | } |
45 | 45 | |
46 | -CONFIG; |
|
46 | +config; |
|
47 | 47 | /** |
48 | 48 | * @param string $source |
49 | 49 | * @param string $target |
@@ -154,10 +154,10 @@ discard block |
||
154 | 154 | * Try to load classes from different places. If not found in one place - try in another. |
155 | 155 | */ |
156 | 156 | if ( |
157 | - strlen($file = @$file_index_map[str_replace('//', '/', "core/classes/$namespace/$class_name.php")]) || //Core classes |
|
157 | + strlen($file = @$file_index_map[str_replace('//', '/', "core/classes/$namespace/$class_name.php")]) || //Core classes |
|
158 | 158 | strlen($file = @$file_index_map[str_replace('//', '/', "core/thirdparty/$namespace/$class_name.php")]) || //Third party classes |
159 | - strlen($file = @$file_index_map[str_replace('//', '/', "core/traits/$namespace/$class_name.php")]) || //Core traits |
|
160 | - strlen($file = @$file_index_map[str_replace('//', '/', "core/engines/$namespace/$class_name.php")]) || //Core engines |
|
159 | + strlen($file = @$file_index_map[str_replace('//', '/', "core/traits/$namespace/$class_name.php")]) || //Core traits |
|
160 | + strlen($file = @$file_index_map[str_replace('//', '/', "core/engines/$namespace/$class_name.php")]) || //Core engines |
|
161 | 161 | strlen($file = @$file_index_map[str_replace('//', '/', "components/$namespace/$class_name.php")]) //Classes in modules and plugins |
162 | 162 | ) { |
163 | 163 | /** @noinspection UntrustedInclusionInspection */ |
@@ -279,7 +279,7 @@ discard block |
||
279 | 279 | * @throws Exception |
280 | 280 | */ |
281 | 281 | protected static function initialize_system_config ($cdb, $source, $site_name, $url, $admin_email, $language, $domain, $timezone, $mode) { |
282 | - $config = [ |
|
282 | + $config = [ |
|
283 | 283 | 'name' => $site_name, |
284 | 284 | 'url' => [$url], |
285 | 285 | 'admin_email' => $admin_email, |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | php $argv[0] -i |
178 | 178 | php $argv[0] -sn Web-site -i |
179 | 179 | |
180 | -HELP; |
|
180 | +help; |
|
181 | 181 | return; |
182 | 182 | } |
183 | 183 | |
@@ -217,4 +217,4 @@ discard block |
||
217 | 217 | Login: $admin_login |
218 | 218 | Password: $options[admin_password] |
219 | 219 | |
220 | -SUCCESS; |
|
220 | +success; |
@@ -120,7 +120,7 @@ |
||
120 | 120 | if (isset($_POST['site_url'])) { |
121 | 121 | $url = $_POST['site_url']; |
122 | 122 | } else { |
123 | - $https = @$_SERVER['HTTPS'] ? $_SERVER['HTTPS'] !== 'off' : ( |
|
123 | + $https = @$_SERVER['HTTPS'] ? $_SERVER['HTTPS'] !== 'off' : ( |
|
124 | 124 | @$_SERVER['REQUEST_SCHEME'] === 'https' || |
125 | 125 | @$_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https' |
126 | 126 | ); |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | 'in' => [h::span('Regular user'), h::span('Expert')], |
40 | 40 | 'onclick' => <<<JS |
41 | 41 | var items = document.querySelectorAll('expert'), i; for (i = 0; i < items.length; i++) items[i].style.display = this.value == '0' ? 'table-row' : ''; |
42 | -JS |
|
42 | +js |
|
43 | 43 | ] |
44 | 44 | ) |
45 | 45 | ). |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | <p style="color: red">$warning</p> |
188 | 188 | <button onclick="location.href = '/';">Go to website</button> |
189 | 189 | </table> |
190 | -HTML; |
|
190 | +html; |
|
191 | 191 | } |
192 | 192 | |
193 | 193 | if (count(explode('/', $_SERVER['REQUEST_URI'])) > 3) { |
@@ -92,7 +92,7 @@ |
||
92 | 92 | 0, |
93 | 93 | strpos($table_name, '"') |
94 | 94 | ); |
95 | - $update = preg_replace_callback( |
|
95 | + $update = preg_replace_callback( |
|
96 | 96 | '/"([^"]+)"/', |
97 | 97 | function ($matches) { |
98 | 98 | return "\"$matches[1]\" = EXCLUDED.\"$matches[1]\""; |
@@ -407,7 +407,7 @@ discard block |
||
407 | 407 | /** |
408 | 408 | * Narrow the dependencies to current module only |
409 | 409 | */ |
410 | - $dependencies = array_unique( |
|
410 | + $dependencies = array_unique( |
|
411 | 411 | array_merge( |
412 | 412 | ['System'], |
413 | 413 | $dependencies['System'], |
@@ -481,7 +481,7 @@ discard block |
||
481 | 481 | * @return string[][] |
482 | 482 | */ |
483 | 483 | protected function add_versions_hash ($includes) { |
484 | - $content = array_reduce( |
|
484 | + $content = array_reduce( |
|
485 | 485 | get_files_list(DIR.'/components', '/^meta\.json$/', 'f', true, true), |
486 | 486 | function ($content, $file) { |
487 | 487 | return $content.file_get_contents($file); |