All, except security block, include()/require() rewritten to own LOAD_INC()/LOAD_INC_...
[mailer.git] / js.php
diff --git a/js.php b/js.php
index 0ced4dccaf11e6bda308c25d8683d0c20a7b768a..d5598fb1a7e404a4cfe4ee462b0872e09451c513 100644 (file)
--- a/js.php
+++ b/js.php
@@ -51,7 +51,7 @@ $GLOBALS['what'] = ""; $GLOBALS['action'] = "";
 $CSS = "1"; $GLOBALS['module'] = "js";
 
 // Load the required file(s)
-require("inc/config.php");
+require_once("inc/config.php");
 
 // Is this script installed and a JavaScript tag is provied?
 if ((isBooleanConstantAndTrue('mxchange_installed')) && (isset($_GET['tag']))) {
@@ -59,22 +59,21 @@ if ((isBooleanConstantAndTrue('mxchange_installed')) && (isset($_GET['tag']))) {
        @header("Content-type: text/javascript");
 
        // Load header
-       require_once(PATH."inc/header.php");
+       LOAD_INC_ONCE("inc/header.php");
 
        // Prepare include file for looking
-       $fqfn = sprintf("%sinc/js/tag-%s.php",
-               PATH,
+       $INC = sprintf("inc/js/tag-%s.php",
                SQL_ESCAPE($_GET['tag'])
        );
 
        // Is that file readable?
-       if (FILE_READABLE($fqfn)) {
+       if (FILE_READABLE($INC)) {
                // Include it
-               require_once($fqfn);
+               LOAD_INC_ONCE($INC);
        } // END - if 
 
        // Load footer
-       require_once(PATH."inc/footer.php");
+       LOAD_INC_ONCE("inc/footer.php");
 } // END - if
 
 //