@@ -215,7 +215,7 @@ |
||
| 215 | 215 | * |
| 216 | 216 | * @return array|false |
| 217 | 217 | */ |
| 218 | - protected static function & get_block_by_index ($index) { |
|
| 218 | + protected static function & get_block_by_index($index) { |
|
| 219 | 219 | foreach (Config::instance()->components['blocks'] as &$block) { |
| 220 | 220 | if ($block['index'] == $index) { |
| 221 | 221 | return $block; |
@@ -1,12 +1,12 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * @package CleverStyle CMS |
|
| 4 | - * @subpackage System module |
|
| 5 | - * @category modules |
|
| 6 | - * @author Nazar Mokrynskyi <[email protected]> |
|
| 7 | - * @copyright Copyright (c) 2015-2016, Nazar Mokrynskyi |
|
| 8 | - * @license MIT License, see license.txt |
|
| 9 | - */ |
|
| 3 | + * @package CleverStyle CMS |
|
| 4 | + * @subpackage System module |
|
| 5 | + * @category modules |
|
| 6 | + * @author Nazar Mokrynskyi <[email protected]> |
|
| 7 | + * @copyright Copyright (c) 2015-2016, Nazar Mokrynskyi |
|
| 8 | + * @license MIT License, see license.txt |
|
| 9 | + */ |
|
| 10 | 10 | namespace cs; |
| 11 | 11 | |
| 12 | 12 | $Config = Config::instance(); |
@@ -111,7 +111,7 @@ |
||
| 111 | 111 | 'value', |
| 112 | 112 | 'id' |
| 113 | 113 | ); |
| 114 | - $data['users'] = array_column( |
|
| 114 | + $data['users'] = array_column( |
|
| 115 | 115 | $User->db()->qfa( |
| 116 | 116 | [ |
| 117 | 117 | "SELECT |
@@ -1,12 +1,12 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * @package CleverStyle CMS |
|
| 4 | - * @subpackage System module |
|
| 5 | - * @category modules |
|
| 6 | - * @author Nazar Mokrynskyi <[email protected]> |
|
| 7 | - * @copyright Copyright (c) 2015-2016, Nazar Mokrynskyi |
|
| 8 | - * @license MIT License, see license.txt |
|
| 9 | - */ |
|
| 3 | + * @package CleverStyle CMS |
|
| 4 | + * @subpackage System module |
|
| 5 | + * @category modules |
|
| 6 | + * @author Nazar Mokrynskyi <[email protected]> |
|
| 7 | + * @copyright Copyright (c) 2015-2016, Nazar Mokrynskyi |
|
| 8 | + * @license MIT License, see license.txt |
|
| 9 | + */ |
|
| 10 | 10 | namespace cs; |
| 11 | 11 | |
| 12 | 12 | $Config = Config::instance(); |
@@ -140,7 +140,7 @@ |
||
| 140 | 140 | // Disable all versions except RFC6455, which is supported by all modern browsers |
| 141 | 141 | $ws_server->disableVersion(0); |
| 142 | 142 | $ws_server->disableVersion(6); |
| 143 | - $this->io_server = IoServer::factory( |
|
| 143 | + $this->io_server = IoServer::factory( |
|
| 144 | 144 | new HttpServer($ws_server), |
| 145 | 145 | $this->listen_port, |
| 146 | 146 | $this->listen_locally |
@@ -1,11 +1,11 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * @package WebSockets |
|
| 4 | - * @category modules |
|
| 5 | - * @author Nazar Mokrynskyi <[email protected]> |
|
| 6 | - * @copyright Copyright (c) 2015-2016, Nazar Mokrynskyi |
|
| 7 | - * @license MIT License, see license.txt |
|
| 8 | - */ |
|
| 3 | + * @package WebSockets |
|
| 4 | + * @category modules |
|
| 5 | + * @author Nazar Mokrynskyi <[email protected]> |
|
| 6 | + * @copyright Copyright (c) 2015-2016, Nazar Mokrynskyi |
|
| 7 | + * @license MIT License, see license.txt |
|
| 8 | + */ |
|
| 9 | 9 | namespace cs\modules\WebSockets; |
| 10 | 10 | use |
| 11 | 11 | Ratchet\Client\Factory as Client_factory, |
@@ -25,8 +25,8 @@ discard block |
||
| 25 | 25 | Exception, |
| 26 | 26 | SplObjectStorage; |
| 27 | 27 | /** |
| 28 | - * @method static Server instance($check = false) |
|
| 29 | - */ |
|
| 28 | + * @method static Server instance($check = false) |
|
| 29 | + */ |
|
| 30 | 30 | class Server implements MessageComponentInterface { |
| 31 | 31 | use |
| 32 | 32 | Singleton; |
@@ -10,8 +10,8 @@ |
||
| 10 | 10 | namespace cs\plugins\SimpleImage; |
| 11 | 11 | require_once __DIR__.'/abeautifulsite/SimpleImage.php'; |
| 12 | 12 | /** |
| 13 | - * Class SimpleImage |
|
| 14 | - * This class makes image manipulation in PHP as simple as possible. |
|
| 15 | - * @package SimpleImage |
|
| 16 | - */ |
|
| 13 | + * Class SimpleImage |
|
| 14 | + * This class makes image manipulation in PHP as simple as possible. |
|
| 15 | + * @package SimpleImage |
|
| 16 | + */ |
|
| 17 | 17 | class SimpleImage extends \abeautifulsite\SimpleImage {} |
@@ -5,5 +5,5 @@ |
||
| 5 | 5 | * @copyright Copyright (c) 2011-2015, Nazar Mokrynskyi |
| 6 | 6 | * @license MIT License, see license.txt |
| 7 | 7 | */ |
| 8 | -define('DEBUG', false); |
|
| 9 | -define('XHTML_TAGS_STYLE', false); |
|
| 8 | +define('DEBUG', false); |
|
| 9 | +define('XHTML_TAGS_STYLE', false); |
|
@@ -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; |
| 9 | 9 | use |
| 10 | 10 | h, |
@@ -37,7 +37,7 @@ |
||
| 37 | 37 | 'title' => 'html', |
| 38 | 38 | 'description' => 'html' |
| 39 | 39 | ]; |
| 40 | - protected $table = '[prefix]groups'; |
|
| 40 | + protected $table = '[prefix]groups'; |
|
| 41 | 41 | /** |
| 42 | 42 | * @var Prefix |
| 43 | 43 | */ |
@@ -1,32 +1,32 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * @package CleverStyle CMS |
|
| 4 | - * @author Nazar Mokrynskyi <[email protected]> |
|
| 5 | - * @copyright Copyright (c) 2013-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) 2013-2016, Nazar Mokrynskyi |
|
| 6 | + * @license MIT License, see license.txt |
|
| 7 | + */ |
|
| 8 | 8 | /** |
| 9 | - * Provides next events:<br> |
|
| 10 | - * |
|
| 11 | - * System/User/Group/add |
|
| 12 | - * ['id' => <i>group_id</i>] |
|
| 13 | - * |
|
| 14 | - * System/User/Group/del/before |
|
| 15 | - * ['id' => <i>group_id</i>] |
|
| 16 | - * |
|
| 17 | - * System/User/Group/del/after |
|
| 18 | - * ['id' => <i>group_id</i>] |
|
| 19 | - * |
|
| 20 | - */ |
|
| 9 | + * Provides next events:<br> |
|
| 10 | + * |
|
| 11 | + * System/User/Group/add |
|
| 12 | + * ['id' => <i>group_id</i>] |
|
| 13 | + * |
|
| 14 | + * System/User/Group/del/before |
|
| 15 | + * ['id' => <i>group_id</i>] |
|
| 16 | + * |
|
| 17 | + * System/User/Group/del/after |
|
| 18 | + * ['id' => <i>group_id</i>] |
|
| 19 | + * |
|
| 20 | + */ |
|
| 21 | 21 | namespace cs; |
| 22 | 22 | use |
| 23 | 23 | cs\Cache\Prefix, |
| 24 | 24 | cs\Permission\Any; |
| 25 | 25 | /** |
| 26 | - * Class for groups manipulating |
|
| 27 | - * |
|
| 28 | - * @method static Group instance($check = false) |
|
| 29 | - */ |
|
| 26 | + * Class for groups manipulating |
|
| 27 | + * |
|
| 28 | + * @method static Group instance($check = false) |
|
| 29 | + */ |
|
| 30 | 30 | class Group { |
| 31 | 31 | use |
| 32 | 32 | CRUD_helpers, |
@@ -19,10 +19,10 @@ discard block |
||
| 19 | 19 | Singleton, |
| 20 | 20 | Includes; |
| 21 | 21 | public $Content; |
| 22 | - public $interface = true; |
|
| 23 | - public $pre_Html = ''; |
|
| 24 | - public $Html = ''; |
|
| 25 | - public $Description = ''; |
|
| 22 | + public $interface = true; |
|
| 23 | + public $pre_Html = ''; |
|
| 24 | + public $Html = ''; |
|
| 25 | + public $Description = ''; |
|
| 26 | 26 | /** |
| 27 | 27 | * @var string|string[] |
| 28 | 28 | */ |
@@ -30,9 +30,9 @@ discard block |
||
| 30 | 30 | public $Head = ''; |
| 31 | 31 | public $pre_Body = ''; |
| 32 | 32 | public $Left = ''; |
| 33 | - public $Top = ''; |
|
| 34 | - public $Right = ''; |
|
| 35 | - public $Bottom = ''; |
|
| 33 | + public $Top = ''; |
|
| 34 | + public $Right = ''; |
|
| 35 | + public $Bottom = ''; |
|
| 36 | 36 | public $post_Body = ''; |
| 37 | 37 | public $post_Html = ''; |
| 38 | 38 | /** |
@@ -50,13 +50,13 @@ discard block |
||
| 50 | 50 | 'Right' => 3, |
| 51 | 51 | 'post_Body' => 1 |
| 52 | 52 | ]; |
| 53 | - public $link = []; |
|
| 53 | + public $link = []; |
|
| 54 | 54 | public $Search = []; |
| 55 | 55 | public $Replace = []; |
| 56 | - public $canonical_url = false; |
|
| 56 | + public $canonical_url = false; |
|
| 57 | 57 | protected $theme; |
| 58 | - protected $error_showed = false; |
|
| 59 | - protected $finish_called_once = false; |
|
| 58 | + protected $error_showed = false; |
|
| 59 | + protected $finish_called_once = false; |
|
| 60 | 60 | /** |
| 61 | 61 | * Initialization: setting of title and theme according to specified parameters |
| 62 | 62 | * |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | function json ($add) { |
| 108 | 108 | _header('Content-Type: application/json; charset=utf-8', true); |
| 109 | 109 | interface_off(); |
| 110 | - $this->Content = _json_encode($add); |
|
| 110 | + $this->Content = _json_encode($add); |
|
| 111 | 111 | return $this; |
| 112 | 112 | } |
| 113 | 113 | /** |
@@ -120,9 +120,9 @@ discard block |
||
| 120 | 120 | * Theme is fixed for administration, and may vary for other pages |
| 121 | 121 | */ |
| 122 | 122 | if (admin_path()) { |
| 123 | - $this->theme = 'CleverStyle'; |
|
| 123 | + $this->theme = 'CleverStyle'; |
|
| 124 | 124 | } |
| 125 | - $theme_dir = THEMES."/$this->theme"; |
|
| 125 | + $theme_dir = THEMES."/$this->theme"; |
|
| 126 | 126 | _include("$theme_dir/prepare.php", false, false); |
| 127 | 127 | ob_start(); |
| 128 | 128 | /** |
@@ -304,7 +304,7 @@ discard block |
||
| 304 | 304 | */ |
| 305 | 305 | function link ($data) { |
| 306 | 306 | if ($data !== false) { |
| 307 | - $this->link[] = [$data]; |
|
| 307 | + $this->link[] = [$data]; |
|
| 308 | 308 | } |
| 309 | 309 | return $this; |
| 310 | 310 | } |
@@ -348,7 +348,7 @@ discard block |
||
| 348 | 348 | * @return Page |
| 349 | 349 | */ |
| 350 | 350 | function canonical_url ($url) { |
| 351 | - $this->canonical_url = $url; |
|
| 351 | + $this->canonical_url = $url; |
|
| 352 | 352 | return $this->link([ |
| 353 | 353 | 'href' => $this->canonical_url, |
| 354 | 354 | 'rel' => 'canonical' |
@@ -363,11 +363,11 @@ discard block |
||
| 363 | 363 | * @return Page |
| 364 | 364 | */ |
| 365 | 365 | function title ($title, $replace = false) { |
| 366 | - $title = htmlentities($title, ENT_COMPAT, 'utf-8'); |
|
| 366 | + $title = htmlentities($title, ENT_COMPAT, 'utf-8'); |
|
| 367 | 367 | if ($replace) { |
| 368 | - $this->Title = [$title]; |
|
| 368 | + $this->Title = [$title]; |
|
| 369 | 369 | } else { |
| 370 | - $this->Title[] = $title; |
|
| 370 | + $this->Title[] = $title; |
|
| 371 | 371 | } |
| 372 | 372 | return $this; |
| 373 | 373 | } |
@@ -431,21 +431,21 @@ discard block |
||
| 431 | 431 | if ($this->error_showed) { |
| 432 | 432 | return; |
| 433 | 433 | } |
| 434 | - $this->error_showed = true; |
|
| 434 | + $this->error_showed = true; |
|
| 435 | 435 | /** |
| 436 | 436 | * Hack for 403 after sign out in administration |
| 437 | 437 | */ |
| 438 | 438 | if ($error_code == 403 && !api_path() && _getcookie('sign_out')) { |
| 439 | 439 | _header('Location: /', true, 302); |
| 440 | - $this->Content = ''; |
|
| 440 | + $this->Content = ''; |
|
| 441 | 441 | throw new ExitException; |
| 442 | 442 | } |
| 443 | 443 | interface_off(); |
| 444 | - $error_description = status_code($error_code); |
|
| 444 | + $error_description = status_code($error_code); |
|
| 445 | 445 | if (is_array($custom_text)) { |
| 446 | - list($error_code, $error_description) = $custom_text; |
|
| 446 | + list($error_code, $error_description) = $custom_text; |
|
| 447 | 447 | } elseif ($custom_text) { |
| 448 | - $error_description = $custom_text; |
|
| 448 | + $error_description = $custom_text; |
|
| 449 | 449 | } |
| 450 | 450 | if ($json || api_path()) { |
| 451 | 451 | if ($json) { |
@@ -466,7 +466,7 @@ discard block |
||
| 466 | 466 | h::title($error_code). |
| 467 | 467 | ($error_description ?: $error_code); |
| 468 | 468 | } |
| 469 | - $this->Content = ob_get_clean(); |
|
| 469 | + $this->Content = ob_get_clean(); |
|
| 470 | 470 | } |
| 471 | 471 | $this->__finish(); |
| 472 | 472 | throw new ExitException; |
@@ -486,7 +486,7 @@ discard block |
||
| 486 | 486 | if ($this->finish_called_once) { |
| 487 | 487 | return; |
| 488 | 488 | } |
| 489 | - $this->finish_called_once = true; |
|
| 489 | + $this->finish_called_once = true; |
|
| 490 | 490 | /** |
| 491 | 491 | * For AJAX and API requests only content without page template |
| 492 | 492 | */ |
@@ -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; |
| 9 | 9 | use |
| 10 | 10 | h, |
@@ -281,7 +281,7 @@ |
||
| 281 | 281 | $module_data['active'] == Config\Module_Properties::ENABLED; |
| 282 | 282 | } |
| 283 | 283 | ); |
| 284 | - $L = Language::instance(); |
|
| 284 | + $L = Language::instance(); |
|
| 285 | 285 | foreach ($modules as $module => &$localized_name) { |
| 286 | 286 | $localized_name = path($L->$module); |
| 287 | 287 | } |
@@ -89,7 +89,7 @@ |
||
| 89 | 89 | * If match was not found - mirror is not allowed! |
| 90 | 90 | */ |
| 91 | 91 | if ($this->mirror_index === -1) { |
| 92 | - trigger_error("Mirror $_SERVER->host not allowed", E_USER_ERROR); |
|
| 92 | + trigger_error("mirror $_SERVER->host not allowed", E_USER_ERROR); |
|
| 93 | 93 | throw new ExitException(400); |
| 94 | 94 | } |
| 95 | 95 | /** |
@@ -1,18 +1,18 @@ |
||
| 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 | namespace cs; |
| 9 | 9 | /** |
| 10 | - * Provides next events: |
|
| 11 | - * System/Route/routing_replace |
|
| 12 | - * ['rc' => &$rc] //Reference to string with current route, this string can be changed |
|
| 13 | - * |
|
| 14 | - * @method static Route instance($check = false) |
|
| 15 | - */ |
|
| 10 | + * Provides next events: |
|
| 11 | + * System/Route/routing_replace |
|
| 12 | + * ['rc' => &$rc] //Reference to string with current route, this string can be changed |
|
| 13 | + * |
|
| 14 | + * @method static Route instance($check = false) |
|
| 15 | + */ |
|
| 16 | 16 | class Route { |
| 17 | 17 | use |
| 18 | 18 | Singleton; |
@@ -74,7 +74,7 @@ |
||
| 74 | 74 | 'ip' => 'text', |
| 75 | 75 | 'data' => 'json' |
| 76 | 76 | ]; |
| 77 | - protected $table = '[prefix]sessions'; |
|
| 77 | + protected $table = '[prefix]sessions'; |
|
| 78 | 78 | protected function construct () { |
| 79 | 79 | $this->cache = new Prefix('sessions'); |
| 80 | 80 | $this->users_cache = new Prefix('users'); |
@@ -1,40 +1,40 @@ |
||
| 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 | - * Provides next events: |
|
| 10 | - * |
|
| 11 | - * System/Session/init/before |
|
| 12 | - * |
|
| 13 | - * System/Session/init/after |
|
| 14 | - * |
|
| 15 | - * System/Session/load |
|
| 16 | - * ['session_data' => $session_data] |
|
| 17 | - * |
|
| 18 | - * System/Session/add |
|
| 19 | - * ['session_data' => $session_data] |
|
| 20 | - * |
|
| 21 | - * System/Session/del/before |
|
| 22 | - * ['id' => $session_id] |
|
| 23 | - * |
|
| 24 | - * System/Session/del/after |
|
| 25 | - * ['id' => $session_id] |
|
| 26 | - * |
|
| 27 | - * System/Session/del_all |
|
| 28 | - * ['id' => $user_id] |
|
| 29 | - */ |
|
| 9 | + * Provides next events: |
|
| 10 | + * |
|
| 11 | + * System/Session/init/before |
|
| 12 | + * |
|
| 13 | + * System/Session/init/after |
|
| 14 | + * |
|
| 15 | + * System/Session/load |
|
| 16 | + * ['session_data' => $session_data] |
|
| 17 | + * |
|
| 18 | + * System/Session/add |
|
| 19 | + * ['session_data' => $session_data] |
|
| 20 | + * |
|
| 21 | + * System/Session/del/before |
|
| 22 | + * ['id' => $session_id] |
|
| 23 | + * |
|
| 24 | + * System/Session/del/after |
|
| 25 | + * ['id' => $session_id] |
|
| 26 | + * |
|
| 27 | + * System/Session/del_all |
|
| 28 | + * ['id' => $user_id] |
|
| 29 | + */ |
|
| 30 | 30 | namespace cs; |
| 31 | 31 | use |
| 32 | 32 | cs\Cache\Prefix; |
| 33 | 33 | /** |
| 34 | - * Class responsible for current user session |
|
| 35 | - * |
|
| 36 | - * @method static Session instance($check = false) |
|
| 37 | - */ |
|
| 34 | + * Class responsible for current user session |
|
| 35 | + * |
|
| 36 | + * @method static Session instance($check = false) |
|
| 37 | + */ |
|
| 38 | 38 | class Session { |
| 39 | 39 | use |
| 40 | 40 | CRUD, |