jmcastagnetto           Sun Jan 19 22:08:27 2003 EDT

  Modified files:              
    /phpdoc/scripts     genPHP_INI_ENTRY.php 
  Log:
  Some logic to output On for 1 and Off for 0
  
  
Index: phpdoc/scripts/genPHP_INI_ENTRY.php
diff -u phpdoc/scripts/genPHP_INI_ENTRY.php:1.1 phpdoc/scripts/genPHP_INI_ENTRY.php:1.2
--- phpdoc/scripts/genPHP_INI_ENTRY.php:1.1     Sun Jan 19 21:56:11 2003
+++ phpdoc/scripts/genPHP_INI_ENTRY.php Sun Jan 19 22:08:27 2003
@@ -4,7 +4,7 @@
  * generate a list of PHP config options and where they
  * can be set.
  * Author: Jesus M. Castagnetto
- * $Id: genPHP_INI_ENTRY.php,v 1.1 2003/01/20 02:56:11 jmcastagnetto Exp $
+ * $Id: genPHP_INI_ENTRY.php,v 1.2 2003/01/20 03:08:27 jmcastagnetto Exp $
  */
 
 // figure out the php4 source dir
@@ -39,7 +39,7 @@
 
 $inixml_header = "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>
 <!-- Do not edit. Automatically generated using gen_PHP_INI_ENTRY.php -->
-<!-- \$Revision: 1.1 $ -->
+<!-- \$Revision: 1.2 $ -->
 <section id=\"##ID##.configuration\">
  &reftitle.runtime;
  &extension.runtime;\n\n";
@@ -218,7 +218,17 @@
                 $default = $vals['def'];
             }
         } else {
-            $default = "'".htmlspecialchars($vals['def'])."'";
+            if (is_numeric($vals['def'])) {
+                if (intval($vals['def']) == 1) {
+                    $default = 'On';
+                } elseif (intval($vals['def']) == 0) {
+                    $default = 'Off';
+                } else {
+                    $default = $vals['def'];
+                }
+            } else {
+                $default = "'".htmlspecialchars($vals['def'])."'";
+            }
         }
         $rows .= "      <entry>{$default}</entry>\n";
         $rows .= "      <entry>{$vals['mod']}</entry>\n";



-- 
PHP Documentation Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to