Merged stelzi's patches
authorRoland Häder <roland@mxchange.org>
Tue, 10 Mar 2009 18:28:46 +0000 (18:28 +0000)
committerRoland Häder <roland@mxchange.org>
Tue, 10 Mar 2009 18:28:46 +0000 (18:28 +0000)
inc/functions.php

index a794e2d9e039b40578dbfcf9303da67a7b3490d2..44ba689b58698b62acb3820db3fe324c990c9053 100644 (file)
@@ -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__."(<font color=\"#0000aa\">".__LINE__."</font>):FQFN={$FQFN}<br />\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");