@@ -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) 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) 2016, Nazar Mokrynskyi |
|
7 | + * @license MIT License, see license.txt |
|
8 | + */ |
|
9 | 9 | namespace cs; |
10 | 10 | use |
11 | 11 | h; |
@@ -1,11 +1,11 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * @package Photo gallery |
|
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 Photo gallery |
|
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\modules\Photo_gallery; |
10 | 10 | use |
11 | 11 | cs\ExitException, |
@@ -15,16 +15,16 @@ discard block |
||
15 | 15 | cs\User; |
16 | 16 | |
17 | 17 | function get_sections_rows ($structure = null, $level = 0) { |
18 | - $L = new Prefix('blogs_'); |
|
19 | - $root = false; |
|
20 | - $module = path($L->Blogs); |
|
18 | + $L = new Prefix('blogs_'); |
|
19 | + $root = false; |
|
20 | + $module = path($L->Blogs); |
|
21 | 21 | if ($structure === null) { |
22 | - $structure = Sections::instance()->get_structure(); |
|
23 | - $structure['title'] = $L->root_section; |
|
24 | - $root = true; |
|
22 | + $structure = Sections::instance()->get_structure(); |
|
23 | + $structure['title'] = $L->root_section; |
|
24 | + $root = true; |
|
25 | 25 | } |
26 | - $content = []; |
|
27 | - $content[] = [ |
|
26 | + $content = []; |
|
27 | + $content[] = [ |
|
28 | 28 | [ |
29 | 29 | h::a( |
30 | 30 | $structure['title']. |
@@ -72,36 +72,36 @@ discard block |
||
72 | 72 | return $content; |
73 | 73 | } |
74 | 74 | function get_sections_select_section ($current = null, $structure = null, $level = 0) { |
75 | - $list = [ |
|
75 | + $list = [ |
|
76 | 76 | 'in' => [], |
77 | 77 | 'value' => [] |
78 | 78 | ]; |
79 | 79 | if ($structure === null) { |
80 | - $structure = Sections::instance()->get_structure(); |
|
81 | - $L = new Prefix('blogs_'); |
|
82 | - $list['in'][] = $L->root_section; |
|
83 | - $list['value'][] = 0; |
|
80 | + $structure = Sections::instance()->get_structure(); |
|
81 | + $L = new Prefix('blogs_'); |
|
82 | + $list['in'][] = $L->root_section; |
|
83 | + $list['value'][] = 0; |
|
84 | 84 | } else { |
85 | 85 | if ($structure['id'] == $current) { |
86 | 86 | return $list; |
87 | 87 | } |
88 | - $list['in'][] = str_repeat(' ', $level).$structure['title']; |
|
89 | - $list['value'][] = $structure['id']; |
|
88 | + $list['in'][] = str_repeat(' ', $level).$structure['title']; |
|
89 | + $list['value'][] = $structure['id']; |
|
90 | 90 | } |
91 | 91 | if (!empty($structure['sections'])) { |
92 | 92 | foreach ($structure['sections'] as $section) { |
93 | - $tmp = get_sections_select_section($current, $section, $level+1); |
|
94 | - $list['in'] = array_merge($list['in'], $tmp['in']); |
|
95 | - $list['value'] = array_merge($list['value'], $tmp['value']); |
|
93 | + $tmp = get_sections_select_section($current, $section, $level + 1); |
|
94 | + $list['in'] = array_merge($list['in'], $tmp['in']); |
|
95 | + $list['value'] = array_merge($list['value'], $tmp['value']); |
|
96 | 96 | } |
97 | 97 | } |
98 | 98 | return $list; |
99 | 99 | } |
100 | 100 | function get_posts_rows ($page = 1) { |
101 | - $Posts = Posts::instance(); |
|
102 | - $Sections = Sections::instance(); |
|
101 | + $Posts = Posts::instance(); |
|
102 | + $Sections = Sections::instance(); |
|
103 | 103 | $Config = Config::instance(); |
104 | - $L = new Prefix('blogs_'); |
|
104 | + $L = new Prefix('blogs_'); |
|
105 | 105 | $User = User::instance(); |
106 | 106 | $module = path($L->Blogs); |
107 | 107 | $page = (int)$page ?: 1; |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | $num = $Config->module('Blogs')->posts_per_page; |
110 | 110 | $from = ($page - 1) * $num; |
111 | 111 | $cdb = DB::instance()->{$Config->module('Blogs')->db('posts')}; |
112 | - $posts = $cdb->qfas( |
|
112 | + $posts = $cdb->qfas( |
|
113 | 113 | "SELECT `id` |
114 | 114 | FROM `[prefix]blogs_posts` |
115 | 115 | ORDER BY `id` DESC |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | ); |
132 | 132 | } |
133 | 133 | unset($section); |
134 | - $content[] = [ |
|
134 | + $content[] = [ |
|
135 | 135 | h::a( |
136 | 136 | $post['title'], |
137 | 137 | [ |
@@ -1,11 +1,11 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * @package Blogs |
|
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 Blogs |
|
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 | 10 | namespace cs\modules\Blogs; |
11 | 11 | use h, |
@@ -1,11 +1,11 @@ discard block |
||
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\modules\Comments; |
10 | 10 | use |
11 | 11 | cs\Config, |
@@ -54,8 +54,8 @@ discard block |
||
54 | 54 | throw new ExitException($L->comment_editing_server_error, 500); |
55 | 55 | } |
56 | 56 | /** |
57 | - * @var Comments $Comments |
|
58 | - */ |
|
57 | + * @var Comments $Comments |
|
58 | + */ |
|
59 | 59 | $result = $Comments->set($Route->route[0], $_POST['text']); |
60 | 60 | if ($result) { |
61 | 61 | $Page->json($result['text']); |
@@ -1,11 +1,11 @@ discard block |
||
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\modules\Comments; |
10 | 10 | use |
11 | 11 | cs\Config, |
@@ -54,8 +54,8 @@ discard block |
||
54 | 54 | throw new ExitException($L->comment_editing_server_error, 500); |
55 | 55 | } |
56 | 56 | /** |
57 | - * @var Comments $Comments |
|
58 | - */ |
|
57 | + * @var Comments $Comments |
|
58 | + */ |
|
59 | 59 | $result = $Comments->set($Route->route[0], $_POST['text']); |
60 | 60 | if ($result) { |
61 | 61 | $Page->json($result['text']); |
@@ -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,17 +1,17 @@ |
||
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 | /** |
11 | - * Running Http server in background on any platform |
|
12 | - * |
|
13 | - * @param int $port |
|
14 | - */ |
|
11 | + * Running Http server in background on any platform |
|
12 | + * |
|
13 | + * @param int $port |
|
14 | + */ |
|
15 | 15 | function cross_platform_server_in_background ($port) { |
16 | 16 | $exec = defined('HHVM_VERSION') ? 'hhvm' : 'php'; |
17 | 17 | $supervisor = 'php '.__DIR__.'/supervisor.php'; |
@@ -1,11 +1,11 @@ |
||
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 | namespace cs\modules\Disqus; |
10 | 10 | use |
11 | 11 | h, |
@@ -27,8 +27,8 @@ discard block |
||
27 | 27 | protected $shortname; |
28 | 28 | |
29 | 29 | protected function construct () { |
30 | - $this->module = Request::instance()->current_module; |
|
31 | - $this->shortname = Config::instance()->module('Disqus')->shortname; |
|
30 | + $this->module = Request::instance()->current_module; |
|
31 | + $this->shortname = Config::instance()->module('Disqus')->shortname; |
|
32 | 32 | } |
33 | 33 | /** |
34 | 34 | * Set module (current module assumed by default) |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | * @param string $module Module name |
37 | 37 | */ |
38 | 38 | function set_module ($module) { |
39 | - $this->module = $module; |
|
39 | + $this->module = $module; |
|
40 | 40 | } |
41 | 41 | /** |
42 | 42 | * Count of comments for specified item |
@@ -73,11 +73,11 @@ discard block |
||
73 | 73 | return '<div id="disqus_thread"></div>'; |
74 | 74 | } |
75 | 75 | protected function count_js () { |
76 | - static $added = false; |
|
76 | + static $added = false; |
|
77 | 77 | if ($added) { |
78 | 78 | return; |
79 | 79 | } |
80 | - $added = true; |
|
80 | + $added = true; |
|
81 | 81 | Page::instance()->js( |
82 | 82 | "var disqus_shortname = '$this->shortname'; |
83 | 83 | if (!window.disqus_count_items) { window.disqus_count_items = []; }", |
@@ -85,11 +85,11 @@ discard block |
||
85 | 85 | ); |
86 | 86 | } |
87 | 87 | protected function block_js ($item) { |
88 | - static $added = false; |
|
88 | + static $added = false; |
|
89 | 89 | if ($added) { |
90 | 90 | return; |
91 | 91 | } |
92 | - $added = true; |
|
92 | + $added = true; |
|
93 | 93 | Page::instance()->js( |
94 | 94 | "var disqus_shortname = '$this->shortname', disqus_identifier = '".str_replace("'", "\'", "$this->module/$item")."';", |
95 | 95 | 'code' |
@@ -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) 2015-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) 2015-2016, Nazar Mokrynskyi |
|
7 | + * @license MIT License, see license.txt |
|
8 | + */ |
|
9 | 9 | namespace cs\modules\HybridAuth; |
10 | 10 | use |
11 | 11 | cs\Cache, |