De-referer now no longer de-refers own links, no more entities in text-only emails
authorRoland Häder <roland@mxchange.org>
Sat, 4 Oct 2008 14:19:17 +0000 (14:19 +0000)
committerRoland Häder <roland@mxchange.org>
Sat, 4 Oct 2008 14:19:17 +0000 (14:19 +0000)
inc/databases.php
inc/functions.php

index 036d840..67ad3e7 100644 (file)
@@ -113,7 +113,7 @@ define('USAGE_BASE', "usage");
 define('SERVER_URL', "http://www.mxchange.org");
 
 // This current patch level
-define('CURR_SVN_REVISION', "448");
+define('CURR_SVN_REVISION', "449");
 
 // Take a prime number which is long (if you know a longer one please try it out!)
 define('_PRIME', 591623);
index d356add..b6b212f 100644 (file)
@@ -474,7 +474,7 @@ function SEND_RAW_EMAIL ($to, $subject, $msg, $from) {
                        $mail->WordWrap   = 70;
                        $mail->IsHTML(true);
                } else {
-                       $mail->Body       = $msg;
+                       $mail->Body       = html_entity_decode($msg);
                }
                $mail->AddAddress($to, "");
                $mail->AddReplyTo(WEBMASTER,MAIN_TITLE);
@@ -483,7 +483,7 @@ function SEND_RAW_EMAIL ($to, $subject, $msg, $from) {
                $mail->Send();
        } else {
                // Use legacy mail() command
-               @mail($to, $subject, $msg, $from);
+               @mail($to, $subject, html_entity_decode($msg), $from);
        }
 }
 //
@@ -591,7 +591,13 @@ function TRANSLATE_COMMA ($dotted, $cut=true) {
 
 //
 function DEREFERER ($URL) {
-       $URL = URL."/modules.php?module=loader&amp;url=".urlencode(base64_encode(gzcompress($URL)));
+       // Don't de-refer our own links!
+       if (substr($URL, 0, strlen(URL)) != URL) {
+               // De-refer this link
+               $URL = URL."/modules.php?module=loader&amp;url=".urlencode(base64_encode(gzcompress($URL)));
+       } // END - if
+
+       // Return link
        return $URL;
 }