From: Roland Häder Date: Fri, 22 Feb 2008 22:21:33 +0000 (+0000) Subject: more boolean constants improved X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=commitdiff_plain;h=121dafd40be4c4b3e41f37a943b86cf2cb48a224 more boolean constants improved --- diff --git a/inc/db/lib-mysql3.php b/inc/db/lib-mysql3.php index 0c2b15b17f..0cff40c6fc 100644 --- a/inc/db/lib-mysql3.php +++ b/inc/db/lib-mysql3.php @@ -59,7 +59,7 @@ function SQL_QUERY($sql_string, $F, $L) // Debug output //* DEBUG: */ print "Query=
".$sql_string."
, affected=".SQL_AFFECTEDROWS().", numrows=".SQL_NUMROWS($result)."
\n"; - if (($CSS != "1") && ($CSS != "-1") && (DEBUG_MODE) && (DEBUG_SQL)) + if (($CSS != "1") && ($CSS != "-1") && (isBooleanConstantAndTrue('DEBUG_MODE')) && (DEBUG_SQL)) { // // Debugging stuff... diff --git a/inc/footer.php b/inc/footer.php index 5f520f2372..85ebb5be43 100644 --- a/inc/footer.php +++ b/inc/footer.php @@ -48,7 +48,7 @@ if (($footer != "1") && ($footer != "2") && ($CSS != "1")) { } // Shall we display the copyright notice? - if ((empty($frame)) && (basename($_SERVER['PHP_SELF']) != "mailid_top.php") && (WRITE_FOOTER == true)) { + if ((empty($frame)) && (basename($_SERVER['PHP_SELF']) != "mailid_top.php") && ((isBooleanConstantAndTrue('WRITE_FOOTER ')))) { LOAD_TEMPLATE("copyright"); } diff --git a/inc/functions.php b/inc/functions.php index 150de6cc59..30106b2973 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -320,7 +320,7 @@ function LOAD_TEMPLATE($template, $return=false, $content="") { // Output direct OUTPUT_HTML($ret); } - } elseif (DEBUG_MODE) { + } elseif (isBooleanConstantAndTrue('DEBUG_MODE')) { // Warning, empty output! return "E:".$template."
\n"; } @@ -355,7 +355,7 @@ function SEND_EMAIL($TO, $SUBJECT, $MSG, $HTML='N', $FROM="") { // Append header $FROM .= LOAD_EMAIL_TEMPLATE("header"); } - } elseif (DEBUG_MODE) { + } elseif (isBooleanConstantAndTrue('DEBUG_MODE')) { if (empty($FROM)) { // Load email header template $FROM = LOAD_EMAIL_TEMPLATE("header"); @@ -367,7 +367,7 @@ function SEND_EMAIL($TO, $SUBJECT, $MSG, $HTML='N', $FROM="") { // Fix HTML parameter (default is no!) if (empty($HTML)) $HTML = 'N'; - if (DEBUG_MODE) { + if (isBooleanConstantAndTrue('DEBUG_MODE')) { // In debug mode we want to display the mail instead of sending it away so we can debug this part echo "
 ".htmlentities(trim($FROM))."
diff --git a/inc/install-inc.php b/inc/install-inc.php
index 14d36d3efb..9d9f1c165a 100644
--- a/inc/install-inc.php
+++ b/inc/install-inc.php
@@ -264,10 +264,10 @@ if ((!isBooleanConstantAndTrue('mxchange_installed')) || (!isBooleanConstantAndT
   
     
   
@@ -278,10 +278,10 @@ if ((!isBooleanConstantAndTrue('mxchange_installed')) || (!isBooleanConstantAndT
   
     
   
diff --git a/inc/mysql-connect.php b/inc/mysql-connect.php
index 6f2f6182a1..c4aca483a4 100644
--- a/inc/mysql-connect.php
+++ b/inc/mysql-connect.php
@@ -60,7 +60,7 @@ if ((empty($MySQL['login'])) && (!isBooleanConstantAndTrue('mxchange_installing'
 		// Please run the installation script (maybe again)
 		die(DIE_RUN_INSTALL_MYSQL);
 	}
-} elseif ((!isBooleanConstantAndTrue('mxchange_installing')) && (!isset($_GET['installing'])) && (empty($MySQL['password'])) && (warn_no_pass)) {
+} elseif ((!isBooleanConstantAndTrue('mxchange_installing')) && (!isset($_GET['installing'])) && (empty($MySQL['password'])) && (isBooleanConstantAndTrue('warn_no_pass'))) {
 	// No database password entered!!!
 	echo "".LANG_WARNING.": ".WARN_NULL_PASSWORD;
 }
@@ -121,7 +121,7 @@ LIMIT 1", __FILE__, __LINE__);
 					require_once(PATH."inc/mysql-manager.php"); // Functions which interact with the database
 
 					// Run daily reset
-					if ((date("d", $_CONFIG['last_update']) != date("d", time()) || (DEBUG_MODE == true)) && (!isBooleanConstantAndTrue('mxchange_installing')) && (isBooleanConstantAndTrue('mxchange_installed')) && (isBooleanConstantAndTrue('admin_registered')) && (!isset($_GET['register'])) && ($CSS != 1)) {
+					if ((date("d", $_CONFIG['last_update']) != date("d", time()) || ((isBooleanConstantAndTrue('DEBUG_MODE')))) && (!isBooleanConstantAndTrue('mxchange_installing')) && (isBooleanConstantAndTrue('mxchange_installed')) && (isBooleanConstantAndTrue('admin_registered')) && (!isset($_GET['register'])) && ($CSS != 1)) {
 						// Do daily things in external PHP file but only when script is completely setup
 						$INC_POOL[] = PATH."inc/reset/reset_daily.php";