cvs: phpdoc /scripts/iniupdate insert_db.php make_db.php
| From: | Nuno Lopes | Date: | Sun, 16 Sep 2007 19:16:49 +0000 |
| Subject: | cvs: phpdoc /scripts/iniupdate insert_db.php make_db.php | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-27@lists.php.net to get a copy of this message | ||
nlopess Sun Sep 16 19:16:49 2007 UTC
Modified files:
/phpdoc/scripts/iniupdate insert_db.php make_db.php
Log:
start working on pecl releases processing
# dinner time..
http://cvs.php.net/viewvc.cgi/phpdoc/scripts/iniupdate/insert_db.php?r1=1.6&r2=1.7&diff_format=u
Index: phpdoc/scripts/iniupdate/insert_db.php
diff -u phpdoc/scripts/iniupdate/insert_db.php:1.6 phpdoc/scripts/iniupdate/insert_db.php:1.7
--- phpdoc/scripts/iniupdate/insert_db.php:1.6 Wed Sep 5 17:33:19 2007
+++ phpdoc/scripts/iniupdate/insert_db.php Sun Sep 16 19:16:49 2007
@@ -3,7 +3,7 @@
+----------------------------------------------------------------------+
| ini doc settings updater |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2005 The PHP Group |
+ | Copyright (c) 1997-2007 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.0 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -46,6 +46,7 @@
die("Couldn't create the DB: $error");
}
+// process PHP sources
foreach ($tags as $tag) {
$array = array();
recurse("./sources/$tag");
@@ -54,6 +55,23 @@
echo "$tag\n";
}
+// process PECL sources
+foreach (get_pecl_releases_local() as $release) {
+
+ preg_match('/(.+)-(\d+\.\d+(?:\.\d+)?)/S', $release, $m);
+ $pkg = $m[1];
+ $version = $m[2];
+
+ // if it has an entry already, just skip it
+ if (sqlite_single_query($idx, "SELECT COUNT(*) FROM pecl_changelog WHERE
package='".sqlite_escape_string($pkg)."' AND version='$version'")
> 1) {
+ continue;
+ }
+
+ $array = array();
+ recurse("./sources/$release");
+}
+
+
if (!$db_open) {
sqlite_close($idx);
unset($idx);
http://cvs.php.net/viewvc.cgi/phpdoc/scripts/iniupdate/make_db.php?r1=1.6&r2=1.7&diff_format=u
Index: phpdoc/scripts/iniupdate/make_db.php
diff -u phpdoc/scripts/iniupdate/make_db.php:1.6 phpdoc/scripts/iniupdate/make_db.php:1.7
--- phpdoc/scripts/iniupdate/make_db.php:1.6 Thu Sep 6 19:40:19 2007
+++ phpdoc/scripts/iniupdate/make_db.php Sun Sep 16 19:16:49 2007
@@ -3,7 +3,7 @@
+----------------------------------------------------------------------+
| ini doc settings updater |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2005 The PHP Group |
+ | Copyright (c) 1997-2007 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.0 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -31,8 +31,13 @@
name TEXT,
value TEXT
);
+';
-CREATE TABLE changelog (
+// the query may fail if the table already exists
+@sqlite_query($idx, $sql);
+
+
+$sql = 'CREATE TABLE changelog (
name TEXT PRIMARY KEY,';
foreach($tags as $tag) {