Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:32739 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 10154 invoked by uid 1010); 12 Oct 2007 15:54:54 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 10138 invoked from network); 12 Oct 2007 15:54:54 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Oct 2007 15:54:54 -0000 Authentication-Results: pb1.pair.com header.from=martin@divbyzero.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=martin@divbyzero.net; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain divbyzero.net from 80.237.234.119 cause and error) X-PHP-List-Original-Sender: martin@divbyzero.net X-Host-Fingerprint: 80.237.234.119 mx.bauer-kirch.de Linux 2.4/2.6 Received: from [80.237.234.119] ([80.237.234.119:53710] helo=mx.bauer-kirch.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 90/83-27608-CC89F074 for ; Fri, 12 Oct 2007 11:54:54 -0400 Received: by mx.bauer-kirch.de with ESMTP id 1IgMqg-0007Kv-7a for ; Fri, 12 Oct 2007 17:54:50 +0200 Date: Fri, 12 Oct 2007 17:54:53 +0200 To: internals@lists.php.net Message-ID: <20071012155453.GA18296@trior.divbyzero.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="NzB8fVQJ5HfG6fxh" Content-Disposition: inline User-Agent: Mutt (Cray UniCOS) Subject: Unification of phpinfo() output for PDO drivers From: martin@divbyzero.net (Martin Jansen) --NzB8fVQJ5HfG6fxh Content-Type: text/plain; charset=us-ascii Content-Disposition: inline The attached patch against HEAD attempts to unify the phpinfo() output of the PDO drivers for Oracle, MySQL, and PostgreSQL by always including the PECL module version string and the $Id$ CVS keyword. (Akin to how it is done for the SQLite driver.) Assuming that you are interested in the changes, I can also provide them for the other PDO drivers. - Martin --NzB8fVQJ5HfG6fxh Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="pdo-phpinfo-unification.pach" Index: pdo_mysql/pdo_mysql.c =================================================================== RCS file: /repository/php-src/ext/pdo_mysql/pdo_mysql.c,v retrieving revision 1.17 diff -u -r1.17 pdo_mysql.c --- pdo_mysql/pdo_mysql.c 27 Sep 2007 18:28:41 -0000 1.17 +++ pdo_mysql/pdo_mysql.c 12 Oct 2007 15:49:04 -0000 @@ -30,6 +30,8 @@ #include "php_pdo_mysql.h" #include "php_pdo_mysql_int.h" +#define PHP_PDO_MYSQL_MODULE_VERSION "0.9" + /* {{{ pdo_mysql_functions[] */ const zend_function_entry pdo_mysql_functions[] = { {NULL, NULL, NULL} @@ -60,7 +62,7 @@ NULL, NULL, PHP_MINFO(pdo_mysql), - "0.9", + PHP_PDO_MYSQL_MODULE_VERSION, STANDARD_MODULE_PROPERTIES }; /* }}} */ @@ -102,6 +104,7 @@ { php_info_print_table_start(); php_info_print_table_header(2, "PDO Driver for MySQL 3.x Client Libraries", "enabled"); + php_info_print_table_row(2, "PECL Module version", PHP_PDO_MYSQL_MODULE_VERSION " $Id$"); php_info_print_table_end(); } /* }}} */ Index: pdo_oci/pdo_oci.c =================================================================== RCS file: /repository/php-src/ext/pdo_oci/pdo_oci.c,v retrieving revision 1.10 diff -u -r1.10 pdo_oci.c --- pdo_oci/pdo_oci.c 27 Sep 2007 18:28:41 -0000 1.10 +++ pdo_oci/pdo_oci.c 12 Oct 2007 15:49:04 -0000 @@ -30,6 +30,8 @@ #include "php_pdo_oci.h" #include "php_pdo_oci_int.h" +#define PHP_PDO_OCI_MODULE_VERSION "0.9" + /* {{{ pdo_oci_functions[] */ const zend_function_entry pdo_oci_functions[] = { {NULL, NULL, NULL} @@ -59,7 +61,7 @@ NULL, NULL, PHP_MINFO(pdo_oci), - "0.9", + PHP_PDO_OCI_MODULE_VERSION, STANDARD_MODULE_PROPERTIES }; /* }}} */ @@ -119,6 +121,7 @@ { php_info_print_table_start(); php_info_print_table_header(2, "PDO Driver for OCI 8 and later", "enabled"); + php_info_print_table_row(2, "PECL Module version", PHP_PDO_OCI_MODULE_VERSION " $Id$"); php_info_print_table_end(); } /* }}} */ Index: pdo_pgsql/pdo_pgsql.c =================================================================== RCS file: /repository/php-src/ext/pdo_pgsql/pdo_pgsql.c,v retrieving revision 1.16 diff -u -r1.16 pdo_pgsql.c --- pdo_pgsql/pdo_pgsql.c 27 Sep 2007 18:28:41 -0000 1.16 +++ pdo_pgsql/pdo_pgsql.c 12 Oct 2007 15:49:04 -0000 @@ -30,6 +30,8 @@ #include "php_pdo_pgsql.h" #include "php_pdo_pgsql_int.h" +#define PHP_PDO_PGSQL_MODULE_VERSION "0.9" + #ifdef HAVE_PG_CONFIG_H #undef PACKAGE_BUGREPORT #undef PACKAGE_NAME @@ -70,7 +72,7 @@ PHP_RINIT(pdo_pgsql), PHP_RSHUTDOWN(pdo_pgsql), PHP_MINFO(pdo_pgsql), - "0.9", + PHP_PDO_PGSQL_MODULE_VERSION, STANDARD_MODULE_PROPERTIES }; /* }}} */ @@ -127,8 +129,7 @@ #ifdef HAVE_PG_CONFIG_H php_info_print_table_row(2, "PostgreSQL(libpq) Version", PG_VERSION); #endif - php_info_print_table_row(2, "Module version", pdo_pgsql_module_entry.version); - php_info_print_table_row(2, "Revision", " $Id: pdo_pgsql.c,v 1.16 2007/09/27 18:28:41 dmitry Exp $ "); + php_info_print_table_row(2, "PECL Module version", PHP_PDO_PGSQL_MODULE_VERSION " $Id$"); php_info_print_table_end(); } --NzB8fVQJ5HfG6fxh--