From: Roland Häder Date: Fri, 20 Feb 2009 15:17:26 +0000 (+0000) Subject: A lot more constants rewritten, deprecated variables with same constant name removed X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=af6e060e984815f5458ad3e9cd032de5c4e2843f;p=mailer.git A lot more constants rewritten, deprecated variables with same constant name removed --- diff --git a/inc/functions.php b/inc/functions.php index 32abd70af7..2fc50d3c0b 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -459,7 +459,7 @@ Message : ".$MSG." SEND_RAW_EMAIL($TO, $SUBJECT, $MSG, $FROM); } elseif ($HTML == "N") { // Problem found! - SEND_RAW_EMAIL(WEBMASTER, "[PROBLEM:]".$SUBJECT, $MSG, $FROM); + SEND_RAW_EMAIL(constant('WEBMASTER'), "[PROBLEM:]".$SUBJECT, $MSG, $FROM); } } @@ -485,16 +485,16 @@ function SEND_RAW_EMAIL ($to, $subject, $msg, $from) { $mail->IsSMTP(); $mail->SMTPAuth = true; - $mail->Host = SMTP_HOSTNAME; + $mail->Host = constant('SMTP_HOSTNAME'); $mail->Port = 25; - $mail->Username = SMTP_USER; - $mail->Password = SMTP_PASSWORD; + $mail->Username = constant('SMTP_USER'); + $mail->Password = constant('SMTP_PASSWORD'); if (empty($from)) { $mail->From = constant('WEBMASTER'); } else { $mail->From = $from; } - $mail->FromName = MAIN_TITLE; + $mail->FromName = constant('MAIN_TITLE'); $mail->Subject = $subject; if ((EXT_IS_ACTIVE("html_mail")) && (strip_tags($msg) != $msg)) { $mail->Body = $msg; @@ -505,9 +505,9 @@ function SEND_RAW_EMAIL ($to, $subject, $msg, $from) { $mail->Body = html_entity_decode($msg); } $mail->AddAddress($to, ""); - $mail->AddReplyTo(WEBMASTER,MAIN_TITLE); - $mail->AddCustomHeader("Errors-To:".WEBMASTER); - $mail->AddCustomHeader("X-Loop:".WEBMASTER); + $mail->AddReplyTo(constant('WEBMASTER'), constant('MAIN_TITLE')); + $mail->AddCustomHeader("Errors-To:".constant('WEBMASTER')); + $mail->AddCustomHeader("X-Loop:".constant('WEBMASTER')); $mail->Send(); } else { // Use legacy mail() command @@ -751,15 +751,12 @@ function LOAD_EMAIL_TEMPLATE($template, $content=array(), $UID="0") { // Default "nickname" if extension is not installed $nick = "---"; - // Keept for backward-compatiblity (please replace these variables against our new {!CONST!} syntax!) - // No longer used: $MAIN_TITLE = MAIN_TITLE; $URL = constant('URL'); $WEBMASTER = constant('WEBMASTER'); - // Prepare IP number and User Agent $REMOTE_ADDR = GET_REMOTE_ADDR(); $HTTP_USER_AGENT = GET_USER_AGENT(); // Default admin - $ADMIN = MAIN_TITLE; + $ADMIN = constant('MAIN_TITLE'); // Is the admin logged in? if (IS_ADMIN()) { diff --git a/inc/header.php b/inc/header.php index b04464c288..5d32484a7a 100644 --- a/inc/header.php +++ b/inc/header.php @@ -62,7 +62,7 @@ if (($header != "1") && ($header != "2")) { } // END - if // Add main title - $TITLE .= MAIN_TITLE; + $TITLE .= constant('MAIN_TITLE'); // Add title of module? (middle decoration will also be added!) if ((getConfig('enable_mod_title') == "Y") || ((empty($GLOBALS['what'])) && (empty($GLOBALS['action']))) || ($GLOBALS['module'] == "admin")) $TITLE .= " ".trim(getConfig('title_middle'))." ".ADD_MODULE_TITLE($GLOBALS['module']); diff --git a/inc/modules/guest/what-register.php b/inc/modules/guest/what-register.php index 07be03e56d..7cf8158ed9 100644 --- a/inc/modules/guest/what-register.php +++ b/inc/modules/guest/what-register.php @@ -300,7 +300,7 @@ VALUES ('%s','%s','%s','%s','%s',%s,'%s','%s',%s, %s,%s,'%s',%s, %s,'%s','UNCONF $gender = TRANSLATE_GENDER($_POST['gender']); // ... rewrite a zero referal ID to the main title - if ($_POST['refid'] == "0") $_POST['refid'] = MAIN_TITLE; + if ($_POST['refid'] == "0") $_POST['refid'] = constant('MAIN_TITLE'); // Is ZIP code set? if (!empty($_POST['zip'])) {