X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Ffunctions.php;h=af966907f678950999a0501f479ee3d47b96c567;hp=8bfa1eaac3406275edad455e48464c0920bbbd03;hb=d22205247313f4b67db5c9aa3aac07cd9d073bce;hpb=b8c86fa12322603c24a88ea2b0fd3dbeba612752 diff --git a/inc/functions.php b/inc/functions.php index 8bfa1eaac3..af966907f6 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -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)) {