}
// 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");
$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__."(<font color=\"#0000aa\">".__LINE__."</font>): inc={$inc} - LOADED!<br />\n";
LOAD_INC($INC);
// Does it exist?
if (defined($constName)) {
// Then use it
- $translated = constant($constName);
+ $translated = getMessage($constName);
} // END - if
// Return "translation"
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
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 //
//////////////////////////////////////////////////