betz            Thu Sep 15 04:16:46 2005 EDT

  Modified files:              
    /phpdoc/scripts     missing-entities.php.in 
  Log:
  support for xreflabel, avoids warnings like xref on para not supported
  missing-ids.xml is back iin entities/ (see rev 1.17)
  
  
http://cvs.php.net/diff.php/phpdoc/scripts/missing-entities.php.in?r1=1.19&r2=1.20&ty=u
Index: phpdoc/scripts/missing-entities.php.in
diff -u phpdoc/scripts/missing-entities.php.in:1.19 
phpdoc/scripts/missing-entities.php.in:1.20
--- phpdoc/scripts/missing-entities.php.in:1.19 Sun Aug 21 12:27:08 2005
+++ phpdoc/scripts/missing-entities.php.in      Thu Sep 15 04:16:45 2005
@@ -17,7 +17,7 @@
   |             Gabor Hojtsy <[EMAIL PROTECTED]>                              |
   +----------------------------------------------------------------------+
   
-  $Id: missing-entities.php.in,v 1.19 2005/08/21 16:27:08 goba Exp $
+  $Id: missing-entities.php.in,v 1.20 2005/09/15 08:16:45 betz Exp $
 */
 
 set_time_limit(0);
@@ -93,7 +93,9 @@
     
     // missing ID found
     else if (strpos($line, "non-existent") !== FALSE) {
-        $missing_ids[] = preg_replace("!^.* ID !", " <para id=", $line) . 
"></para>\n";
+         preg_match('!(?<=ID.)".+"!', $line, $id);
+        $missing_ids[] = "<para id=" . $id[0] . " xreflabel=" .  $id[0]  . 
"></para>\n";
+        $missing_ids_display[] = "id=" .  $id[0] . "\n";
     }
 }
 
@@ -105,6 +107,10 @@
 sort($missing_ids);
 sort($missing_entities);
 
+// missing ids for display
+$missing_ids_display=array_unique($missing_ids_display);
+sort($missing_ids_display);
+
 // Write out missing entities to file
 foreach ($missing_entities as $ent) {
     fwrite($ment, $ent);
@@ -136,9 +142,9 @@
     echo "* No missing entities were found\n";
 }
 
-echo "\nCreated file: @LANGDIR@/missing-ids.xml\n";
-if (!empty($missing_ids)) {
-    foreach ($missing_ids as $k => $v) {
+echo "\nCreated file: entities/missing-ids.xml\n";
+if (!empty($missing_ids_display)) {
+    foreach ($missing_ids_display as $k => $v) {
         echo "* " . preg_replace('@[\s]+@', ' ', $v) . "\n";
     }
 } else {

Reply via email to