From 1d6211aa6e979663f2235c6f94b5aae09754c915 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Mon, 25 Jun 2012 23:02:44 +0000 Subject: [PATCH] getArrayFromDirectory() does now exclude files with size below 50 Bytes which always indicates that the file is deprecated --- inc/functions.php | 3 +++ inc/inc-functions.php | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/inc/functions.php b/inc/functions.php index 90f2b6d378..be6123f558 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -1872,6 +1872,9 @@ function getArrayFromDirectory ($baseDir, $prefix, $fileIncludeDirs = false, $ad } elseif (!isFileReadable($FQFN)) { // Not readable so skip it //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'File ' . $FQFN . ' is not readable!'); + } elseif (filesize($FQFN) < 50) { + // Might be deprecated + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'File ' . $FQFN . ' is to small (' . filesize($FQFN) . ')!'); continue; } diff --git a/inc/inc-functions.php b/inc/inc-functions.php index ece36ddfa9..8d3a036efe 100644 --- a/inc/inc-functions.php +++ b/inc/inc-functions.php @@ -121,7 +121,7 @@ function loadInclude ($inc) { // Is the include file there? if (!isIncludeReadable($inc)) { // Not there so log it - debug_report_bug(__FUNCTION__, __LINE__, sprintf("Include file %s not found.", $inc)); + debug_report_bug(__FUNCTION__, __LINE__, sprintf("Include file %s not found or deprecated.", $inc)); } // END - if } // END - if -- 2.39.2