]> git.mxchange.org Git - mailer.git/blobdiff - inc/functions.php
__ACL_ALLOW rewritten to and @TODO finished
[mailer.git] / inc / functions.php
index 8bfa1eaac3406275edad455e48464c0920bbbd03..af966907f678950999a0501f479ee3d47b96c567 100644 (file)
@@ -1221,12 +1221,12 @@ function ADD_SELECTION ($type, $DEFAULT, $prefix="", $id="0") {
 }
 
 //
-function TRANSLATE_YESNO($yn) {
+function TRANSLATE_YESNO ($yn) {
        // Default
-       $yn = "??? (".$yn.")";
+       $translated = "??? (".$yn.")";
        switch ($yn) {
-               case "Y": $yn = getMessage('YES'); break;
-               case "N": $yn = getMessage('NO'); break;
+               case "Y": $translated = getMessage('YES'); break;
+               case "N": $translated = getMessage('NO'); break;
                default:
                        // Log unknown value
                        DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Unknown value %s. Expected Y/N!", $yn));
@@ -1234,7 +1234,7 @@ function TRANSLATE_YESNO($yn) {
        }
 
        // Return it
-       return $yn;
+       return $translated;
 }
 
 //
@@ -2575,19 +2575,8 @@ function getActualVersion ($type = 0) {
 
 // Loads an include file and logs any missing files for debug purposes
 function LOAD_INC ($INC) {
-       // Get constant path
-       $PATH = constant('PATH');
-
-       // Use the include file name directly
-       // @TODO Try to find all locations where an FQFN is given to these two
-       // @TODO functions and avoid it.
-       $FQFN = $INC;
-
-       // Check if PATH is in $INC
-       if (substr($INC, 0, $PATH) != $PATH) {
-               // Add it. This is why we need a trailing slash in config.php
-               $FQFN = $PATH . $INC;
-       } // END - if
+       // Add the path. This is why we need a trailing slash in config.php
+       $FQFN = constant('PATH') . $INC;
 
        // Is the include file there?
        if (!FILE_READABLE($FQFN)) {