@@ -2,68 +2,68 @@ |
||
2 | 2 | |
3 | 3 | # Cadmium |
4 | 4 | |
5 | -define('CADMIUM_NAME', 'Cadmium CMS'); |
|
6 | -define('CADMIUM_HOME', 'http://cadmium-cms.com'); |
|
5 | +define('CADMIUM_NAME', 'Cadmium CMS'); |
|
6 | +define('CADMIUM_HOME', 'http://cadmium-cms.com'); |
|
7 | 7 | |
8 | -define('CADMIUM_VERSION', '0.4.1'); |
|
9 | -define('CADMIUM_COPY', '2016'); |
|
8 | +define('CADMIUM_VERSION', '0.4.1'); |
|
9 | +define('CADMIUM_COPY', '2016'); |
|
10 | 10 | |
11 | 11 | # External |
12 | 12 | |
13 | -define('JQUERY_VERSION', '3.1.1'); |
|
14 | -define('SEMANTIC_UI_VERSION', '2.2.6'); |
|
15 | -define('CKEDITOR_VERSION', '4.5.11'); |
|
13 | +define('JQUERY_VERSION', '3.1.1'); |
|
14 | +define('SEMANTIC_UI_VERSION', '2.2.6'); |
|
15 | +define('CKEDITOR_VERSION', '4.5.11'); |
|
16 | 16 | |
17 | 17 | # Sections |
18 | 18 | |
19 | -define('SECTION_ADMIN', 'admin'); |
|
20 | -define('SECTION_SITE', 'site'); |
|
19 | +define('SECTION_ADMIN', 'admin'); |
|
20 | +define('SECTION_SITE', 'site'); |
|
21 | 21 | |
22 | 22 | # Filemanager types |
23 | 23 | |
24 | -define('FILEMANAGER_TYPE_DIR', 'dir'); |
|
25 | -define('FILEMANAGER_TYPE_FILE', 'file'); |
|
24 | +define('FILEMANAGER_TYPE_DIR', 'dir'); |
|
25 | +define('FILEMANAGER_TYPE_FILE', 'file'); |
|
26 | 26 | |
27 | 27 | # Access |
28 | 28 | |
29 | -define('ACCESS_PUBLIC', 0); |
|
30 | -define('ACCESS_REGISTERED', 1); |
|
31 | -define('ACCESS_ADMINISTRATOR', 2); |
|
29 | +define('ACCESS_PUBLIC', 0); |
|
30 | +define('ACCESS_REGISTERED', 1); |
|
31 | +define('ACCESS_ADMINISTRATOR', 2); |
|
32 | 32 | |
33 | 33 | # Frequency |
34 | 34 | |
35 | -define('FREQUENCY_ALWAYS', 'always'); |
|
36 | -define('FREQUENCY_HOURLY', 'hourly'); |
|
37 | -define('FREQUENCY_DAILY', 'daily'); |
|
38 | -define('FREQUENCY_WEEKLY', 'weekly'); |
|
39 | -define('FREQUENCY_MONTHLY', 'monthly'); |
|
40 | -define('FREQUENCY_YEARLY', 'yearly'); |
|
41 | -define('FREQUENCY_NEVER', 'never'); |
|
35 | +define('FREQUENCY_ALWAYS', 'always'); |
|
36 | +define('FREQUENCY_HOURLY', 'hourly'); |
|
37 | +define('FREQUENCY_DAILY', 'daily'); |
|
38 | +define('FREQUENCY_WEEKLY', 'weekly'); |
|
39 | +define('FREQUENCY_MONTHLY', 'monthly'); |
|
40 | +define('FREQUENCY_YEARLY', 'yearly'); |
|
41 | +define('FREQUENCY_NEVER', 'never'); |
|
42 | 42 | |
43 | 43 | # Rank |
44 | 44 | |
45 | -define('RANK_GUEST', 0); |
|
46 | -define('RANK_USER', 1); |
|
47 | -define('RANK_ADMINISTRATOR', 2); |
|
45 | +define('RANK_GUEST', 0); |
|
46 | +define('RANK_USER', 1); |
|
47 | +define('RANK_ADMINISTRATOR', 2); |
|
48 | 48 | |
49 | 49 | # Sex |
50 | 50 | |
51 | -define('SEX_NOT_SELECTED', 0); |
|
52 | -define('SEX_MALE', 1); |
|
53 | -define('SEX_FEMALE', 2); |
|
51 | +define('SEX_NOT_SELECTED', 0); |
|
52 | +define('SEX_MALE', 1); |
|
53 | +define('SEX_FEMALE', 2); |
|
54 | 54 | |
55 | 55 | # Status |
56 | 56 | |
57 | -define('STATUS_ONLINE', 0); |
|
58 | -define('STATUS_MAINTENANCE', 1); |
|
59 | -define('STATUS_UPDATE', 2); |
|
57 | +define('STATUS_ONLINE', 0); |
|
58 | +define('STATUS_MAINTENANCE', 1); |
|
59 | +define('STATUS_UPDATE', 2); |
|
60 | 60 | |
61 | 61 | # Target |
62 | 62 | |
63 | -define('TARGET_SELF', 0); |
|
64 | -define('TARGET_BLANK', 1); |
|
63 | +define('TARGET_SELF', 0); |
|
64 | +define('TARGET_BLANK', 1); |
|
65 | 65 | |
66 | 66 | # Visibility |
67 | 67 | |
68 | -define('VISIBILITY_DRAFT', 0); |
|
69 | -define('VISIBILITY_PUBLISHED', 1); |
|
68 | +define('VISIBILITY_DRAFT', 0); |
|
69 | +define('VISIBILITY_PUBLISHED', 1); |
@@ -2,32 +2,32 @@ |
||
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('DEBUG_MODE', @file_exists(DIR_SYSTEM_DATA . '.debug')); |
|
30 | +define('DEBUG_MODE', @file_exists(DIR_SYSTEM_DATA.'.debug')); |
|
31 | 31 | |
32 | 32 | # Set error reporting |
33 | 33 |
@@ -42,7 +42,7 @@ |
||
42 | 42 | |
43 | 43 | # Set system entries |
44 | 44 | |
45 | - $contents->system_version = CADMIUM_VERSION; |
|
45 | + $contents->system_version = CADMIUM_VERSION; |
|
46 | 46 | |
47 | 47 | # Set external entries |
48 | 48 |
@@ -24,14 +24,14 @@ |
||
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 OS version |
31 | 31 | |
32 | 32 | public static function osVersion() { |
33 | 33 | |
34 | - return (php_uname('s') . ', ' . php_uname('v')); |
|
34 | + return (php_uname('s').', '.php_uname('v')); |
|
35 | 35 | } |
36 | 36 | |
37 | 37 | # Get MySQL version |
@@ -10,14 +10,14 @@ discard block |
||
10 | 10 | |
11 | 11 | private function getSystemUrl() { |
12 | 12 | |
13 | - if (!empty($_SERVER['HTTP_HOST'])) return ((Request::isSecure() ? 'https://' : 'http://') . $_SERVER['HTTP_HOST']); |
|
13 | + if (!empty($_SERVER['HTTP_HOST'])) return ((Request::isSecure() ? 'https://' : 'http://').$_SERVER['HTTP_HOST']); |
|
14 | 14 | } |
15 | 15 | |
16 | 16 | # Get system email |
17 | 17 | |
18 | 18 | private function getSystemEmail() { |
19 | 19 | |
20 | - if (!empty($_SERVER['HTTP_HOST'])) return ('admin@' . $_SERVER['HTTP_HOST']); |
|
20 | + if (!empty($_SERVER['HTTP_HOST'])) return ('admin@'.$_SERVER['HTTP_HOST']); |
|
21 | 21 | } |
22 | 22 | |
23 | 23 | # Constructor |
@@ -26,84 +26,84 @@ discard block |
||
26 | 26 | |
27 | 27 | # Admin language |
28 | 28 | |
29 | - $this->addParam('admin_language', CONFIG_ADMIN_LANGUAGE_DEFAULT, function (string $name) { |
|
29 | + $this->addParam('admin_language', CONFIG_ADMIN_LANGUAGE_DEFAULT, function(string $name) { |
|
30 | 30 | |
31 | 31 | return ((false !== ($name = Extend\Languages::validate($name))) ? $name : null); |
32 | 32 | }); |
33 | 33 | |
34 | 34 | # Admin template |
35 | 35 | |
36 | - $this->addParam('admin_template', CONFIG_ADMIN_TEMPLATE_DEFAULT, function (string $name) { |
|
36 | + $this->addParam('admin_template', CONFIG_ADMIN_TEMPLATE_DEFAULT, function(string $name) { |
|
37 | 37 | |
38 | 38 | return ((false !== ($name = Extend\Templates::validate($name))) ? $name : null); |
39 | 39 | }); |
40 | 40 | |
41 | 41 | # Site language |
42 | 42 | |
43 | - $this->addParam('site_language', CONFIG_SITE_LANGUAGE_DEFAULT, function (string $name) { |
|
43 | + $this->addParam('site_language', CONFIG_SITE_LANGUAGE_DEFAULT, function(string $name) { |
|
44 | 44 | |
45 | 45 | return ((false !== ($name = Extend\Languages::validate($name))) ? $name : null); |
46 | 46 | }); |
47 | 47 | |
48 | 48 | # Site template |
49 | 49 | |
50 | - $this->addParam('site_template', CONFIG_SITE_TEMPLATE_DEFAULT, function (string $name) { |
|
50 | + $this->addParam('site_template', CONFIG_SITE_TEMPLATE_DEFAULT, function(string $name) { |
|
51 | 51 | |
52 | 52 | return ((false !== ($name = Extend\Templates::validate($name))) ? $name : null); |
53 | 53 | }); |
54 | 54 | |
55 | 55 | # Site title |
56 | 56 | |
57 | - $this->addParam('site_title', CONFIG_SITE_TITLE_DEFAULT, function (string $title) { |
|
57 | + $this->addParam('site_title', CONFIG_SITE_TITLE_DEFAULT, function(string $title) { |
|
58 | 58 | |
59 | 59 | return (('' !== $title) ? $title : null); |
60 | 60 | }); |
61 | 61 | |
62 | 62 | # Site slogan |
63 | 63 | |
64 | - $this->addParam('site_slogan', CONFIG_SITE_SLOGAN_DEFAULT, function (string $slogan) { |
|
64 | + $this->addParam('site_slogan', CONFIG_SITE_SLOGAN_DEFAULT, function(string $slogan) { |
|
65 | 65 | |
66 | 66 | return $slogan; |
67 | 67 | }); |
68 | 68 | |
69 | 69 | # Site status |
70 | 70 | |
71 | - $this->addParam('site_status', STATUS_ONLINE, function (string $status) { |
|
71 | + $this->addParam('site_status', STATUS_ONLINE, function(string $status) { |
|
72 | 72 | |
73 | 73 | return ((false !== ($status = Range\Status::validate($status))) ? $status : null); |
74 | 74 | }); |
75 | 75 | |
76 | 76 | # Site description |
77 | 77 | |
78 | - $this->addParam('site_description', '', function (string $description) { |
|
78 | + $this->addParam('site_description', '', function(string $description) { |
|
79 | 79 | |
80 | 80 | return $description; |
81 | 81 | }); |
82 | 82 | |
83 | 83 | # Site keywords |
84 | 84 | |
85 | - $this->addParam('site_keywords', '', function (string $keywords) { |
|
85 | + $this->addParam('site_keywords', '', function(string $keywords) { |
|
86 | 86 | |
87 | 87 | return $keywords; |
88 | 88 | }); |
89 | 89 | |
90 | 90 | # System url |
91 | 91 | |
92 | - $this->addParam('system_url', $this->getSystemUrl(), function (string $url) { |
|
92 | + $this->addParam('system_url', $this->getSystemUrl(), function(string $url) { |
|
93 | 93 | |
94 | 94 | return ((false !== ($url = Validate::url($url))) ? $url : null); |
95 | 95 | }); |
96 | 96 | |
97 | 97 | # System email |
98 | 98 | |
99 | - $this->addParam('system_email', $this->getSystemEmail(), function (string $email) { |
|
99 | + $this->addParam('system_email', $this->getSystemEmail(), function(string $email) { |
|
100 | 100 | |
101 | 101 | return ((false !== ($email = Validate::email($email))) ? $email : null); |
102 | 102 | }); |
103 | 103 | |
104 | 104 | # System timezone |
105 | 105 | |
106 | - $this->addParam('system_timezone', CONFIG_SYSTEM_TIMEZONE_DEFAULT, function (string $timezone) { |
|
106 | + $this->addParam('system_timezone', CONFIG_SYSTEM_TIMEZONE_DEFAULT, function(string $timezone) { |
|
107 | 107 | |
108 | 108 | return ((false !== ($timezone = Timezone::validate($timezone))) ? $timezone : null); |
109 | 109 | }); |
@@ -28,9 +28,9 @@ discard block |
||
28 | 28 | |
29 | 29 | private function createMainTable() { |
30 | 30 | |
31 | - $query = ("CREATE TABLE IF NOT EXISTS `" . static::$table . "` (") . |
|
31 | + $query = ("CREATE TABLE IF NOT EXISTS `".static::$table."` ("). |
|
32 | 32 | |
33 | - implode(", ", $this->getStatements()) . |
|
33 | + implode(", ", $this->getStatements()). |
|
34 | 34 | |
35 | 35 | (") ENGINE=InnoDB DEFAULT CHARSET=utf8"); |
36 | 36 | |
@@ -43,17 +43,17 @@ discard block |
||
43 | 43 | |
44 | 44 | private function createRelationsTable() { |
45 | 45 | |
46 | - $query = ("CREATE TABLE IF NOT EXISTS `" . static::$table_relations . "` (") . |
|
46 | + $query = ("CREATE TABLE IF NOT EXISTS `".static::$table_relations."` ("). |
|
47 | 47 | |
48 | - ("`ancestor` int(10) UNSIGNED NOT NULL, `descendant` int(10) UNSIGNED NOT NULL, ") . |
|
48 | + ("`ancestor` int(10) UNSIGNED NOT NULL, `descendant` int(10) UNSIGNED NOT NULL, "). |
|
49 | 49 | |
50 | - ("`depth` int(10) UNSIGNED NOT NULL, ") . |
|
50 | + ("`depth` int(10) UNSIGNED NOT NULL, "). |
|
51 | 51 | |
52 | - ("PRIMARY KEY (`ancestor`, `descendant`), KEY (`ancestor`), KEY (`descendant`), KEY (`depth`), ") . |
|
52 | + ("PRIMARY KEY (`ancestor`, `descendant`), KEY (`ancestor`), KEY (`descendant`), KEY (`depth`), "). |
|
53 | 53 | |
54 | - ("FOREIGN KEY (`ancestor`) REFERENCES `" . static::$table . "` (`id`) ON DELETE CASCADE, ") . |
|
54 | + ("FOREIGN KEY (`ancestor`) REFERENCES `".static::$table."` (`id`) ON DELETE CASCADE, "). |
|
55 | 55 | |
56 | - ("FOREIGN KEY (`descendant`) REFERENCES `" . static::$table . "` (`id`) ON DELETE CASCADE ") . |
|
56 | + ("FOREIGN KEY (`descendant`) REFERENCES `".static::$table."` (`id`) ON DELETE CASCADE "). |
|
57 | 57 | |
58 | 58 | (") ENGINE=InnoDB DEFAULT CHARSET=utf8"); |
59 | 59 | |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | |
67 | 67 | private function removeMainTable() { |
68 | 68 | |
69 | - $query = ("DROP TABLE IF EXISTS `" . static::$table . "`"); |
|
69 | + $query = ("DROP TABLE IF EXISTS `".static::$table."`"); |
|
70 | 70 | |
71 | 71 | return (DB::send($query) && DB::getLast()->status); |
72 | 72 | } |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | |
76 | 76 | private function removeRelationsTable() { |
77 | 77 | |
78 | - $query = ("DROP TABLE IF EXISTS `" . static::$table_relations . "`"); |
|
78 | + $query = ("DROP TABLE IF EXISTS `".static::$table_relations."`"); |
|
79 | 79 | |
80 | 80 | return (DB::send($query) && DB::getLast()->status); |
81 | 81 | } |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | |
76 | 76 | if ('' === static::$file_name) return null; |
77 | 77 | |
78 | - $file_name = (DIR_SYSTEM_DATA . static::$file_name); |
|
78 | + $file_name = (DIR_SYSTEM_DATA.static::$file_name); |
|
79 | 79 | |
80 | 80 | if (null === ($data = JSON::load($file_name))) return null; |
81 | 81 | |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | |
93 | 93 | if ('' === static::$file_name) return false; |
94 | 94 | |
95 | - $file_name = (DIR_SYSTEM_DATA . static::$file_name); |
|
95 | + $file_name = (DIR_SYSTEM_DATA.static::$file_name); |
|
96 | 96 | |
97 | 97 | if (null === ($data = $this->validate($data))) return false; |
98 | 98 | |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | |
110 | 110 | if ('' === static::$file_name) return false; |
111 | 111 | |
112 | - $file_name = (DIR_SYSTEM_DATA . static::$file_name); |
|
112 | + $file_name = (DIR_SYSTEM_DATA.static::$file_name); |
|
113 | 113 | |
114 | 114 | return (!Explorer::isFile($file_name) || Explorer::removeFile($file_name)); |
115 | 115 | } |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | |
135 | 135 | public static function sendStatus(int $code) { |
136 | 136 | |
137 | - if (self::isStatusCode($code)) header($_SERVER['SERVER_PROTOCOL'] . ' ' . self::$status_codes[$code]); |
|
137 | + if (self::isStatusCode($code)) header($_SERVER['SERVER_PROTOCOL'].' '.self::$status_codes[$code]); |
|
138 | 138 | } |
139 | 139 | |
140 | 140 | /** |
@@ -145,12 +145,12 @@ discard block |
||
145 | 145 | |
146 | 146 | if (self::isTextContentType($type)) { |
147 | 147 | |
148 | - return header('Content-type: ' . self::$content_types_text[$type] . '; charset=UTF-8'); |
|
148 | + return header('Content-type: '.self::$content_types_text[$type].'; charset=UTF-8'); |
|
149 | 149 | } |
150 | 150 | |
151 | 151 | if (self::isMediaContentType($type)) { |
152 | 152 | |
153 | - return header('Content-type: ' . self::$content_types_media[$type]); |
|
153 | + return header('Content-type: '.self::$content_types_media[$type]); |
|
154 | 154 | } |
155 | 155 | } |
156 | 156 | |
@@ -162,15 +162,15 @@ discard block |
||
162 | 162 | |
163 | 163 | if (self::$cache_sent) return; |
164 | 164 | |
165 | - header('Expires: ' . gmdate('D, d M Y H:i:s', (REQUEST_TIME + $expires)) . ' GMT'); |
|
165 | + header('Expires: '.gmdate('D, d M Y H:i:s', (REQUEST_TIME + $expires)).' GMT'); |
|
166 | 166 | |
167 | - header('Last-Modified: ' . gmdate('D, d M Y H:i:s', REQUEST_TIME) . ' GMT'); |
|
167 | + header('Last-Modified: '.gmdate('D, d M Y H:i:s', REQUEST_TIME).' GMT'); |
|
168 | 168 | |
169 | 169 | $limiter = ($public ? 'public' : 'private'); |
170 | 170 | |
171 | - header('Cache-Control: ' . $limiter . ', max-age=' . $expires . ', pre-check=' . $expires); |
|
171 | + header('Cache-Control: '.$limiter.', max-age='.$expires.', pre-check='.$expires); |
|
172 | 172 | |
173 | - header('Pragma: ' . $limiter); |
|
173 | + header('Pragma: '.$limiter); |
|
174 | 174 | |
175 | 175 | # ------------------------ |
176 | 176 | |
@@ -185,9 +185,9 @@ discard block |
||
185 | 185 | |
186 | 186 | if (self::$cache_sent) return; |
187 | 187 | |
188 | - header('Expires: ' . gmdate('D, d M Y H:i:s', strtotime('-1 day')) . ' GMT'); |
|
188 | + header('Expires: '.gmdate('D, d M Y H:i:s', strtotime('-1 day')).' GMT'); |
|
189 | 189 | |
190 | - header('Last-Modified: ' . gmdate('D, d M Y H:i:s', strtotime('-1 day')) . ' GMT'); |
|
190 | + header('Last-Modified: '.gmdate('D, d M Y H:i:s', strtotime('-1 day')).' GMT'); |
|
191 | 191 | |
192 | 192 | header('Cache-Control: no-store, no-cache, must-revalidate, max-age=0'); |
193 | 193 |
@@ -10,13 +10,13 @@ discard block |
||
10 | 10 | |
11 | 11 | private static function parseContents(string $contents, Throwable $exc) : string { |
12 | 12 | |
13 | - $contents = str_replace('$message$', $exc->getMessage(), $contents); |
|
13 | + $contents = str_replace('$message$', $exc->getMessage(), $contents); |
|
14 | 14 | |
15 | - $contents = str_replace('$file$', $exc->getFile(), $contents); |
|
15 | + $contents = str_replace('$file$', $exc->getFile(), $contents); |
|
16 | 16 | |
17 | - $contents = str_replace('$line$', $exc->getLine(), $contents); |
|
17 | + $contents = str_replace('$line$', $exc->getLine(), $contents); |
|
18 | 18 | |
19 | - $contents = str_replace('$trace$', nl2br($exc->getTraceAsString()), $contents); |
|
19 | + $contents = str_replace('$trace$', nl2br($exc->getTraceAsString()), $contents); |
|
20 | 20 | |
21 | 21 | # ------------------------ |
22 | 22 | |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | |
55 | 55 | # Load template |
56 | 56 | |
57 | - $file_name = (DIR_TEMPLATES . 'Exception.tpl'); |
|
57 | + $file_name = (DIR_TEMPLATES.'Exception.tpl'); |
|
58 | 58 | |
59 | 59 | if (false === ($contents = @file_get_contents($file_name))) $output = nl2br($exc); |
60 | 60 | |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | |
71 | 71 | header('Pragma: no-cache'); |
72 | 72 | |
73 | - header($_SERVER['SERVER_PROTOCOL'] . ' 500 Internal Server Error', true, 500); |
|
73 | + header($_SERVER['SERVER_PROTOCOL'].' 500 Internal Server Error', true, 500); |
|
74 | 74 | |
75 | 75 | header('Content-type: text/html; charset=UTF-8'); |
76 | 76 |