philip Thu Jun 14 01:51:18 2007 UTC
Modified files:
/phpdoc/scripts extensions.xml.php
Log:
Added additional debugging information
http://cvs.php.net/viewvc.cgi/phpdoc/scripts/extensions.xml.php?r1=1.6&r2=1.7&diff_format=u
Index: phpdoc/scripts/extensions.xml.php
diff -u phpdoc/scripts/extensions.xml.php:1.6
phpdoc/scripts/extensions.xml.php:1.7
--- phpdoc/scripts/extensions.xml.php:1.6 Fri Sep 8 14:15:48 2006
+++ phpdoc/scripts/extensions.xml.php Thu Jun 14 01:51:18 2007
@@ -16,7 +16,7 @@
| Authors: Nuno Lopes <[EMAIL PROTECTED]> |
+----------------------------------------------------------------------+
- $Id: extensions.xml.php,v 1.6 2006/09/08 14:15:48 nlopess Exp $
+ $Id: extensions.xml.php,v 1.7 2007/06/14 01:51:18 philip Exp $
*/
@@ -36,16 +36,20 @@
$Purpose = $Membership = $State = $debug = array();
// read the files and save the tags' info
-foreach ($files as $file) {
+foreach ($files as $filename) {
- $file = file_get_contents($file);
+ $file = file_get_contents($filename);
$miss = array('Purpose'=>1, 'Membership'=>1);
// get the extension's name
preg_match('/<reference\s+id=[\'"]([^\'"]+)[\'"]>/S', $file, $match);
- $ext = $match[1];
-
-
+ if (empty($match[1])) {
+ $debug['unknown-extension'][] = $filename;
+ continue;
+ } else {
+ $ext = $match[1];
+ }
+
if (preg_match_all('/<!--\s*(\w+):\s*([^-]+)-->/S', $file, $matches,
PREG_SET_ORDER)) {
foreach ($matches as $match) {
@@ -196,4 +200,14 @@
print_r($debug['bogus-membership']);
}
+if (isset($debug['unknown-extension'])) {
+ echo "\nExtensions with unknown extension title:\n";
+ print_r($debug['unknown-extension']);
+}
+
+if (empty($debug)) {
+ echo "Success: Check {$basedir}/en/appendices/extensions.xml for
details\n";
+}
+
+
?>