vrana           Fri Sep 10 09:32:36 2004 EDT

  Modified files:              
    /phpdoc/scripts     xml_proto.php 
  Log:
  Use role=reference instead of &
  
http://cvs.php.net/diff.php/phpdoc/scripts/xml_proto.php?r1=1.15&r2=1.16&ty=u
Index: phpdoc/scripts/xml_proto.php
diff -u phpdoc/scripts/xml_proto.php:1.15 phpdoc/scripts/xml_proto.php:1.16
--- phpdoc/scripts/xml_proto.php:1.15   Wed Aug  4 04:50:15 2004
+++ phpdoc/scripts/xml_proto.php        Fri Sep 10 09:32:35 2004
@@ -16,7 +16,7 @@
   | Authors:   Brad House <[EMAIL PROTECTED]>                             |
   +----------------------------------------------------------------------+
  
-  $Id: xml_proto.php,v 1.15 2004/08/04 08:50:15 vrana Exp $
+  $Id: xml_proto.php,v 1.16 2004/09/10 13:32:35 vrana Exp $
 */
 
 /*
@@ -226,14 +226,14 @@
 
     for ($j=0; $j<$funclist[$i]["num_args"]; $j++) {
       $argtype = $funclist[$i]["args"][$j]["type"];
-      $argname = str_replace('&', '&amp;', $funclist[$i]["args"][$j]["variable"]);
+      $argname = $funclist[$i]["args"][$j]["variable"];
+      $isref = (strpos($argname, '&') === 0);
+      if ($isref) {
+        $argname = substr($argname, 1);
+      }
       $isopt=$funclist[$i]["args"][$j]["isopt"];
-      if (!$isopt) {
-        fwrite($fp, "     
<methodparam><type>$argtype</type><parameter>$argname</parameter></methodparam>\n");
-      } else {
-        fwrite($fp, "     <methodparam 
choice=\"opt\"><type>$argtype</type><parameter>$argname</parameter></methodparam>\n");
+      fwrite($fp, "     <methodparam" . ($isopt ? " choice=\"opt\"" : "") . 
"><type>$argtype</type><parameter" . ($isref ? " role=\"reference\"" : "") . 
">$argname</parameter></methodparam>\n");
 
-      }
     }
     if ($funclist[$i]["num_args"] == 0){
       fwrite($fp, "     <void/>\n");
@@ -788,7 +788,7 @@
          maybe --enable-{ext} OR a directory path is required or optional
       d) If you're writing over files in CVS, be 100% sure to check unified
          diffs before commit!
-      e) Run script check-references.php and add &amp; where required.
+      e) Run script check-references.php and add role="reference" where required.
       f) Report problems to [EMAIL PROTECTED]
 NOTES;
 ?>

Reply via email to