X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Ffunctions.php;h=38612873b25b6a9be882b1929a991055823ea0c6;hp=591a56c702a432cd908f76714cba97d5b76506a2;hb=deb4293fa309b70be72d66b394e7253c8ea7d351;hpb=e6c2226d9fce4452118cf6fe68bab72e6623cc2e
diff --git a/inc/functions.php b/inc/functions.php
index 591a56c702..38612873b2 100644
--- a/inc/functions.php
+++ b/inc/functions.php
@@ -2392,13 +2392,13 @@ function merge_array ($array1, $array2) {
}
// Both are not arrays
- debug_report_bug(__FUNCTION__.":");
+ debug_report_bug(__FUNCTION__.": No arrays provided!");
}
// Debug message logger
function DEBUG_LOG ($file, $line, $message, $force=true) {
// Is debug mode enabled?
- if ((isBooleanConstantAndTrue('DEBUG_MODE')) || ($force)) {
+ if ((isBooleanConstantAndTrue('DEBUG_MODE')) || ($force === true)) {
// Log this message away
$fp = fopen(PATH."inc/cache/debug.log", 'a') or mxchange_die("Cannot write logfile debug.log!");
fwrite($fp, date("d.m.Y|H:i:s", time())."|".basename($file)."|".$line."|".strip_tags($message)."\n");
@@ -2628,7 +2628,7 @@ function REBUILD_CACHE ($cache, $inc="") {
$INC = sprintf("inc/loader/load_cache-%s.php", $inc);
// Is the include there?
- if (FILE_READABLE($INC)) {
+ if (INCLUDE_READABLE($INC)) {
// And rebuild it from scratch
//* DEBUG: */ print __FUNCTION__."(".__LINE__."): inc={$inc} - LOADED!
\n";
LOAD_INC($INC);
@@ -2672,7 +2672,7 @@ function TRANSLATE_POOL_TYPE ($type) {
// Does it exist?
if (defined($constName)) {
// Then use it
- $translated = constant($constName);
+ $translated = getMessage($constName);
} // END - if
// Return "translation"
@@ -3241,7 +3241,7 @@ function convertCodeToMessage ($code) {
case constant('CODE_COOKIES_DISABLED') : $msg = getMessage('LOGIN_NO_COOKIES'); break;
case constant('CODE_BEG_SAME_AS_OWN') : $msg = getMessage('BEG_SAME_UID_AS_OWN'); break;
case constant('CODE_LOGIN_FAILED') : $msg = getMessage('LOGIN_FAILED_GENERAL'); break;
- default : $msg = UNKNOWN_MAILID_CODE_1.$code.UNKNOWN_MAILID_CODE_2; break;
+ default : $msg = sprintf(getMessage('UNKNOWN_MAILID_CODE'), $code); break;
} // END - switch
// Return the message
@@ -3286,6 +3286,15 @@ function GENERATE_AID_LINK ($aid) {
return $admin;
}
+// Checks wether an include file (non-FQFN better) is readable
+function INCLUDE_READABLE ($INC) {
+ // Construct FQFN
+ $FQFN = constant('PATH') . $INC;
+
+ // Is it readable?
+ return FILE_READABLE($FQFN);
+}
+
//////////////////////////////////////////////////
// AUTOMATICALLY RE-GENERATED MISSING FUNCTIONS //
//////////////////////////////////////////////////