Revert "Remove old CVS-related code"
authorJan Schneider <jan@horde.org>
Thu, 4 Feb 2010 22:34:28 +0000 (23:34 +0100)
committerJan Schneider <jan@horde.org>
Thu, 4 Feb 2010 22:34:28 +0000 (23:34 +0100)
This reverts commit 36b4c8a71fd29949f80d7c1ff6c676d4eb5376ce.

We still are going to need the old parsing, because people are going to update
from release versions from CVS.

framework/Core/lib/Horde/Config.php

index 77365df..7071cfb 100644 (file)
@@ -158,9 +158,14 @@ class Horde_Config
      */
     static public function getVersion($text)
     {
-        return preg_match('/\$Id:\s*[0-9a-f]+\s*\$/', $text, $match)
-            ? $match[0]
-            : false;
+        // @TODO: Old CVS tag
+        if (preg_match('/\$.*?conf\.xml,v .*? .*\$/', $text, $match) ||
+            // New Git tag
+            preg_match('/\$Id:\s*[0-9a-f]+\s*\$/', $text, $match)) {
+            return $match[0];
+        }
+
+        return false;
     }
 
     /**