@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | )", |
59 | 59 | $prepared_arguments |
60 | 60 | ); |
61 | - $id = $insert_id !== false ? $insert_id : $this->db_prime()->id(); |
|
61 | + $id = $insert_id !== false ? $insert_id : $this->db_prime()->id(); |
|
62 | 62 | /** |
63 | 63 | * Id might be 0 if insertion failed or if we insert duplicate entry (which is fine since we use 'INSERT IGNORE' |
64 | 64 | */ |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | } |
156 | 156 | return $id; |
157 | 157 | } |
158 | - $columns = array_filter( |
|
158 | + $columns = array_filter( |
|
159 | 159 | $data_model, |
160 | 160 | function ($column) { |
161 | 161 | return !is_array($column) || !isset($column['data_model']); |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | $id |
224 | 224 | ] |
225 | 225 | ) ?: []; |
226 | - $language_field = isset($model['language_field']) ? $model['language_field'] : null; |
|
226 | + $language_field = isset($model['language_field']) ? $model['language_field'] : null; |
|
227 | 227 | /** |
228 | 228 | * If no rows found for current language - find another language that should contain some rows |
229 | 229 | */ |
@@ -294,7 +294,7 @@ discard block |
||
294 | 294 | $data_before = $this->read_internal($table, $data_model, $id); |
295 | 295 | } |
296 | 296 | list($prepared_arguments, $joined_tables) = self::crud_arguments_preparation(array_slice($data_model, 1), $prepared_arguments, $id); |
297 | - $columns = implode( |
|
297 | + $columns = implode( |
|
298 | 298 | ',', |
299 | 299 | array_map( |
300 | 300 | function ($column) { |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | $first_column = array_keys($data_model)[0]; |
166 | 166 | $data = $this->db()->qf( |
167 | 167 | [ |
168 | - "SELECT $columns |
|
168 | + "select $columns |
|
169 | 169 | FROM `$table` |
170 | 170 | WHERE `$first_column` = '%s' |
171 | 171 | LIMIT 1", |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | $fields = '`'.implode('`,`', array_keys($model['data_model'])).'`'; |
216 | 216 | $rows = $this->db_prime()->qfa( |
217 | 217 | [ |
218 | - "SELECT $fields |
|
218 | + "select $fields |
|
219 | 219 | FROM `{$this->table}_$table` |
220 | 220 | WHERE |
221 | 221 | `$id_field` = '%s' |
@@ -1,10 +1,10 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * @package CleverStyle CMS |
|
4 | - * @author Nazar Mokrynskyi <[email protected]> |
|
5 | - * @copyright Copyright (c) 2013-2015, 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-2015, Nazar Mokrynskyi |
|
6 | + * @license MIT License, see license.txt |
|
7 | + */ |
|
8 | 8 | namespace cs\CRUD; |
9 | 9 | use |
10 | 10 | cs\Event, |
@@ -1,10 +1,10 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * @package CleverStyle CMS |
|
4 | - * @author Nazar Mokrynskyi <[email protected]> |
|
5 | - * @copyright Copyright (c) 2013-2015, 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-2015, Nazar Mokrynskyi |
|
6 | + * @license MIT License, see license.txt |
|
7 | + */ |
|
8 | 8 | namespace cs\CRUD; |
9 | 9 | use |
10 | 10 | cs\Event, |
@@ -1,16 +1,16 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * @package CleverStyle CMS |
|
4 | - * @author Nazar Mokrynskyi <[email protected]> |
|
5 | - * @copyright Copyright (c) 2015, 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, Nazar Mokrynskyi |
|
6 | + * @license MIT License, see license.txt |
|
7 | + */ |
|
8 | 8 | namespace cs; |
9 | 9 | /** |
10 | - * CRUD trait extended with useful additional methods, for example, for searching |
|
11 | - * |
|
12 | - * Might me used instead of regular CRUD trait |
|
13 | - */ |
|
10 | + * CRUD trait extended with useful additional methods, for example, for searching |
|
11 | + * |
|
12 | + * Might me used instead of regular CRUD trait |
|
13 | + */ |
|
14 | 14 | trait CRUD_helpers { |
15 | 15 | use |
16 | 16 | CRUD; |
@@ -1,18 +1,18 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * @package CleverStyle CMS |
|
4 | - * @author Nazar Mokrynskyi <[email protected]> |
|
5 | - * @copyright Copyright (c) 2013-2015, 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-2015, Nazar Mokrynskyi |
|
6 | + * @license MIT License, see license.txt |
|
7 | + */ |
|
8 | 8 | namespace cs\DB; |
9 | 9 | use |
10 | 10 | cs\DB; |
11 | 11 | /** |
12 | - * Accessor trait |
|
13 | - * |
|
14 | - * Provides db() and db_prime() methods for simplified for with DB |
|
15 | - */ |
|
12 | + * Accessor trait |
|
13 | + * |
|
14 | + * Provides db() and db_prime() methods for simplified for with DB |
|
15 | + */ |
|
16 | 16 | trait Accessor { |
17 | 17 | /** |
18 | 18 | * Link to db object |
@@ -1,22 +1,22 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * @package CleverStyle CMS |
|
4 | - * @author Nazar Mokrynskyi <[email protected]> |
|
5 | - * @copyright Copyright (c) 2015, 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, Nazar Mokrynskyi |
|
6 | + * @license MIT License, see license.txt |
|
7 | + */ |
|
8 | 8 | namespace cs\Index; |
9 | 9 | use cs\ExitException; |
10 | 10 | /** |
11 | - * @property bool $module Name of current module |
|
12 | - * @property bool $in_api Whether current page is api |
|
13 | - * @property bool $in_admin Whether current page is administration and user is admin |
|
14 | - * @property string $request_method |
|
15 | - * @property string $working_directory |
|
16 | - * @property string[] $path Reference to Route::instance()->path |
|
17 | - * @property string[] $ids Reference to Route::instance()->ids |
|
18 | - * @property string[] $controller_path Path that will be used by controller to render page |
|
19 | - */ |
|
11 | + * @property bool $module Name of current module |
|
12 | + * @property bool $in_api Whether current page is api |
|
13 | + * @property bool $in_admin Whether current page is administration and user is admin |
|
14 | + * @property string $request_method |
|
15 | + * @property string $working_directory |
|
16 | + * @property string[] $path Reference to Route::instance()->path |
|
17 | + * @property string[] $ids Reference to Route::instance()->ids |
|
18 | + * @property string[] $controller_path Path that will be used by controller to render page |
|
19 | + */ |
|
20 | 20 | trait Router { |
21 | 21 | /** |
22 | 22 | * Execute router |
@@ -1,10 +1,10 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * @package CleverStyle CMS |
|
4 | - * @author Nazar Mokrynskyi <[email protected]> |
|
5 | - * @copyright Copyright (c) 2014-2015, 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-2015, Nazar Mokrynskyi |
|
6 | + * @license MIT License, see license.txt |
|
7 | + */ |
|
8 | 8 | namespace cs\Page; |
9 | 9 | use |
10 | 10 | cs\Core, |
@@ -370,7 +370,7 @@ |
||
370 | 370 | * @return array |
371 | 371 | */ |
372 | 372 | protected function get_includes_prepare ($dependencies, $separator) { |
373 | - $includes = [ |
|
373 | + $includes = [ |
|
374 | 374 | 'css' => [], |
375 | 375 | 'js' => [], |
376 | 376 | 'html' => [] |
@@ -1,21 +1,21 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * @package CleverStyle CMS |
|
4 | - * @author Nazar Mokrynskyi <[email protected]> |
|
5 | - * @copyright Copyright (c) 2013-2015, 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-2015, Nazar Mokrynskyi |
|
6 | + * @license MIT License, see license.txt |
|
7 | + */ |
|
8 | 8 | namespace cs\Permission; |
9 | 9 | use |
10 | 10 | cs\Cache; |
11 | 11 | /** |
12 | - * Class Any with common methods for User and Group classes |
|
13 | - * |
|
14 | - * @property Cache $cache |
|
15 | - * |
|
16 | - * @method \cs\DB\_Abstract db() |
|
17 | - * @method \cs\DB\_Abstract db_prime() |
|
18 | - */ |
|
12 | + * Class Any with common methods for User and Group classes |
|
13 | + * |
|
14 | + * @property Cache $cache |
|
15 | + * |
|
16 | + * @method \cs\DB\_Abstract db() |
|
17 | + * @method \cs\DB\_Abstract db_prime() |
|
18 | + */ |
|
19 | 19 | trait Any { |
20 | 20 | /** |
21 | 21 | * @param int $id |
@@ -1,16 +1,16 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * @package CleverStyle CMS |
|
4 | - * @author Nazar Mokrynskyi <[email protected]> |
|
5 | - * @copyright Copyright (c) 2013-2015, 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-2015, Nazar Mokrynskyi |
|
6 | + * @license MIT License, see license.txt |
|
7 | + */ |
|
8 | 8 | namespace cs; |
9 | 9 | use |
10 | 10 | cs\Singleton\Base; |
11 | 11 | /** |
12 | - * @inheritdoc |
|
13 | - */ |
|
12 | + * @inheritdoc |
|
13 | + */ |
|
14 | 14 | trait Singleton { |
15 | 15 | use Base; |
16 | 16 | } |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | 'aliases' => &$aliases, |
61 | 61 | 'final_class' => &$next_alias |
62 | 62 | ]; |
63 | - $classes = glob(CUSTOM.'/classes/'.substr($class, 2).'_*.php'); |
|
63 | + $classes = glob(CUSTOM.'/classes/'.substr($class, 2).'_*.php'); |
|
64 | 64 | foreach ($classes as $custom_class) { |
65 | 65 | // Path to file with customized class |
66 | 66 | $custom_class = str_replace(CUSTOM.'/classes/', '', substr($custom_class, 0, -4)); |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | 'alias' => "cs\\custom\\$_custom_class", |
74 | 74 | 'path' => $custom_class |
75 | 75 | ]; |
76 | - $next_alias = "cs\\custom\\$custom_class"; |
|
76 | + $next_alias = "cs\\custom\\$custom_class"; |
|
77 | 77 | } |
78 | 78 | if (!is_dir(CACHE.'/classes')) { |
79 | 79 | @mkdir(CACHE.'/classes', 0770, true); |
@@ -9,10 +9,10 @@ |
||
9 | 9 | use |
10 | 10 | cs\False_class; |
11 | 11 | /** |
12 | - * Singleton trait |
|
13 | - * |
|
14 | - * Provides Singleton pattern implementation |
|
15 | - */ |
|
12 | + * Singleton trait |
|
13 | + * |
|
14 | + * Provides Singleton pattern implementation |
|
15 | + */ |
|
16 | 16 | trait Base { |
17 | 17 | final protected function __construct () { |
18 | 18 | } |