cvs: phpdoc /scripts genPHP_INI_ENTRY.php
| From: | Philip Olson | Date: | Tue, 29 Apr 2003 09:22:36 +0000 |
| Subject: | cvs: phpdoc /scripts genPHP_INI_ENTRY.php | ||
| Groups: | php.doc | ||
| Request: | Send a blank email to phpdoc+get-969352950@lists.php.net to get a copy of this message | ||
philip Tue Apr 29 05:22:36 2003 EDT
Modified files:
/phpdoc/scripts genPHP_INI_ENTRY.php
Log:
Implement creation of a master list.
Index: phpdoc/scripts/genPHP_INI_ENTRY.php
diff -u phpdoc/scripts/genPHP_INI_ENTRY.php:1.4 phpdoc/scripts/genPHP_INI_ENTRY.php:1.5
--- phpdoc/scripts/genPHP_INI_ENTRY.php:1.4 Tue Apr 29 02:37:32 2003
+++ phpdoc/scripts/genPHP_INI_ENTRY.php Tue Apr 29 05:22:36 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.4 2003/04/29 06:37:32 philip Exp $
+ * $Id: genPHP_INI_ENTRY.php,v 1.5 2003/04/29 09:22:36 philip Exp $
*/
// figure out the php4 source dir
@@ -35,13 +35,15 @@
}
}
+$master_ini_table = '';
+
echo "Using:\nPHP4 SRC DIR: $phpsrc_dir\nPHPDOC DIR: $phpdoc_dir\n\n";
$inixml_header = <<<INIXML_HEADER
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Automatically generated using gen_PHP_INI_ENTRY.php -->
<!-- DO NOT EDIT. -->
-<!-- \$Revision: 1.4 $ -->
+<!-- \$Revision: 1.5 $ -->
<section id="##ID##.configuration">
&reftitle.runtime;
&extension.runtime;\n\n
@@ -223,6 +225,8 @@
*/
function createINI($dir, $cfgs) {
+ global $master_ini_table;
+
$rows = '';
foreach ($cfgs as $name=>$vals) {
$rows .= " <row>\n";
@@ -252,6 +256,8 @@
$rows .= "
<entry><constant>{$vals['mod']}</constant></entry>\n";
$rows .= " </row>\n";
}
+ $master_ini_table .= $rows;
+
if ($dir == 'en/chapters') {
$id = 'general';
} else {
@@ -272,6 +278,20 @@
}
}
+function createMasterINI ($dir, $rows) {
+ $fp = fopen("{$GLOBALS['phpdoc_dir']}/{$dir}/config.master_test.xml",
'w');
+ $out = str_replace('##ID##','master', $GLOBALS['inixml_header']);
+ $out .= $GLOBALS['legend'];
+ $out .= $GLOBALS['table_header'].$rows.$GLOBALS['table_footer'];
+ $out .= $GLOBALS['inixml_footer'];
+ if (is_resource($fp)) {
+ fwrite($fp, $out);
+ fflush($fp);
+ fclose($fp);
+ echo "CREATED {$GLOBALS['phpdoc_dir']}/{$dir}/config.master_test.xml\n";
+ }
+}
+
// flatten tree
$flat = flatentree($dtree, 'INI');
print_r($flat);
@@ -409,5 +429,7 @@
createINI($dir, $cfgs);
}
}
+
+createMasterINI('en/chapters', $master_ini_table);
?>