aboutsummaryrefslogtreecommitdiff
path: root/functions.inc.php
diff options
context:
space:
mode:
authormensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2008-11-21 10:44:28 +0000
committermensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2008-11-21 10:44:28 +0000
commit3c181054dbe60467cc744c447010f525a862c26e (patch)
treecaf19eca71e1339768620b8b2936c12f36dbdac7 /functions.inc.php
parent8ca4455dc7add53f496161eda1e86c455d4ce37c (diff)
downloadsemanticscuttle-3c181054dbe60467cc744c447010f525a862c26e.tar.gz
semanticscuttle-3c181054dbe60467cc744c447010f525a862c26e.tar.bz2
Refactoring: improve debug_mode, constants and other stuff
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@168 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'functions.inc.php')
-rw-r--r--functions.inc.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/functions.inc.php b/functions.inc.php
index 35f0fed..93821fd 100644
--- a/functions.inc.php
+++ b/functions.inc.php
@@ -85,11 +85,11 @@ function multi_array_search($needle, $haystack) {
}
function createURL($page = '', $ending = '') {
- global $cleanurls, $root;
+ global $cleanurls;
if (!$cleanurls && $page != '') {
$page .= '.php';
}
- return $root . $page .'/'. $ending;
+ return ROOT . $page .'/'. $ending;
}
/* Shorten a string like a URL for example by cutting the middle of it */
@@ -112,7 +112,7 @@ function message_die($msg_code, $msg_text = '', $msg_title = '', $err_line = '',
// Get SQL error if we are debugging. Do this as soon as possible to prevent
// subsequent queries from overwriting the status of sql_error()
- if (DEBUG && ($msg_code == GENERAL_ERROR || $msg_code == CRITICAL_ERROR)) {
+ if (DEBUG_MODE && ($msg_code == GENERAL_ERROR || $msg_code == CRITICAL_ERROR)) {
$sql_error = is_null($db) ? '' : $db->sql_error();
$debug_text = '';
@@ -157,10 +157,10 @@ function message_die($msg_code, $msg_text = '', $msg_title = '', $err_line = '',
break;
}
- // Add on DEBUG info if we've enabled debug mode and this is an error. This
- // prevents debug info being output for general messages should DEBUG be
+ // Add on DEBUG_MODE info if we've enabled debug mode and this is an error. This
+ // prevents debug info being output for general messages should DEBUG_MODE be
// set TRUE by accident (preventing confusion for the end user!)
- if (DEBUG && ($msg_code == GENERAL_ERROR || $msg_code == CRITICAL_ERROR)) {
+ if (DEBUG_MODE && ($msg_code == GENERAL_ERROR || $msg_code == CRITICAL_ERROR)) {
if ($debug_text != '')
$msg_text = $msg_text . '<br /><br /><strong>'. T_('DEBUG MODE') .'</strong>'. $debug_text;
}