]> git.mxchange.org Git - mailer.git/commitdiff
A lot more constants rewritten, deprecated variables with same constant name removed
authorRoland Häder <roland@mxchange.org>
Fri, 20 Feb 2009 15:17:26 +0000 (15:17 +0000)
committerRoland Häder <roland@mxchange.org>
Fri, 20 Feb 2009 15:17:26 +0000 (15:17 +0000)
inc/functions.php
inc/header.php
inc/modules/guest/what-register.php

index 32abd70af766c67176f6e56762b871a2a751f634..2fc50d3c0b25cf8714d28db253b4ab2cd953f644 100644 (file)
@@ -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()) {
index b04464c288b41d04cecd8a1d69f84c2685bae5d1..5d32484a7ae6fc39a8d5547c85dbabf69586b327 100644 (file)
@@ -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']);
index 07be03e56d9c709fb446f50ebb890234cc157f21..7cf8158ed9e3f97b5002ebb5e427cbbf22a624ac 100644 (file)
@@ -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'])) {