Skip to content

Commit

Permalink
small update in core
Browse files Browse the repository at this point in the history
  • Loading branch information
killserver committed Aug 6, 2014
1 parent 229eaa0 commit 89334bf
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 5 deletions.
20 changes: 18 additions & 2 deletions core.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
<?php
if(!defined("IS_CORE")) {
echo "ERROR";
die();
echo "403 ERROR";
die;
}

ini_set("max_execution_time", 0);
set_time_limit(0);

if(function_exists("ob_start")) {
ob_start("ob_gzhandler");
}
if(function_exists("ob_implicit_flush")) {
ob_implicit_flush(0);
}

session_start();

if(defined("DEBUG") || isset($_GET['debug'])) {
ini_set('display_errors',1);
Expand Down Expand Up @@ -63,4 +74,9 @@

$templates = new templates();

header('Content-Type: text/html; charset='.$config['charset']);
header('X-UA-Compatible: IE=edge,chrome=1');
header('Cache-Control: max-age');
header_remove('x-powered-by');

?>
6 changes: 4 additions & 2 deletions core/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
include_once(ROOT_PATH."core/class/".$class.".".ROOT_EX);
} elseif(file_exists(ROOT_PATH."core/class/system/".$class.".".ROOT_EX)) {
include_once(ROOT_PATH."core/class/system/".$class.".".ROOT_EX);
} elseif(file_exists(ROOT_PATH."core/modules/".$class.".".ROOT_EX)) {
} elseif(!defined("IS_ADMINPANEL") && file_exists(ROOT_PATH."core/modules/".$class.".".ROOT_EX)) {
include_once(ROOT_PATH."core/modules/".$class.".".ROOT_EX);
}
});
Expand Down Expand Up @@ -42,7 +42,9 @@ function include_dir($dir = null, $modules = null) {
}
}
}
include_dir(ROOT_PATH."core/modules/", true);
if(!defined("IS_ADMINPANEL")) {
include_dir(ROOT_PATH."core/modules/", true);
}
include_dir();

?>
6 changes: 5 additions & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
}

$server = $_SERVER['QUERY_STRING'];
//cut($server, nstrpos($server, "?")+1, nstrlen($server)) // <- ???
//cut($server, nstrpos($server, "?")+1, nstrlen($server))
if(!empty($server)) {
$page = $server;
if(strpos($page, "&") !== false) {
Expand All @@ -32,6 +32,10 @@
if(class_exists("page")) {
new page();
}
if(defined("DEBUG")) {
ini_set('display_errors',1);
error_reporting(E_ALL);
}

$Timer = microtime()-$Timer;
GzipOut($templates->gzip);
Expand Down

0 comments on commit 89334bf

Please sign in to comment.