svn: /web/doc-editor/trunk/php/ File.php

[email protected] (Yannick Torres)
Newsgroups php.doc.web
Message-ID <[email protected]>
yannick                                  Fri, 01 Jan 2010 23:49:11 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=292908

Log:
Fix revcheck regex to match n/a

Changed paths:
    U   web/doc-editor/trunk/php/File.php

Modified: web/doc-editor/trunk/php/File.php
===================================================================
--- web/doc-editor/trunk/php/File.php	2010-01-01 22:45:56 UTC (rev 292907)
+++ web/doc-editor/trunk/php/File.php	2010-01-01 23:49:11 UTC (rev 292908)
@@ -231,11 +231,11 @@

         // Rev tag
         $match = array();
-        preg_match('/<!--\s*EN-Revision:\s*(\d+)\s*Maintainer:\s*(\\S*)\s*Status:\s*(.+)\s*-->/U', $content, $match);
+        preg_match('/<!--\s*EN-Revision:\s*((\d+)|(n\/a))\s*Maintainer:\s*(\\S*)\s*Status:\s*(.+)\s*-->/U', $content, $match);
         if (!empty($match)) {
-            $info['en-rev']     = $match[1];
-            $info['maintainer'] = $match[2];
-            $info['status']     = $match[3];
+            $info['en-rev']     = ($match[1] == 'n/a') ? 0 : $match[1];
+            $info['maintainer'] = $match[4];
+            $info['status']     = $match[5];
         }

         // Reviewed tag
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.