make debug output optional
This commit is contained in:
parent
18e4ff26b0
commit
e1b16e250e
|
@ -12,6 +12,10 @@ if (preg_match("/config.inc.php/", $_SERVER['SCRIPT_NAME'])) {
|
|||
exit;
|
||||
}
|
||||
|
||||
// Debug mode
|
||||
// Enables PHP error output
|
||||
$CONF['debug'] = 'true';
|
||||
|
||||
// Language config
|
||||
// Language files are located in './languages'.
|
||||
$CONF['default_language'] = 'en';
|
||||
|
|
|
@ -7,11 +7,6 @@
|
|||
//
|
||||
// File: functions.inc.php
|
||||
//
|
||||
ini_set('display_errors', 1);
|
||||
ini_set('display_startup_errors', 1);
|
||||
error_reporting(E_ALL);
|
||||
mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT);
|
||||
|
||||
if(preg_match("/functions.inc.php/", $_SERVER['SCRIPT_NAME'])) {
|
||||
header("Location: login.php");
|
||||
exit;
|
||||
|
@ -19,6 +14,19 @@ if(preg_match("/functions.inc.php/", $_SERVER['SCRIPT_NAME'])) {
|
|||
|
||||
$version = "1.0.0";
|
||||
|
||||
//
|
||||
// Check of debug is enabled or not
|
||||
//
|
||||
if ($CONF['debug'] == 'true') {
|
||||
ini_set('display_errors', 1);
|
||||
ini_set('display_startup_errors', 1);
|
||||
error_reporting(E_ALL);
|
||||
mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT);
|
||||
} else {
|
||||
ini_set('display_errors', 0);
|
||||
ini_set('display_startup_errors', 0);
|
||||
}
|
||||
|
||||
//
|
||||
// check_session
|
||||
// Action: Check if a session already exists, if not redirect to login.php
|
||||
|
|
Loading…
Reference in New Issue