]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/newsletter_functions.php
Security line in all includes changed
[mailer.git] / inc / libs / newsletter_functions.php
index aa75f75f36dbe65949030e3950a160160005344c..2a1553a3fc2a92f394f750f391e6824607004f4a 100644 (file)
  ************************************************************************/
 
 // Some security stuff...
-if (ereg(basename(__FILE__), $_SERVER['PHP_SELF']))
-{
+if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
 }
+
 //
 function NL_ADD_VALID_TAGS()
 {
@@ -167,15 +167,15 @@ function SEND_NEWSLETTER($TO, $SUBJECT, $MSG, $MODE)
                // Automatically insert URLs into newsletter
                if ((EXT_IS_ACTIVE("html")) && ($MODE == "html")) {
                        // Send HTML mail
-                       SEND_EMAIL($TO, $SUBJECT, HTML_INSERT_URLS($MSG), "Y");
+                       SEND_EMAIL($TO, $SUBJECT, HTML_INSERT_URLS($MSG), 'Y');
                } else {
                        // Send normal mail
-                       SEND_EMAIL($TO, $SUBJECT, NL_INSERT_URLS($MSG), "N");
+                       SEND_EMAIL($TO, $SUBJECT, NL_INSERT_URLS($MSG), 'N');
                }
        } else {
                // Regular send-out
                if ((EXT_IS_ACTIVE("html")) && ($MODE == "html")) {
-                       SEND_EMAIL($TO, $SUBJECT, $MSG, "Y");
+                       SEND_EMAIL($TO, $SUBJECT, $MSG, 'Y');
                } else {
                        SEND_EMAIL($TO, $SUBJECT, $MSG);
                }