From: Roland Häder Date: Tue, 10 Mar 2009 18:28:46 +0000 (+0000) Subject: Merged stelzi's patches X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=92109450ab35c61ef70767cf65502af5a279dc8b;p=mailer.git Merged stelzi's patches --- diff --git a/inc/functions.php b/inc/functions.php index a794e2d9e0..44ba689b58 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -2521,7 +2521,8 @@ function searchDirsRecursive ($dir, &$last_changed) { $FQFN = str_replace("//", "/", constant('PATH') . $dir. "/". $d); // Does it match what we are looking for? (We skip a lot files already!) - if (!preg_match('@(\.|\.\.|\.revision|\.svn|debug\.log|\.cache)$@', $d)) { // no . or .. or .revision or .svn in the filename + if (!preg_match('@(\.|\.\.|\.revision|\.svn|debug\.log|\.cache|config\.php)$@', $d)) { // no ., .., .revision, .svn, debug.log or .cache in the filename + // Is it a file and readable? //* DEBUG: */ print __FUNCTION__."(".__LINE__."):FQFN={$FQFN}
\n"; if (isDirectory($FQFN)) { @@ -2649,8 +2650,14 @@ function getAkt_vers () { if (isset($t[2])) $akt_vers[$search] = trim($t[2]); } // END - foreach + // Save the last-changed filename for debugging + $akt_vers['File'] = $last_changed['path_name']; + // at least 3 keyword-Tags are needed for propper values - if ($res && $res >= 3) { + if ($res && $res >= 3 + && isset($akt_vers['Revision']) && $akt_vers['Revision'] != '' + && isset($akt_vers['Date']) && $akt_vers['Date'] != '' + && isset($akt_vers['Tag']) && $akt_vers['Tag'] != '') { // Prepare content witch need special treadment // Prepare timestamp for date @@ -2661,6 +2668,7 @@ function getAkt_vers () { if ((isset($akt_vers['Author'])) && ($akt_vers['Author'] != "quix0r")) { $akt_vers['Tag'] .= '-'.strtoupper($akt_vers['Author']); } // END - if + } else { // No valid Data from the last modificated file so read the Revision from the Server. Fallback-solution!! Should not be removed I think. $version = GET_URL("check-updates3.php");