hholzgra Fri Sep 20 07:16:23 2002 EDT
Modified files:
/functable dslgen xslgen
Log:
use config.php, foreach instead of reset/each ...
Index: functable/dslgen
diff -u functable/dslgen:1.8 functable/dslgen:1.9
--- functable/dslgen:1.8 Fri Sep 20 04:57:41 2002
+++ functable/dslgen Fri Sep 20 07:16:23 2002
@@ -1,6 +1,7 @@
#!/usr/local/bin/php
<?
-set_time_limit(0);
+
+include "config.php";
$min3 = array();
$max3 = array();
@@ -9,13 +10,12 @@
$func = array();
$ver = array();
-$db = mysql_connect("localhost","phpdoc","phpdoc");
-if(! $db) { echo "kein DB-Server\n"; exit; }
-if(! mysql_select_db("phpdoc")) { echo "keine DB\n";exit;}
+$db = mysql_connect($dbhost, $dbuser, $dbpass);
+if(! $db) { echo mysql_error(); exit; }
+if(! mysql_select_db($dbname)) { echo mysq_error(); exit;}
$result = mysql_query("select distinct version,versionid from funclist");
if(!$result) { echo mysql_error(); exit; }
-if(!$result) { echo mysql_error(); exit; }
while ($row=mysql_fetch_array($result)) {
$ver[$row["versionid"]]=str_replace("_",".",str_replace("php_","",$row["version"]));
}
@@ -124,8 +124,7 @@
echo ' ((equal-ci? (data nl) "print") (literal "PHP 3, PHP 4 "))';
echo ' ((equal-ci? (data nl) "unset") (literal "PHP 3, PHP 4 "))';
-reset($func);
-while(list($key,)=each($func)) {
+foreach($func as $key => $dummy) {
if(isset($min3[$key])) {
$min = $min3[$key]-300;
$max = $max3[$key]-300;
Index: functable/xslgen
diff -u functable/xslgen:1.5 functable/xslgen:1.6
--- functable/xslgen:1.5 Fri Sep 20 04:57:41 2002
+++ functable/xslgen Fri Sep 20 07:16:23 2002
@@ -1,6 +1,6 @@
#!/usr/local/bin/php -q
<?
-set_time_limit(0);
+include "config.php";
$min3 = array();
$max3 = array();
@@ -9,13 +9,12 @@
$func = array();
$ver = array();
-$db = mysql_connect("localhost","phpdoc","phpdoc");
-if(! $db) { echo "kein DB-Server\n"; exit; }
-if(! mysql_select_db("phpdoc")) { echo "keine DB\n";exit;}
+$db = mysql_connect($dbhost, $dbuser, $dbpass);
+if(! $db) { echo mysql_error(); exit; }
+if(! mysql_select_db($dbname)) { echo mysq_error(); exit;}
$result = mysql_query("select distinct version,versionid from funclist");
if(!$result) { echo mysql_error(); exit; }
-if(!$result) { echo mysql_error(); exit; }
while ($row=mysql_fetch_array($result)) {
$ver[$row["versionid"]]=str_replace("_",".",str_replace("php_","",$row["version"]));
}
@@ -57,19 +56,18 @@
echo "<versions>\n";
echo "
- <function name="array" from="PHP 3, PHP 4 "/>
- <function name="echo" from="PHP 3, PHP 4 "/>
- <function name="empty" from="PHP 3, PHP 4 "/>
- <function name="eval" from="PHP 3, PHP 4 "/>
- <function name="exit" from="PHP 3, PHP 4 "/>
- <function name="isset" from="PHP 3, PHP 4 "/>
- <function name="list" from="PHP 3, PHP 4 "/>
- <function name="print" from="PHP 3, PHP 4 "/>
- <function name="unset" from="PHP 3, PHP 4 "/>
+ <function name='array' from='PHP 3, PHP 4 '/>
+ <function name='echo' from='PHP 3, PHP 4 '/>
+ <function name='empty' from='PHP 3, PHP 4 '/>
+ <function name='eval' from='PHP 3, PHP 4 '/>
+ <function name='exit' from='PHP 3, PHP 4 '/>
+ <function name='isset' from='PHP 3, PHP 4 '/>
+ <function name='list' from='PHP 3, PHP 4 '/>
+ <function name='print' from='PHP 3, PHP 4 '/>
+ <function name='unset' from='PHP 3, PHP 4 '/>
";
-reset($func);
-while(list($key,)=each($func)) {
+foreach($func as $key => $dummy) {
if(isset($min3[$key])) {
$min = $min3[$key]-300;
$max = $max3[$key]-300;
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php