Passed
Push — master ( d20c74...84eb55 )
by Justin
07:29 queued 03:10
created
system/core/init.php 1 patch
Indentation   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -17,17 +17,17 @@  discard block
 block discarded – undo
17 17
  */
18 18
 
19 19
 if (PHP_MAJOR_VERSION < 7) {
20
-	echo "CMS is required PHP 7.0.0 or greater! Please install PHP 7 (current version: " . PHP_VERSION . ").";
21
-	ob_flush();
22
-	exit;
20
+    echo "CMS is required PHP 7.0.0 or greater! Please install PHP 7 (current version: " . PHP_VERSION . ").";
21
+    ob_flush();
22
+    exit;
23 23
 }
24 24
 
25 25
 register_shutdown_function(function () {
26
-	//flush gzip cache
27
-	@ob_end_flush();
26
+    //flush gzip cache
27
+    @ob_end_flush();
28 28
 
29
-	//throw event, for example to write logs to file
30
-	@Events::throwEvent("shutdown_function");
29
+    //throw event, for example to write logs to file
30
+    @Events::throwEvent("shutdown_function");
31 31
 });
32 32
 
33 33
 //define some constants
@@ -40,13 +40,13 @@  discard block
 block discarded – undo
40 40
 
41 41
 //check, if cache directory is writable
42 42
 if (!file_exists(CACHE_PATH)) {
43
-	echo "Error! cache directory doesnt exists!";
44
-	exit;
43
+    echo "Error! cache directory doesnt exists!";
44
+    exit;
45 45
 }
46 46
 
47 47
 if (!is_writable(CACHE_PATH)) {
48
-	echo "Error! directory isnt writable!";
49
-	exit;
48
+    echo "Error! directory isnt writable!";
49
+    exit;
50 50
 }
51 51
 
52 52
 //set default charset to UTF-8
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 
69 69
 //load pre-loaded classes, if option is enabled
70 70
 if (OPTION_PRELOAD_CLASSES) {
71
-	AutoLoaderCache::load();
71
+    AutoLoaderCache::load();
72 72
 }
73 73
 
74 74
 //initialize cache
@@ -100,29 +100,29 @@  discard block
 block discarded – undo
100 100
 
101 101
 //check, if allow_url_fopen is enabled
102 102
 if (!PHPUtils::isUrlfopenEnabled() && !PHPUtils::isCurlAvailable()) {
103
-	echo "CMS requires PHP option 'allow_url_fopen' enabled OR extension 'curl', change your php.ini or hosting settings to enable this option!";
104
-	ob_flush();
105
-	exit;
103
+    echo "CMS requires PHP option 'allow_url_fopen' enabled OR extension 'curl', change your php.ini or hosting settings to enable this option!";
104
+    ob_flush();
105
+    exit;
106 106
 }
107 107
 
108 108
 Events::throwEvent("init_security");
109 109
 
110 110
 //check for maintenance mode
111 111
 if (Settings::get("maintenance_mode_enabled", false) == true) {
112
-	$html = Settings::get("maintenance_text", "Maintenance mode enabled!");
113
-
114
-	//throw event
115
-	Events::throwEvent("maintenance_html", array(
116
-		'html' => &$html
117
-	));
118
-
119
-	if (file_exists(ROOT_PATH . "maintenance.html")) {
120
-		echo file_get_contents(ROOT_PATH . "maintenance.html");
121
-	} else if (file_exists(ROOT_PATH . "setup/maintenance.html")) {
122
-		echo file_get_contents(ROOT_PATH . "setup/maintenance.html");
123
-	} else {
124
-		echo $html;
125
-	}
112
+    $html = Settings::get("maintenance_text", "Maintenance mode enabled!");
113
+
114
+    //throw event
115
+    Events::throwEvent("maintenance_html", array(
116
+        'html' => &$html
117
+    ));
118
+
119
+    if (file_exists(ROOT_PATH . "maintenance.html")) {
120
+        echo file_get_contents(ROOT_PATH . "maintenance.html");
121
+    } else if (file_exists(ROOT_PATH . "setup/maintenance.html")) {
122
+        echo file_get_contents(ROOT_PATH . "setup/maintenance.html");
123
+    } else {
124
+        echo $html;
125
+    }
126 126
 }
127 127
 
128 128
 /*set_error_handler(function($errno, $errstr, $errfile, $errline, array $errcontext) {
Please login to merge, or discard this patch.