@@ -262,7 +262,7 @@ |
||
262 | 262 | "$this->root/license.txt", |
263 | 263 | "$this->root/Storage.php" |
264 | 264 | ]; |
265 | - $files = []; |
|
265 | + $files = []; |
|
266 | 266 | foreach ($files_to_include as $s) { |
267 | 267 | if (is_file($s)) { |
268 | 268 | $files[] = $s; |
@@ -1,11 +1,11 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * @package CleverStyle CMS |
|
4 | - * @subpackage Builder |
|
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 Builder |
|
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; |
10 | 10 | use |
11 | 11 | h, |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | Phar::webPhar(null, 'install.php'); |
160 | 160 | } |
161 | 161 | __HALT_COMPILER(); |
162 | -STUB |
|
162 | +stub |
|
163 | 163 | ); |
164 | 164 | $phar->stopBuffering(); |
165 | 165 | return "Done! CleverStyle CMS $version"; |
@@ -299,7 +299,7 @@ discard block |
||
299 | 299 | #</Files> |
300 | 300 | |
301 | 301 | RewriteRule .* index.php |
302 | -HTACCESS; |
|
302 | +htaccess; |
|
303 | 303 | } |
304 | 304 | /** |
305 | 305 | * @param string $module |
@@ -22,7 +22,7 @@ |
||
22 | 22 | use |
23 | 23 | Singleton; |
24 | 24 | |
25 | - protected $data_model = [ |
|
25 | + protected $data_model = [ |
|
26 | 26 | 'id' => 'int', |
27 | 27 | 'amount' => 'float:0', |
28 | 28 | 'currency' => 'text', |
@@ -1,11 +1,11 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * @package Blockchain payment |
|
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 Blockchain payment |
|
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\Blockchain_payment; |
10 | 10 | use |
11 | 11 | cs\ExitException, |
@@ -264,7 +264,7 @@ |
||
264 | 264 | function count ($item) { |
265 | 265 | $item = (int)$item; |
266 | 266 | $L = Language::instance(); |
267 | - return $this->cache->get("$item/count/$L->clang", function () use ($item) { |
|
267 | + return $this->cache->get("$item/count/$L->clang", function () use ($item) { |
|
268 | 268 | return $this->count_internal($this->tree_data($item)) ?: 0; |
269 | 269 | }); |
270 | 270 | } |
@@ -1,11 +1,11 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * @package Comments |
|
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 Comments |
|
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; |
10 | 10 | Event::instance()->on( |
11 | 11 | 'System/Index/construct', |
@@ -34,11 +34,11 @@ discard block |
||
34 | 34 | /** |
35 | 35 | * @var int Avatar size in px, can be redefined |
36 | 36 | */ |
37 | - public $avatar_size = 36; |
|
37 | + public $avatar_size = 36; |
|
38 | 38 | |
39 | 39 | protected function construct () { |
40 | - $this->module = Request::instance()->current_module; |
|
41 | - $this->cache = new Cache_prefix("Comments/$this->module"); |
|
40 | + $this->module = Request::instance()->current_module; |
|
41 | + $this->cache = new Cache_prefix("Comments/$this->module"); |
|
42 | 42 | } |
43 | 43 | /** |
44 | 44 | * Set module (current module assumed by default) |
@@ -46,8 +46,8 @@ discard block |
||
46 | 46 | * @param string $module Module name |
47 | 47 | */ |
48 | 48 | function set_module ($module) { |
49 | - $this->module = $module; |
|
50 | - $this->cache = new Cache_prefix("Comments/$this->module"); |
|
49 | + $this->module = $module; |
|
50 | + $this->cache = new Cache_prefix("Comments/$this->module"); |
|
51 | 51 | } |
52 | 52 | /** |
53 | 53 | * Returns database index |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | * @return array|false Array of comment data on success or <b>false</b> on failure |
66 | 66 | */ |
67 | 67 | function get ($id) { |
68 | - $id = (int)$id; |
|
68 | + $id = (int)$id; |
|
69 | 69 | return $this->db()->qf([ |
70 | 70 | "SELECT |
71 | 71 | `id`, |
@@ -94,14 +94,14 @@ discard block |
||
94 | 94 | * @return array|bool Array of comment data on success or <b>false</b> on failure |
95 | 95 | */ |
96 | 96 | function add ($item, $text, $parent = 0) { |
97 | - $L = Language::instance(); |
|
97 | + $L = Language::instance(); |
|
98 | 98 | $User = User::instance(); |
99 | 99 | $text = xap($text, true); |
100 | 100 | if (!$text) { |
101 | 101 | return false; |
102 | 102 | } |
103 | - $item = (int)$item; |
|
104 | - $parent = (int)$parent; |
|
103 | + $item = (int)$item; |
|
104 | + $parent = (int)$parent; |
|
105 | 105 | if ( |
106 | 106 | $parent != 0 && |
107 | 107 | $this->db_prime()->qfs([ |
@@ -169,12 +169,12 @@ discard block |
||
169 | 169 | * @return array|false Array of comment data on success or <b>false</b> on failure |
170 | 170 | */ |
171 | 171 | function set ($id, $text) { |
172 | - $text = xap($text, true); |
|
172 | + $text = xap($text, true); |
|
173 | 173 | if (!$text) { |
174 | 174 | return false; |
175 | 175 | } |
176 | - $id = (int)$id; |
|
177 | - $comment = $this->get($id); |
|
176 | + $id = (int)$id; |
|
177 | + $comment = $this->get($id); |
|
178 | 178 | if (!$comment) { |
179 | 179 | return false; |
180 | 180 | } |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | $this->module |
191 | 191 | )) { |
192 | 192 | unset($this->cache->{$comment['item']}); |
193 | - $comment['text'] = $text; |
|
193 | + $comment['text'] = $text; |
|
194 | 194 | return $comment; |
195 | 195 | } |
196 | 196 | return false; |
@@ -203,8 +203,8 @@ discard block |
||
203 | 203 | * @return bool |
204 | 204 | */ |
205 | 205 | function del ($id) { |
206 | - $id = (int)$id; |
|
207 | - $comment = $this->db_prime()->qf([ |
|
206 | + $id = (int)$id; |
|
207 | + $comment = $this->db_prime()->qf([ |
|
208 | 208 | "SELECT `p`.`item`, COUNT(`c`.`id`) AS `count` |
209 | 209 | FROM `[prefix]comments` AS `p` |
210 | 210 | LEFT JOIN `[prefix]comments` AS `c` |
@@ -241,7 +241,7 @@ discard block |
||
241 | 241 | * @return bool |
242 | 242 | */ |
243 | 243 | function del_all ($item) { |
244 | - $item = (int)$item; |
|
244 | + $item = (int)$item; |
|
245 | 245 | if ($this->db_prime()->q( |
246 | 246 | "DELETE FROM `[prefix]comments` |
247 | 247 | WHERE |
@@ -273,9 +273,9 @@ discard block |
||
273 | 273 | if (!is_array($data)) { |
274 | 274 | return 0; |
275 | 275 | } |
276 | - $count = 0; |
|
276 | + $count = 0; |
|
277 | 277 | foreach ($data as &$d) { |
278 | - $count += $this->count_internal($d['comments']) + 1; |
|
278 | + $count += $this->count_internal($d['comments']) + 1; |
|
279 | 279 | } |
280 | 280 | return $count; |
281 | 281 | } |
@@ -298,12 +298,12 @@ discard block |
||
298 | 298 | * @return false|array |
299 | 299 | */ |
300 | 300 | function tree_data ($item, $parent = 0) { |
301 | - $Cache = $this->cache; |
|
302 | - $L = Language::instance(); |
|
301 | + $Cache = $this->cache; |
|
302 | + $L = Language::instance(); |
|
303 | 303 | if (($comments = $Cache->{"$item/$L->clang"}) === false) { |
304 | - $item = (int)$item; |
|
305 | - $parent = (int)$parent; |
|
306 | - $comments = $this->db()->qfa([ |
|
304 | + $item = (int)$item; |
|
305 | + $parent = (int)$parent; |
|
306 | + $comments = $this->db()->qfa([ |
|
307 | 307 | "SELECT |
308 | 308 | `id`, |
309 | 309 | `parent`, |
@@ -328,7 +328,7 @@ discard block |
||
328 | 328 | * Cache only root tree data |
329 | 329 | */ |
330 | 330 | if ($parent == 0) { |
331 | - $Cache->{"$item/$L->clang"} = $comments; |
|
331 | + $Cache->{"$item/$L->clang"} = $comments; |
|
332 | 332 | } |
333 | 333 | } |
334 | 334 | return $comments; |
@@ -341,15 +341,15 @@ discard block |
||
341 | 341 | * @return string |
342 | 342 | */ |
343 | 343 | function tree_html ($comments) { |
344 | - $L = Language::instance(); |
|
345 | - $User = User::instance(); |
|
344 | + $L = Language::instance(); |
|
345 | + $User = User::instance(); |
|
346 | 346 | if (!is_array($comments) || !$comments) { |
347 | 347 | return ''; |
348 | 348 | } |
349 | - $content = ''; |
|
349 | + $content = ''; |
|
350 | 350 | foreach ($comments as $comment) { |
351 | - $uniqid = uniqid('comment_', true); |
|
352 | - $content .= str_replace($uniqid, $comment['text'], h::{'article.cs-comments-comment'}( |
|
351 | + $uniqid = uniqid('comment_', true); |
|
352 | + $content .= str_replace($uniqid, $comment['text'], h::{'article.cs-comments-comment'}( |
|
353 | 353 | h::{'img.cs-comments-comment-avatar'}([ |
354 | 354 | 'src' => $User->avatar($this->avatar_size, $comment['user']), |
355 | 355 | 'alt' => $User->username($comment['user']), |
@@ -405,7 +405,7 @@ discard block |
||
405 | 405 | * @return string |
406 | 406 | */ |
407 | 407 | function block ($item) { |
408 | - $L = new Language_prefix('comments_'); |
|
408 | + $L = new Language_prefix('comments_'); |
|
409 | 409 | return h::{'section#comments.cs-comments-comments'}( |
410 | 410 | $L->comments.':'. |
411 | 411 | ( |
@@ -19,7 +19,7 @@ |
||
19 | 19 | Event::instance()->on( |
20 | 20 | 'Comments/instance', |
21 | 21 | function ($data) { |
22 | - $data['Comments'] = Comments::instance(); |
|
22 | + $data['Comments'] = Comments::instance(); |
|
23 | 23 | return false; |
24 | 24 | } |
25 | 25 | ); |
@@ -1,18 +1,18 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * @package Comments |
|
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 Comments |
|
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 | /** |
10 | - * Supports next events: |
|
11 | - * Comments/instance |
|
12 | - * [ |
|
13 | - * 'Comments' => <i>&$Comments</i> |
|
14 | - * ] |
|
15 | - */ |
|
10 | + * Supports next events: |
|
11 | + * Comments/instance |
|
12 | + * [ |
|
13 | + * 'Comments' => <i>&$Comments</i> |
|
14 | + * ] |
|
15 | + */ |
|
16 | 16 | namespace cs\modules\Comments; |
17 | 17 | use |
18 | 18 | cs\Event; |
@@ -31,7 +31,7 @@ |
||
31 | 31 | 'content' => null, //Is set in constructor |
32 | 32 | 'type' => 'set:text,html' |
33 | 33 | ]; |
34 | - protected $table = '[prefix]content'; |
|
34 | + protected $table = '[prefix]content'; |
|
35 | 35 | /** |
36 | 36 | * @var Prefix |
37 | 37 | */ |
@@ -1,11 +1,11 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * @package Content |
|
4 | - * @category modules |
|
5 | - * @author Nazar Mokrynskyi <[email protected]> |
|
6 | - * @copyright Copyright (c) 2014-2016, Nazar Mokrynskyi |
|
7 | - * @license MIT License, see license.txt |
|
8 | - */ |
|
3 | + * @package Content |
|
4 | + * @category modules |
|
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\modules\Content; |
10 | 10 | |
11 | 11 | use |
@@ -31,7 +31,7 @@ |
||
31 | 31 | 'module' => 'text', |
32 | 32 | 'data' => null //Is set in constructor |
33 | 33 | ]; |
34 | - protected $table = '[prefix]deferred_tasks_tasks'; |
|
34 | + protected $table = '[prefix]deferred_tasks_tasks'; |
|
35 | 35 | /** |
36 | 36 | * @var int |
37 | 37 | */ |
@@ -1,11 +1,11 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * @package Deferred tasks |
|
4 | - * @category modules |
|
5 | - * @author Nazar Mokrynskyi <[email protected]> |
|
6 | - * @copyright Copyright (c) 2013-2016, Nazar Mokrynskyi |
|
7 | - * @license MIT License, see license.txt |
|
8 | - */ |
|
3 | + * @package Deferred tasks |
|
4 | + * @category modules |
|
5 | + * @author Nazar Mokrynskyi <[email protected]> |
|
6 | + * @copyright Copyright (c) 2013-2016, Nazar Mokrynskyi |
|
7 | + * @license MIT License, see license.txt |
|
8 | + */ |
|
9 | 9 | namespace cs; |
10 | 10 | Event::instance()->on( |
11 | 11 | 'System/Index/construct', |
@@ -19,7 +19,7 @@ |
||
19 | 19 | Event::instance()->on( |
20 | 20 | 'Comments/instance', |
21 | 21 | function ($data) { |
22 | - $data['Comments'] = Disqus::instance(); |
|
22 | + $data['Comments'] = Disqus::instance(); |
|
23 | 23 | return false; |
24 | 24 | } |
25 | 25 | ); |
@@ -1,18 +1,18 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * @package Disqus |
|
4 | - * @category modules |
|
5 | - * @author Nazar Mokrynskyi <[email protected]> |
|
6 | - * @copyright Copyright (c) 2013-2016, Nazar Mokrynskyi |
|
7 | - * @license MIT License, see license.txt |
|
8 | - */ |
|
3 | + * @package Disqus |
|
4 | + * @category modules |
|
5 | + * @author Nazar Mokrynskyi <[email protected]> |
|
6 | + * @copyright Copyright (c) 2013-2016, Nazar Mokrynskyi |
|
7 | + * @license MIT License, see license.txt |
|
8 | + */ |
|
9 | 9 | /** |
10 | - * Supports next events: |
|
11 | - * Comments/instance |
|
12 | - * [ |
|
13 | - * 'Comments' => <i>&$Comments</i> |
|
14 | - * ] |
|
15 | - */ |
|
10 | + * Supports next events: |
|
11 | + * Comments/instance |
|
12 | + * [ |
|
13 | + * 'Comments' => <i>&$Comments</i> |
|
14 | + * ] |
|
15 | + */ |
|
16 | 16 | namespace cs\modules\Disqus; |
17 | 17 | use |
18 | 18 | cs\Event; |
@@ -11,8 +11,8 @@ |
||
11 | 11 | /** |
12 | 12 | * Time of start of execution, is used as current time |
13 | 13 | */ |
14 | -define('MICROTIME', microtime(true)); //Time in seconds (float) |
|
15 | -define('TIME', floor(MICROTIME)); //Time in seconds (integer) |
|
14 | +define('MICROTIME', microtime(true)); //Time in seconds (float) |
|
15 | +define('TIME', floor(MICROTIME)); //Time in seconds (integer) |
|
16 | 16 | define('DIR', realpath(__DIR__.'/../../..')); //Root directory |
17 | 17 | chdir(DIR); |
18 | 18 | $async = false; |
@@ -1,11 +1,11 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * @package Http server |
|
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 Http server |
|
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\Http_server; |
10 | 10 | use |
11 | 11 | ArrayAccess, |
@@ -29,7 +29,7 @@ |
||
29 | 29 | return strtolower($provider); |
30 | 30 | } |
31 | 31 | }; |
32 | - $providers = []; |
|
32 | + $providers = []; |
|
33 | 33 | foreach ($Config->module('HybridAuth')->providers as $provider => $provider_settings) { |
34 | 34 | if ($provider_settings['enabled']) { |
35 | 35 | $providers[$provider] = [ |
@@ -1,11 +1,11 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * @package HybridAuth |
|
4 | - * @category modules |
|
5 | - * @author Nazar Mokrynskyi <[email protected]> |
|
6 | - * @copyright Copyright (c) 2012-2016, Nazar Mokrynskyi |
|
7 | - * @license MIT License, see license.txt |
|
8 | - */ |
|
3 | + * @package HybridAuth |
|
4 | + * @category modules |
|
5 | + * @author Nazar Mokrynskyi <[email protected]> |
|
6 | + * @copyright Copyright (c) 2012-2016, Nazar Mokrynskyi |
|
7 | + * @license MIT License, see license.txt |
|
8 | + */ |
|
9 | 9 | namespace cs; |
10 | 10 | Event::instance()->on( |
11 | 11 | 'admin/System/components/modules/install/after', |