@@ -2,24 +2,24 @@ discard block |
||
| 2 | 2 | |
| 3 | 3 | # Define constants |
| 4 | 4 | |
| 5 | -define('DIR_FRAMEWORK', (dirname(__FILE__) . '/')); |
|
| 5 | +define('DIR_FRAMEWORK', (dirname(__FILE__).'/')); |
|
| 6 | 6 | |
| 7 | -define('DIR_CLASSES', (DIR_FRAMEWORK . 'Classes/')); |
|
| 8 | -define('DIR_DATA', (DIR_FRAMEWORK . 'Data/')); |
|
| 9 | -define('DIR_INCLUDES', (DIR_FRAMEWORK . 'Includes/')); |
|
| 10 | -define('DIR_TEMPLATES', (DIR_FRAMEWORK . 'Templates/')); |
|
| 7 | +define('DIR_CLASSES', (DIR_FRAMEWORK.'Classes/')); |
|
| 8 | +define('DIR_DATA', (DIR_FRAMEWORK.'Data/')); |
|
| 9 | +define('DIR_INCLUDES', (DIR_FRAMEWORK.'Includes/')); |
|
| 10 | +define('DIR_TEMPLATES', (DIR_FRAMEWORK.'Templates/')); |
|
| 11 | 11 | |
| 12 | 12 | # Require classes |
| 13 | 13 | |
| 14 | -require_once (DIR_FRAMEWORK . 'Engine.php'); |
|
| 15 | -require_once (DIR_FRAMEWORK . 'Exception.php'); |
|
| 14 | +require_once (DIR_FRAMEWORK.'Engine.php'); |
|
| 15 | +require_once (DIR_FRAMEWORK.'Exception.php'); |
|
| 16 | 16 | |
| 17 | 17 | # Require configuration |
| 18 | 18 | |
| 19 | -require_once (DIR_INCLUDES . 'Constants.php'); |
|
| 20 | -require_once (DIR_INCLUDES . 'Regex.php'); |
|
| 21 | -require_once (DIR_INCLUDES . 'Headers/Mime.php'); |
|
| 22 | -require_once (DIR_INCLUDES . 'Headers/Status.php'); |
|
| 19 | +require_once (DIR_INCLUDES.'Constants.php'); |
|
| 20 | +require_once (DIR_INCLUDES.'Regex.php'); |
|
| 21 | +require_once (DIR_INCLUDES.'Headers/Mime.php'); |
|
| 22 | +require_once (DIR_INCLUDES.'Headers/Status.php'); |
|
| 23 | 23 | |
| 24 | 24 | # Set defaults |
| 25 | 25 | |
@@ -29,10 +29,10 @@ discard block |
||
| 29 | 29 | |
| 30 | 30 | # Set request constants |
| 31 | 31 | |
| 32 | -define('REQUEST_CLIENT_IP', Engine::getIP()); |
|
| 32 | +define('REQUEST_CLIENT_IP', Engine::getIP()); |
|
| 33 | 33 | |
| 34 | -define('REQUEST_TIME', $_SERVER['REQUEST_TIME']); |
|
| 35 | -define('REQUEST_TIME_FLOAT', $_SERVER['REQUEST_TIME_FLOAT']); |
|
| 34 | +define('REQUEST_TIME', $_SERVER['REQUEST_TIME']); |
|
| 35 | +define('REQUEST_TIME_FLOAT', $_SERVER['REQUEST_TIME_FLOAT']); |
|
| 36 | 36 | |
| 37 | 37 | # Set exception handler |
| 38 | 38 | |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | |
| 73 | 73 | public function getPath() : string { |
| 74 | 74 | |
| 75 | - return ('/' . implode('/', array_map('urlencode', $this->path))); |
|
| 75 | + return ('/'.implode('/', array_map('urlencode', $this->path))); |
|
| 76 | 76 | } |
| 77 | 77 | |
| 78 | 78 | /** |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | |
| 82 | 82 | public function getQuery() : string { |
| 83 | 83 | |
| 84 | - return (($query = http_build_query($this->query)) ? ('?' . $query) : ''); |
|
| 84 | + return (($query = http_build_query($this->query)) ? ('?'.$query) : ''); |
|
| 85 | 85 | } |
| 86 | 86 | |
| 87 | 87 | /** |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | |
| 109 | 109 | public function getString(bool $include_query = true) : string { |
| 110 | 110 | |
| 111 | - return ($this->getPath() . ($include_query ? $this->getQuery() : '')); |
|
| 111 | + return ($this->getPath().($include_query ? $this->getQuery() : '')); |
|
| 112 | 112 | } |
| 113 | 113 | } |
| 114 | 114 | } |
@@ -2,33 +2,33 @@ |
||
| 2 | 2 | |
| 3 | 3 | # Define constants |
| 4 | 4 | |
| 5 | -define('DIR_SYSTEM', (dirname(__FILE__) . '/')); |
|
| 5 | +define('DIR_SYSTEM', (dirname(__FILE__).'/')); |
|
| 6 | 6 | |
| 7 | -define('DIR_SYSTEM_CLASSES', (DIR_SYSTEM . 'Classes/')); |
|
| 8 | -define('DIR_SYSTEM_DATA', (DIR_SYSTEM . 'Data/')); |
|
| 9 | -define('DIR_SYSTEM_INCLUDES', (DIR_SYSTEM . 'Includes/')); |
|
| 10 | -define('DIR_SYSTEM_LANGUAGES', (DIR_SYSTEM . 'Languages/')); |
|
| 11 | -define('DIR_SYSTEM_TEMPLATES', (DIR_SYSTEM . 'Templates/')); |
|
| 7 | +define('DIR_SYSTEM_CLASSES', (DIR_SYSTEM.'Classes/')); |
|
| 8 | +define('DIR_SYSTEM_DATA', (DIR_SYSTEM.'Data/')); |
|
| 9 | +define('DIR_SYSTEM_INCLUDES', (DIR_SYSTEM.'Includes/')); |
|
| 10 | +define('DIR_SYSTEM_LANGUAGES', (DIR_SYSTEM.'Languages/')); |
|
| 11 | +define('DIR_SYSTEM_TEMPLATES', (DIR_SYSTEM.'Templates/')); |
|
| 12 | 12 | |
| 13 | 13 | # Require classes |
| 14 | 14 | |
| 15 | -require_once (DIR_SYSTEM . 'Exception.php'); |
|
| 15 | +require_once (DIR_SYSTEM.'Exception.php'); |
|
| 16 | 16 | |
| 17 | 17 | # Require configuration |
| 18 | 18 | |
| 19 | -require_once (DIR_SYSTEM_INCLUDES . 'Config.php'); |
|
| 20 | -require_once (DIR_SYSTEM_INCLUDES . 'Constants.php'); |
|
| 21 | -require_once (DIR_SYSTEM_INCLUDES . 'Regex.php'); |
|
| 22 | -require_once (DIR_SYSTEM_INCLUDES . 'Tables.php'); |
|
| 19 | +require_once (DIR_SYSTEM_INCLUDES.'Config.php'); |
|
| 20 | +require_once (DIR_SYSTEM_INCLUDES.'Constants.php'); |
|
| 21 | +require_once (DIR_SYSTEM_INCLUDES.'Regex.php'); |
|
| 22 | +require_once (DIR_SYSTEM_INCLUDES.'Tables.php'); |
|
| 23 | 23 | |
| 24 | 24 | # Process environment variables |
| 25 | 25 | |
| 26 | -define('HTTP_MOD_REWRITE', (getenv('HTTP_MOD_REWRITE') === 'on')); |
|
| 26 | +define('HTTP_MOD_REWRITE', (getenv('HTTP_MOD_REWRITE') === 'on')); |
|
| 27 | 27 | |
| 28 | -define('INSTALL_PATH', rtrim(getenv('INSTALL_PATH'), '/')); |
|
| 28 | +define('INSTALL_PATH', rtrim(getenv('INSTALL_PATH'), '/')); |
|
| 29 | 29 | |
| 30 | -define('MODE_DEBUG', @file_exists(DIR_SYSTEM_DATA . '.debug')); |
|
| 31 | -define('MODE_DEMO', @file_exists(DIR_SYSTEM_DATA . '.demo')); |
|
| 30 | +define('MODE_DEBUG', @file_exists(DIR_SYSTEM_DATA.'.debug')); |
|
| 31 | +define('MODE_DEMO', @file_exists(DIR_SYSTEM_DATA.'.demo')); |
|
| 32 | 32 | |
| 33 | 33 | // Add here a check for a debug mode and if enabled then set an error reporting to E_ALL (previously should be set to 0). |
| 34 | 34 | // Till the CMS is in a beta stage an error reporting should be set to E_ALL by default. |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | |
| 25 | 25 | public static function checkInstallFile() { |
| 26 | 26 | |
| 27 | - return Explorer::isFile(DIR_WWW . 'install.php'); |
|
| 27 | + return Explorer::isFile(DIR_WWW.'install.php'); |
|
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 30 | # Get MySQL version |