@@ -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;  | 
                                                        
@@ -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',  | 
                                                        
@@ -120,7 +120,7 @@ discard block  | 
                                                    ||
| 120 | 120 | $verbosity => true  | 
                                                        
| 121 | 121 | ]  | 
                                                        
| 122 | 122 | );  | 
                                                        
| 123 | - $output = new Output;  | 
                                                        |
| 123 | + $output = new Output;  | 
                                                        |
| 124 | 124 |  				$output->set_stream(fopen("$storage/last_execution.log", 'w')); | 
                                                        
| 125 | 125 | $application->setAutoExit(false);  | 
                                                        
| 126 | 126 | $status_code = $application->run($input, $output);  | 
                                                        
@@ -191,7 +191,7 @@ discard block  | 
                                                    ||
| 191 | 191 | 'repositories' => [],  | 
                                                        
| 192 | 192 | 'require' => []  | 
                                                        
| 193 | 193 | ];  | 
                                                        
| 194 | - $Config = Config::instance();  | 
                                                        |
| 194 | + $Config = Config::instance();  | 
                                                        |
| 195 | 195 |  		foreach (array_keys($Config->components['modules']) as $module) { | 
                                                        
| 196 | 196 | if (  | 
                                                        
| 197 | 197 | $module == $component_name &&  | 
                                                        
@@ -266,7 +266,7 @@ discard block  | 
                                                    ||
| 266 | 266 |  		if (!$package['require']) { | 
                                                        
| 267 | 267 | return;  | 
                                                        
| 268 | 268 | }  | 
                                                        
| 269 | - $composer['repositories'][] = [  | 
                                                        |
| 269 | + $composer['repositories'][] = [  | 
                                                        |
| 270 | 270 | 'type' => 'package',  | 
                                                        
| 271 | 271 | 'package' => $package  | 
                                                        
| 272 | 272 | ];  | 
                                                        
@@ -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 | */  | 
                                                        
@@ -55,7 +55,7 @@ discard block  | 
                                                    ||
| 55 | 55 | |
| 56 | 56 | const DEFAULT_IMAGE = 'components/modules/Shop/includes/img/no-image.svg';  | 
                                                        
| 57 | 57 | |
| 58 | - protected $data_model = [  | 
                                                        |
| 58 | + protected $data_model = [  | 
                                                        |
| 59 | 59 | 'id' => 'int',  | 
                                                        
| 60 | 60 | 'date' => 'int',  | 
                                                        
| 61 | 61 | 'category' => 'int',  | 
                                                        
@@ -443,7 +443,7 @@ discard block  | 
                                                    ||
| 443 | 443 | 'string' => '',  | 
                                                        
| 444 | 444 | 'text' => ''  | 
                                                        
| 445 | 445 | ];  | 
                                                        
| 446 | - $lang = '';  | 
                                                        |
| 446 | + $lang = '';  | 
                                                        |
| 447 | 447 |  			switch ($this->attribute_type_to_value_field($attribute_data['type'])) { | 
                                                        
| 448 | 448 | case 'numeric_value':  | 
                                                        
| 449 | 449 | $value_type['numeric'] = $value;  | 
                                                        
@@ -286,17 +286,20 @@  | 
                                                    ||
| 286 | 286 | $where = [];  | 
                                                        
| 287 | 287 | $where_params = [];  | 
                                                        
| 288 | 288 |  		foreach ($search_parameters as $key => $details) { | 
                                                        
| 289 | -			if (isset($this->data_model[$key])) { // Property | 
                                                        |
| 289 | +			if (isset($this->data_model[$key])) { | 
                                                        |
| 290 | +// Property  | 
                                                        |
| 290 | 291 | $where[] = "`i`.`$key` = '%s'";  | 
                                                        
| 291 | 292 | $where_params[] = $details;  | 
                                                        
| 292 | -			} elseif (is_numeric($key)) { // Tag | 
                                                        |
| 293 | +			} elseif (is_numeric($key)) { | 
                                                        |
| 294 | +// Tag  | 
                                                        |
| 293 | 295 | $joins .=  | 
                                                        
| 294 | 296 |  					"INNER JOIN `{$this->table}_tags` AS `t` | 
                                                        
| 295 | 297 | ON  | 
                                                        
| 296 | 298 | `i`.`id` = `t`.`id` AND  | 
                                                        
| 297 | 299 | `t`.`tag` = '%s'";  | 
                                                        
| 298 | 300 | $where_params[] = $details;  | 
                                                        
| 299 | -			} else { // Attribute | 
                                                        |
| 301 | +			} else { | 
                                                        |
| 302 | +// Attribute  | 
                                                        |
| 300 | 303 | $field = @$this->attribute_type_to_value_field($Attributes->get($key)['type']);  | 
                                                        
| 301 | 304 |  				if (!$field || empty($details)) { | 
                                                        
| 302 | 305 | continue;  | 
                                                        
@@ -67,7 +67,7 @@  | 
                                                    ||
| 67 | 67 | |
| 68 | 68 | const PAYMENT_METHOD_CASH = 'shop:cash';  | 
                                                        
| 69 | 69 | |
| 70 | - protected $data_model = [  | 
                                                        |
| 70 | + protected $data_model = [  | 
                                                        |
| 71 | 71 | 'id' => 'int',  | 
                                                        
| 72 | 72 | 'user' => 'int',  | 
                                                        
| 73 | 73 | 'date' => 'int',  | 
                                                        
@@ -113,7 +113,7 @@  | 
                                                    ||
| 113 | 113 |  if (!$items) { | 
                                                        
| 114 | 114 | return;  | 
                                                        
| 115 | 115 | }  | 
                                                        
| 116 | -$items_total = $Items->search(  | 
                                                        |
| 116 | +$items_total = $Items->search(  | 
                                                        |
| 117 | 117 | [  | 
                                                        
| 118 | 118 | 'listed' => 1,  | 
                                                        
| 119 | 119 | 'category' => $current_category,  | 
                                                        
@@ -23,7 +23,7 @@  | 
                                                    ||
| 23 | 23 | ':',  | 
                                                        
| 24 | 24 | array_slice(Route::instance()->path, -1)[0]  | 
                                                        
| 25 | 25 | );  | 
                                                        
| 26 | -$item = $Items->get_for_user(array_pop($item));  | 
                                                        |
| 26 | +$item = $Items->get_for_user(array_pop($item));  | 
                                                        |
| 27 | 27 | $Page->title($item['title']);  | 
                                                        
| 28 | 28 | $Page->Description = description($item['description']);  | 
                                                        
| 29 | 29 | $Page->canonical_url(  | 
                                                        
@@ -20,7 +20,7 @@  | 
                                                    ||
| 20 | 20 | use  | 
                                                        
| 21 | 21 | CRUD,  | 
                                                        
| 22 | 22 | Singleton;  | 
                                                        
| 23 | - protected $data_model = [  | 
                                                        |
| 23 | + protected $data_model = [  | 
                                                        |
| 24 | 24 | 'id' => 'int',  | 
                                                        
| 25 | 25 | 'title' => 'ml:text',  | 
                                                        
| 26 | 26 | 'path' => 'ml:text',  |