Re: cvs: php4 /ext/dba dba.c
| From: | Andi Gutmans | Date: | Fri, 01 Dec 2000 09:29:48 +0000 |
| Subject: | Re: cvs: php4 /ext/dba dba.c | ||
| References: | 1 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-2837@lists.php.net to get a copy of this message | ||
Try the following and commit if it's OK.
static PHP_MINFO_FUNCTION(dba)
{
dba_handler *hptr;
static char handlers[80];
handlers[0] = '\0';
for(hptr = handler; hptr->name; hptr++) {
strlcat(handlers, hptr->name, sizeof(handlers));
}
php_info_print_table_start();
php_info_print_table_row(2, "DBA support", "enabled");
php_info_print_table_row(2, "Supported handlers", handlers);
php_info_print_table_end();
}
Andi
At 01:25 AM 12/1/00 +0000, Jani Taskinen wrote:
--- Andi Gutmans <andi@zend.com> http://www.zend.com/sniper Thu Nov 30 17:25:37 2000 EDTModified files:/php4/ext/dba dba.cLog: Beautifying of phpinfo(). Index: php4/ext/dba/dba.c diff -u php4/ext/dba/dba.c:1.26 php4/ext/dba/dba.c:1.27--- php4/ext/dba/dba.c:1.26 Wed Nov 22 13:47:15 2000+++ php4/ext/dba/dba.c Thu Nov 30 17:25:36 2000 @@ -27,7 +27,7 @@+----------------------------------------------------------------------+*/ -/* $Id: dba.c,v 1.26 2000/11/22 21:47:15 sas Exp $ */ +/* $Id: dba.c,v 1.27 2000/12/01 01:25:36 sniper Exp $ */ #include "php.h" @@ -206,19 +206,23 @@return SUCCESS;} + static PHP_MINFO_FUNCTION(dba) {- /* could be prettier (cmv) */ dba_handler *hptr;-- php_info_print_box_start(0); - PUTS("V1 ($Id: dba.c,v 1.26 2000/11/22 21:47:15 sas Exp $)"); + static char handlers[80], tmp[5];+for(hptr = handler; hptr->name; hptr++) { - PUTS(" "); - PUTS(hptr->name); - } - php_info_print_box_end(); + sprintf(tmp, "%s ", hptr->name); + strcat(handlers, tmp); + }++ php_info_print_table_start(); + php_info_print_table_row(2, "DBA support", "enabled"); + php_info_print_table_row(2, "Supported handlers", handlers); + php_info_print_table_end();} + static void php_dba_update(INTERNAL_FUNCTION_PARAMETERS, int mode) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-cvs-unsubscribe@lists.php.net For additional commands, e-mail: php-cvs-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net