@@ -1,10 +1,10 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * @package CleverStyle CMS |
|
4 | - * @author Nazar Mokrynskyi <[email protected]> |
|
5 | - * @copyright Copyright (c) 2016, Nazar Mokrynskyi |
|
6 | - * @license MIT License, see license.txt |
|
7 | - */ |
|
3 | + * @package CleverStyle CMS |
|
4 | + * @author Nazar Mokrynskyi <[email protected]> |
|
5 | + * @copyright Copyright (c) 2016, Nazar Mokrynskyi |
|
6 | + * @license MIT License, see license.txt |
|
7 | + */ |
|
8 | 8 | namespace cs\DB; |
9 | 9 | class SQLite extends _Abstract { |
10 | 10 | /** |
@@ -1,10 +1,10 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * @package CleverStyle CMS |
|
4 | - * @author Nazar Mokrynskyi <[email protected]> |
|
5 | - * @copyright Copyright (c) 2016, Nazar Mokrynskyi |
|
6 | - * @license MIT License, see license.txt |
|
7 | - */ |
|
3 | + * @package CleverStyle CMS |
|
4 | + * @author Nazar Mokrynskyi <[email protected]> |
|
5 | + * @copyright Copyright (c) 2016, Nazar Mokrynskyi |
|
6 | + * @license MIT License, see license.txt |
|
7 | + */ |
|
8 | 8 | namespace cs\DB; |
9 | 9 | class SQLite extends _Abstract { |
10 | 10 | /** |
@@ -1,16 +1,16 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * @package CleverStyle CMS |
|
4 | - * @author Nazar Mokrynskyi <[email protected]> |
|
5 | - * @copyright Copyright (c) 2015-2016, Nazar Mokrynskyi |
|
6 | - * @license MIT License, see license.txt |
|
7 | - */ |
|
3 | + * @package CleverStyle CMS |
|
4 | + * @author Nazar Mokrynskyi <[email protected]> |
|
5 | + * @copyright Copyright (c) 2015-2016, Nazar Mokrynskyi |
|
6 | + * @license MIT License, see license.txt |
|
7 | + */ |
|
8 | 8 | /** |
9 | - * Base system functions, do not edit this file, or make it very carefully |
|
10 | - * otherwise system workability may be broken |
|
11 | - * |
|
12 | - * This particular file contains functions that work with global state (cookies, headers, status codes, etc.) |
|
13 | - */ |
|
9 | + * Base system functions, do not edit this file, or make it very carefully |
|
10 | + * otherwise system workability may be broken |
|
11 | + * |
|
12 | + * This particular file contains functions that work with global state (cookies, headers, status codes, etc.) |
|
13 | + */ |
|
14 | 14 | use |
15 | 15 | cs\Config, |
16 | 16 | cs\Request, |
@@ -41,11 +41,11 @@ discard block |
||
41 | 41 | * Try to load classes from different places. If not found in one place - try in another. |
42 | 42 | */ |
43 | 43 | if ( |
44 | - _require_once($file = DIR."/core/classes/$namespace/$class_name.php", false) || //Core classes |
|
44 | + _require_once($file = DIR."/core/classes/$namespace/$class_name.php", false) || //Core classes |
|
45 | 45 | _require_once($file = DIR."/core/thirdparty/$namespace/$class_name.php", false) || //Third party classes |
46 | - _require_once($file = DIR."/core/traits/$namespace/$class_name.php", false) || //Core traits |
|
47 | - _require_once($file = ENGINES."/$namespace/$class_name.php", false) || //Core engines |
|
48 | - _require_once($file = MODULES."/../$namespace/$class_name.php", false) || //Classes in modules |
|
46 | + _require_once($file = DIR."/core/traits/$namespace/$class_name.php", false) || //Core traits |
|
47 | + _require_once($file = ENGINES."/$namespace/$class_name.php", false) || //Core engines |
|
48 | + _require_once($file = MODULES."/../$namespace/$class_name.php", false) || //Classes in modules |
|
49 | 49 | _require_once($file = PLUGINS."/../$namespace/$class_name.php", false) //Classes in plugins |
50 | 50 | ) { |
51 | 51 | $cache[$class] = realpath($file); |
@@ -129,13 +129,13 @@ discard block |
||
129 | 129 | * Enabling of page interface |
130 | 130 | */ |
131 | 131 | function interface_on () { |
132 | - Page::instance()->interface = true; |
|
132 | + Page::instance()->interface = true; |
|
133 | 133 | } |
134 | 134 | /** |
135 | 135 | * Disabling of page interface |
136 | 136 | */ |
137 | 137 | function interface_off () { |
138 | - Page::instance()->interface = false; |
|
138 | + Page::instance()->interface = false; |
|
139 | 139 | } |
140 | 140 | /** |
141 | 141 | * Easy getting of translations |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | * @return false|string |
163 | 163 | */ |
164 | 164 | function url_by_source ($source) { |
165 | - $Config = Config::instance(true); |
|
165 | + $Config = Config::instance(true); |
|
166 | 166 | if (!$Config) { |
167 | 167 | return false; |
168 | 168 | } |
@@ -180,7 +180,7 @@ discard block |
||
180 | 180 | * @return false|string |
181 | 181 | */ |
182 | 182 | function source_by_url ($url) { |
183 | - $Config = Config::instance(true); |
|
183 | + $Config = Config::instance(true); |
|
184 | 184 | if (!$Config) { |
185 | 185 | return false; |
186 | 186 | } |
@@ -218,8 +218,8 @@ discard block |
||
218 | 218 | if (!is_numeric($time)) { |
219 | 219 | return $time; |
220 | 220 | } |
221 | - $L = Language::instance(); |
|
222 | - $res = []; |
|
221 | + $L = Language::instance(); |
|
222 | + $res = []; |
|
223 | 223 | if ($time >= 31536000) { |
224 | 224 | $time_x = round($time / 31536000); |
225 | 225 | $time -= $time_x * 31536000; |
@@ -230,12 +230,12 @@ discard block |
||
230 | 230 | $time -= $time_x * 2592000; |
231 | 231 | $res[] = $L->time($time_x, 'M'); |
232 | 232 | } |
233 | - if($time >= 86400) { |
|
233 | + if ($time >= 86400) { |
|
234 | 234 | $time_x = round($time / 86400); |
235 | 235 | $time -= $time_x * 86400; |
236 | 236 | $res[] = $L->time($time_x, 'd'); |
237 | 237 | } |
238 | - if($time >= 3600) { |
|
238 | + if ($time >= 3600) { |
|
239 | 239 | $time_x = round($time / 3600); |
240 | 240 | $time -= $time_x * 3600; |
241 | 241 | $res[] = $L->time($time_x, 'h'); |
@@ -296,7 +296,7 @@ discard block |
||
296 | 296 | $timezones_ = $timezones = []; |
297 | 297 | foreach ($tzs as $tz) { |
298 | 298 | $offset = (new DateTimeZone($tz))->getOffset(new DateTime); |
299 | - $offset_ = ($offset < 0 ? '-' : '+'). |
|
299 | + $offset_ = ($offset < 0 ? '-' : '+'). |
|
300 | 300 | str_pad(floor(abs($offset / 3600)), 2, 0, STR_PAD_LEFT).':'. |
301 | 301 | str_pad(abs(($offset % 3600) / 60), 2, 0, STR_PAD_LEFT); |
302 | 302 | $timezones_[(39600 + $offset).$tz] = [ |
@@ -328,7 +328,7 @@ discard block |
||
328 | 328 | * @return false|string |
329 | 329 | */ |
330 | 330 | function get_core_ml_text ($item) { |
331 | - $Config = Config::instance(true); |
|
331 | + $Config = Config::instance(true); |
|
332 | 332 | if (!$Config) { |
333 | 333 | return false; |
334 | 334 | } |
@@ -484,7 +484,7 @@ discard block |
||
484 | 484 | ] |
485 | 485 | ); |
486 | 486 | }; |
487 | - $render_page_item = function ($i) use ($page, $url, $head_links, $render_head_links) { |
|
487 | + $render_page_item = function ($i) use ($page, $url, $head_links, $render_head_links) { |
|
488 | 488 | if ($head_links) { |
489 | 489 | $render_head_links($i); |
490 | 490 | } |
@@ -577,14 +577,14 @@ discard block |
||
577 | 577 | } |
578 | 578 | $output = []; |
579 | 579 | if (!is_callable($url)) { |
580 | - $original_url = $url; |
|
580 | + $original_url = $url; |
|
581 | 581 | $url = function ($page) use ($original_url) { |
582 | 582 | return sprintf($original_url, $page); |
583 | 583 | }; |
584 | 584 | } |
585 | 585 | if ($total <= 11) { |
586 | 586 | for ($i = 1; $i <= $total; ++$i) { |
587 | - $output[] = [ |
|
587 | + $output[] = [ |
|
588 | 588 | $i, |
589 | 589 | [ |
590 | 590 | 'is' => 'cs-button', |
@@ -598,7 +598,7 @@ discard block |
||
598 | 598 | } else { |
599 | 599 | if ($page <= 6) { |
600 | 600 | for ($i = 1; $i <= 7; ++$i) { |
601 | - $output[] = [ |
|
601 | + $output[] = [ |
|
602 | 602 | $i, |
603 | 603 | [ |
604 | 604 | 'is' => 'cs-button', |
@@ -609,7 +609,7 @@ discard block |
||
609 | 609 | ] |
610 | 610 | ]; |
611 | 611 | } |
612 | - $output[] = [ |
|
612 | + $output[] = [ |
|
613 | 613 | '...', |
614 | 614 | [ |
615 | 615 | 'is' => 'cs-button', |
@@ -618,7 +618,7 @@ discard block |
||
618 | 618 | ] |
619 | 619 | ]; |
620 | 620 | for ($i = $total - 2; $i <= $total; ++$i) { |
621 | - $output[] = [ |
|
621 | + $output[] = [ |
|
622 | 622 | $i, |
623 | 623 | [ |
624 | 624 | 'is' => 'cs-button', |
@@ -630,7 +630,7 @@ discard block |
||
630 | 630 | } |
631 | 631 | } elseif ($page >= $total - 5) { |
632 | 632 | for ($i = 1; $i <= 3; ++$i) { |
633 | - $output[] = [ |
|
633 | + $output[] = [ |
|
634 | 634 | $i, |
635 | 635 | [ |
636 | 636 | 'is' => 'cs-button', |
@@ -640,7 +640,7 @@ discard block |
||
640 | 640 | ] |
641 | 641 | ]; |
642 | 642 | } |
643 | - $output[] = [ |
|
643 | + $output[] = [ |
|
644 | 644 | '...', |
645 | 645 | [ |
646 | 646 | 'is' => 'cs-button', |
@@ -649,7 +649,7 @@ discard block |
||
649 | 649 | ] |
650 | 650 | ]; |
651 | 651 | for ($i = $total - 6; $i <= $total; ++$i) { |
652 | - $output[] = [ |
|
652 | + $output[] = [ |
|
653 | 653 | $i, |
654 | 654 | [ |
655 | 655 | 'is' => 'cs-button', |
@@ -662,7 +662,7 @@ discard block |
||
662 | 662 | } |
663 | 663 | } else { |
664 | 664 | for ($i = 1; $i <= 2; ++$i) { |
665 | - $output[] = [ |
|
665 | + $output[] = [ |
|
666 | 666 | $i, |
667 | 667 | [ |
668 | 668 | 'is' => 'cs-button', |
@@ -672,7 +672,7 @@ discard block |
||
672 | 672 | ] |
673 | 673 | ]; |
674 | 674 | } |
675 | - $output[] = [ |
|
675 | + $output[] = [ |
|
676 | 676 | '...', |
677 | 677 | [ |
678 | 678 | 'is' => 'cs-button', |
@@ -681,7 +681,7 @@ discard block |
||
681 | 681 | ] |
682 | 682 | ]; |
683 | 683 | for ($i = $page - 2; $i <= $page + 2; ++$i) { |
684 | - $output[] = [ |
|
684 | + $output[] = [ |
|
685 | 685 | $i, |
686 | 686 | [ |
687 | 687 | 'is' => 'cs-button', |
@@ -692,7 +692,7 @@ discard block |
||
692 | 692 | ] |
693 | 693 | ]; |
694 | 694 | } |
695 | - $output[] = [ |
|
695 | + $output[] = [ |
|
696 | 696 | '...', |
697 | 697 | [ |
698 | 698 | 'is' => 'cs-button', |
@@ -701,7 +701,7 @@ discard block |
||
701 | 701 | ] |
702 | 702 | ]; |
703 | 703 | for ($i = $total - 1; $i <= $total; ++$i) { |
704 | - $output[] = [ |
|
704 | + $output[] = [ |
|
705 | 705 | $i, |
706 | 706 | [ |
707 | 707 | 'is' => 'cs-button', |
@@ -1,14 +1,14 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * @package CleverStyle CMS |
|
4 | - * @author Nazar Mokrynskyi <[email protected]> |
|
5 | - * @copyright Copyright (c) 2011-2016, Nazar Mokrynskyi |
|
6 | - * @license MIT License, see license.txt |
|
7 | - */ |
|
3 | + * @package CleverStyle CMS |
|
4 | + * @author Nazar Mokrynskyi <[email protected]> |
|
5 | + * @copyright Copyright (c) 2011-2016, Nazar Mokrynskyi |
|
6 | + * @license MIT License, see license.txt |
|
7 | + */ |
|
8 | 8 | /** |
9 | - * Base system functions, do not edit this file, or make it very carefully |
|
10 | - * otherwise system workability may be broken |
|
11 | - */ |
|
9 | + * Base system functions, do not edit this file, or make it very carefully |
|
10 | + * otherwise system workability may be broken |
|
11 | + */ |
|
12 | 12 | use |
13 | 13 | cs\App, |
14 | 14 | cs\Cache, |
@@ -19,8 +19,8 @@ discard block |
||
19 | 19 | cs\Response, |
20 | 20 | cs\Text; |
21 | 21 | /** |
22 | - * Auto Loading of classes |
|
23 | - */ |
|
22 | + * Auto Loading of classes |
|
23 | + */ |
|
24 | 24 | spl_autoload_register(function ($class) { |
25 | 25 | static $cache; |
26 | 26 | if (!isset($cache)) { |
@@ -56,8 +56,8 @@ discard block |
||
56 | 56 | return false; |
57 | 57 | }, true, true); |
58 | 58 | /** |
59 | - * Clean cache of classes autoload and customization |
|
60 | - */ |
|
59 | + * Clean cache of classes autoload and customization |
|
60 | + */ |
|
61 | 61 | function clean_classes_cache () { |
62 | 62 | if (file_exists(CACHE.'/classes/autoload')) { |
63 | 63 | unlink(CACHE.'/classes/autoload'); |
@@ -101,46 +101,46 @@ discard block |
||
101 | 101 | App::instance()->execute(); |
102 | 102 | } |
103 | 103 | /** |
104 | - * Enable of errors processing |
|
105 | - * @todo Remove in 4.x |
|
106 | - */ |
|
104 | + * Enable of errors processing |
|
105 | + * @todo Remove in 4.x |
|
106 | + */ |
|
107 | 107 | function errors_on () { |
108 | 108 | error_reporting(defined('DEBUG') && DEBUG ? E_ALL : E_ERROR | E_WARNING | E_PARSE); |
109 | 109 | } |
110 | 110 | /** |
111 | - * Disabling of errors processing |
|
112 | - * @todo Remove in 4.x |
|
113 | - */ |
|
111 | + * Disabling of errors processing |
|
112 | + * @todo Remove in 4.x |
|
113 | + */ |
|
114 | 114 | function errors_off () { |
115 | 115 | error_reporting(0); |
116 | 116 | } |
117 | 117 | /** |
118 | - * Enabling of page interface |
|
119 | - * |
|
120 | - * @deprecated Use `cs\Page::$interface` property instead |
|
121 | - * @todo Remove in 4.x |
|
122 | - */ |
|
118 | + * Enabling of page interface |
|
119 | + * |
|
120 | + * @deprecated Use `cs\Page::$interface` property instead |
|
121 | + * @todo Remove in 4.x |
|
122 | + */ |
|
123 | 123 | function interface_on () { |
124 | 124 | Page::instance()->interface = true; |
125 | 125 | } |
126 | 126 | /** |
127 | - * Disabling of page interface |
|
128 | - * |
|
129 | - * @deprecated Use `cs\Page::$interface` property instead |
|
130 | - * @todo Remove in 4.x |
|
131 | - */ |
|
127 | + * Disabling of page interface |
|
128 | + * |
|
129 | + * @deprecated Use `cs\Page::$interface` property instead |
|
130 | + * @todo Remove in 4.x |
|
131 | + */ |
|
132 | 132 | function interface_off () { |
133 | 133 | Page::instance()->interface = false; |
134 | 134 | } |
135 | 135 | /** |
136 | - * Easy getting of translations |
|
137 | - * |
|
138 | - * @param string $item |
|
139 | - * @param mixed $arguments There can be any necessary number of arguments here |
|
140 | - * @param mixed $_ |
|
141 | - * |
|
142 | - * @return string |
|
143 | - */ |
|
136 | + * Easy getting of translations |
|
137 | + * |
|
138 | + * @param string $item |
|
139 | + * @param mixed $arguments There can be any necessary number of arguments here |
|
140 | + * @param mixed $_ |
|
141 | + * |
|
142 | + * @return string |
|
143 | + */ |
|
144 | 144 | function __ ($item, $arguments = null, $_ = null) { |
145 | 145 | $L = Language::instance(); |
146 | 146 | if (func_num_args() > 1) { |
@@ -150,12 +150,12 @@ discard block |
||
150 | 150 | } |
151 | 151 | } |
152 | 152 | /** |
153 | - * Get file url by it's destination in file system |
|
154 | - * |
|
155 | - * @param string $source |
|
156 | - * |
|
157 | - * @return false|string |
|
158 | - */ |
|
153 | + * Get file url by it's destination in file system |
|
154 | + * |
|
155 | + * @param string $source |
|
156 | + * |
|
157 | + * @return false|string |
|
158 | + */ |
|
159 | 159 | function url_by_source ($source) { |
160 | 160 | $Config = Config::instance(true); |
161 | 161 | if (!$Config) { |
@@ -168,12 +168,12 @@ discard block |
||
168 | 168 | return false; |
169 | 169 | } |
170 | 170 | /** |
171 | - * Get file destination in file system by it's url |
|
172 | - * |
|
173 | - * @param string $url |
|
174 | - * |
|
175 | - * @return false|string |
|
176 | - */ |
|
171 | + * Get file destination in file system by it's url |
|
172 | + * |
|
173 | + * @param string $url |
|
174 | + * |
|
175 | + * @return false|string |
|
176 | + */ |
|
177 | 177 | function source_by_url ($url) { |
178 | 178 | $Config = Config::instance(true); |
179 | 179 | if (!$Config) { |
@@ -185,10 +185,10 @@ discard block |
||
185 | 185 | return false; |
186 | 186 | } |
187 | 187 | /** |
188 | - * Public cache cleaning |
|
189 | - * |
|
190 | - * @return bool |
|
191 | - */ |
|
188 | + * Public cache cleaning |
|
189 | + * |
|
190 | + * @return bool |
|
191 | + */ |
|
192 | 192 | function clean_pcache () { |
193 | 193 | $ok = true; |
194 | 194 | $list = get_files_list(PUBLIC_CACHE, false, 'fd', true, true, 'name|desc'); |
@@ -203,12 +203,12 @@ discard block |
||
203 | 203 | return $ok; |
204 | 204 | } |
205 | 205 | /** |
206 | - * Formatting of time in seconds to human-readable form |
|
207 | - * |
|
208 | - * @param int $time Time in seconds |
|
209 | - * |
|
210 | - * @return string |
|
211 | - */ |
|
206 | + * Formatting of time in seconds to human-readable form |
|
207 | + * |
|
208 | + * @param int $time Time in seconds |
|
209 | + * |
|
210 | + * @return string |
|
211 | + */ |
|
212 | 212 | function format_time ($time) { |
213 | 213 | if (!is_numeric($time)) { |
214 | 214 | return $time; |
@@ -246,13 +246,13 @@ discard block |
||
246 | 246 | return implode(' ', $res); |
247 | 247 | } |
248 | 248 | /** |
249 | - * Formatting of data size in bytes to human-readable form |
|
250 | - * |
|
251 | - * @param int $size |
|
252 | - * @param bool|int $round |
|
253 | - * |
|
254 | - * @return float|string |
|
255 | - */ |
|
249 | + * Formatting of data size in bytes to human-readable form |
|
250 | + * |
|
251 | + * @param int $size |
|
252 | + * @param bool|int $round |
|
253 | + * |
|
254 | + * @return float|string |
|
255 | + */ |
|
256 | 256 | function format_filesize ($size, $round = false) { |
257 | 257 | if (!is_numeric($size)) { |
258 | 258 | return $size; |
@@ -277,10 +277,10 @@ discard block |
||
277 | 277 | return $round ? round($size, $round).$unit : $size.$unit; |
278 | 278 | } |
279 | 279 | /** |
280 | - * Get list of timezones |
|
281 | - * |
|
282 | - * @return array |
|
283 | - */ |
|
280 | + * Get list of timezones |
|
281 | + * |
|
282 | + * @return array |
|
283 | + */ |
|
284 | 284 | function get_timezones_list () { |
285 | 285 | if ( |
286 | 286 | !class_exists('\\cs\\Cache', false) || |
@@ -316,12 +316,12 @@ discard block |
||
316 | 316 | return $timezones; |
317 | 317 | } |
318 | 318 | /** |
319 | - * Get multilingual value from $Config->core array |
|
320 | - * |
|
321 | - * @param string $item |
|
322 | - * |
|
323 | - * @return false|string |
|
324 | - */ |
|
319 | + * Get multilingual value from $Config->core array |
|
320 | + * |
|
321 | + * @param string $item |
|
322 | + * |
|
323 | + * @return false|string |
|
324 | + */ |
|
325 | 325 | function get_core_ml_text ($item) { |
326 | 326 | $Config = Config::instance(true); |
327 | 327 | if (!$Config) { |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | define('DIR', __DIR__); |
21 | 21 | } |
22 | 22 | mb_internal_encoding('utf-8'); |
23 | -define('ROOT', getcwd()); //Path to site root |
|
23 | +define('ROOT', getcwd()); //Path to site root |
|
24 | 24 | $fs = json_decode(file_get_contents(DIR.'/fs.json'), true); |
25 | 25 | /** |
26 | 26 | * Special autoloader for installer |
@@ -38,10 +38,10 @@ discard block |
||
38 | 38 | * Try to load classes from different places. If not found in one place - try in another. |
39 | 39 | */ |
40 | 40 | if ( |
41 | - strlen($file = @$fs[str_replace('//', '/', "core/classes/$namespace/$class_name.php")]) || //Core classes |
|
41 | + strlen($file = @$fs[str_replace('//', '/', "core/classes/$namespace/$class_name.php")]) || //Core classes |
|
42 | 42 | strlen($file = @$fs[str_replace('//', '/', "core/thirdparty/$namespace/$class_name.php")]) || //Third party classes |
43 | - strlen($file = @$fs[str_replace('//', '/', "core/traits/$namespace/$class_name.php")]) || //Core traits |
|
44 | - strlen($file = @$fs[str_replace('//', '/', "core/engines/$namespace/$class_name.php")]) || //Core engines |
|
43 | + strlen($file = @$fs[str_replace('//', '/', "core/traits/$namespace/$class_name.php")]) || //Core traits |
|
44 | + strlen($file = @$fs[str_replace('//', '/', "core/engines/$namespace/$class_name.php")]) || //Core engines |
|
45 | 45 | strlen($file = @$fs[str_replace('//', '/', "components/$namespace/$class_name.php")]) //Classes in modules and plugins |
46 | 46 | ) { |
47 | 47 | require_once DIR."/fs/$file"; |
@@ -1,19 +1,19 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * @package CleverStyle CMS |
|
4 | - * @subpackage Installer |
|
5 | - * @author Nazar Mokrynskyi <[email protected]> |
|
6 | - * @copyright Copyright (c) 2011-2016, Nazar Mokrynskyi |
|
7 | - * @license MIT License, see license.txt |
|
8 | - */ |
|
3 | + * @package CleverStyle CMS |
|
4 | + * @subpackage Installer |
|
5 | + * @author Nazar Mokrynskyi <[email protected]> |
|
6 | + * @copyright Copyright (c) 2011-2016, Nazar Mokrynskyi |
|
7 | + * @license MIT License, see license.txt |
|
8 | + */ |
|
9 | 9 | if (version_compare(PHP_VERSION, '5.5', '<')) { |
10 | 10 | echo 'CleverStyle CMS require PHP 5.5 or higher'; |
11 | 11 | return; |
12 | 12 | } |
13 | 13 | $cli = PHP_SAPI == 'cli'; |
14 | 14 | /** |
15 | - * Path to installer dir |
|
16 | - */ |
|
15 | + * Path to installer dir |
|
16 | + */ |
|
17 | 17 | if ($cli) { |
18 | 18 | define('DIR', 'phar://cleverstyle_cms.phar'); |
19 | 19 | } else { |
@@ -23,8 +23,8 @@ discard block |
||
23 | 23 | define('ROOT', getcwd()); //Path to site root |
24 | 24 | $fs = json_decode(file_get_contents(DIR.'/fs.json'), true); |
25 | 25 | /** |
26 | - * Special autoloader for installer |
|
27 | - */ |
|
26 | + * Special autoloader for installer |
|
27 | + */ |
|
28 | 28 | spl_autoload_register( |
29 | 29 | function ($class) use ($fs) { |
30 | 30 | $prepared_class_name = ltrim($class, '\\'); |
@@ -1,11 +1,11 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * @package OAuth2 |
|
4 | - * @category modules |
|
5 | - * @author Nazar Mokrynskyi <[email protected]> |
|
6 | - * @copyright Copyright (c) 2011-2016, Nazar Mokrynskyi |
|
7 | - * @license MIT License, see license.txt |
|
8 | - */ |
|
3 | + * @package OAuth2 |
|
4 | + * @category modules |
|
5 | + * @author Nazar Mokrynskyi <[email protected]> |
|
6 | + * @copyright Copyright (c) 2011-2016, Nazar Mokrynskyi |
|
7 | + * @license MIT License, see license.txt |
|
8 | + */ |
|
9 | 9 | namespace cs\modules\OAuth2; |
10 | 10 | |
11 | 11 | use |
@@ -20,8 +20,8 @@ discard block |
||
20 | 20 | ->header('pragma', 'no-cache'); |
21 | 21 | interface_off(); |
22 | 22 | /** |
23 | - * Errors processing |
|
24 | - */ |
|
23 | + * Errors processing |
|
24 | + */ |
|
25 | 25 | $Config = Config::instance(); |
26 | 26 | $Page = Page::instance(); |
27 | 27 | if (!isset($_POST['grant_type'])) { |
@@ -141,8 +141,8 @@ discard block |
||
141 | 141 | throw $e; |
142 | 142 | } |
143 | 143 | /** |
144 | - * Tokens operations processing |
|
145 | - */ |
|
144 | + * Tokens operations processing |
|
145 | + */ |
|
146 | 146 | switch ($_POST['grant_type']) { |
147 | 147 | case 'authorization_code': |
148 | 148 | if (!isset($_POST['code'])) { |
@@ -1,11 +1,11 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * @package CleverStyle CMS |
|
4 | - * @subpackage DarkEnergy theme |
|
5 | - * @author Nazar Mokrynskyi <[email protected]> |
|
6 | - * @copyright Copyright (c) 2014-2016, Nazar Mokrynskyi |
|
7 | - * @license MIT License, see license.txt |
|
8 | - */ |
|
3 | + * @package CleverStyle CMS |
|
4 | + * @subpackage DarkEnergy theme |
|
5 | + * @author Nazar Mokrynskyi <[email protected]> |
|
6 | + * @copyright Copyright (c) 2014-2016, Nazar Mokrynskyi |
|
7 | + * @license MIT License, see license.txt |
|
8 | + */ |
|
9 | 9 | namespace cs; |
10 | 10 | $Page = Page::instance(); |
11 | 11 | if (preg_match('/msie|trident/i', Request::instance()->user_agent)) { |
@@ -1,10 +1,10 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * @package CleverStyle CMS |
|
4 | - * @author Nazar Mokrynskyi <[email protected]> |
|
5 | - * @copyright Copyright (c) 2014-2016, Nazar Mokrynskyi |
|
6 | - * @license MIT License, see license.txt |
|
7 | - */ |
|
3 | + * @package CleverStyle CMS |
|
4 | + * @author Nazar Mokrynskyi <[email protected]> |
|
5 | + * @copyright Copyright (c) 2014-2016, Nazar Mokrynskyi |
|
6 | + * @license MIT License, see license.txt |
|
7 | + */ |
|
8 | 8 | namespace cs\Page; |
9 | 9 | use |
10 | 10 | cs\Core, |
@@ -1,10 +1,10 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * @package CleverStyle CMS |
|
4 | - * @author Nazar Mokrynskyi <[email protected]> |
|
5 | - * @copyright Copyright (c) 2011-2016, Nazar Mokrynskyi |
|
6 | - * @license MIT License, see license.txt |
|
7 | - */ |
|
3 | + * @package CleverStyle CMS |
|
4 | + * @author Nazar Mokrynskyi <[email protected]> |
|
5 | + * @copyright Copyright (c) 2011-2016, Nazar Mokrynskyi |
|
6 | + * @license MIT License, see license.txt |
|
7 | + */ |
|
8 | 8 | namespace cs\User; |
9 | 9 | use |
10 | 10 | cs\Config, |