cvs: /php4/ext/hyperwave hw.c /php4/ext/icap php_icap.c /php4/ext/imap php_imap.c /php4/ext/interbase interbase.c /php4/ext/ldap ldap.c /php4/ext/mcal
php_mcal.c
| From: | Colin Viebrock | Date: | Thu, 06 Apr 2000 16:58:03 +0000 |
| Subject: | cvs: /php4/ext/hyperwave hw.c /php4/ext/icap php_icap.c /php4/ext/imap php_imap.c /php4/ext/interbase interbase.c /php4/ext/ldap ldap.c /php4/ext/mcal php_mcal.c |
||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-13235@lists.php.net to get a copy of this message | ||
cmv Thu Apr 6 09:58:03 2000 EDT
Modified files:
/php4/ext/hyperwave hw.c
/php4/ext/icap php_icap.c
/php4/ext/imap php_imap.c
/php4/ext/interbase interbase.c
/php4/ext/ldap ldap.c
/php4/ext/mcal php_mcal.c
Log:
More phpinfo() prettying.
Can someone check my code for the interbase
support, and I need someone else to decode the LDAP stuff ... it's beyond
me.
Index: php4/ext/hyperwave/hw.c
diff -u php4/ext/hyperwave/hw.c:1.48 php4/ext/hyperwave/hw.c:1.49
--- php4/ext/hyperwave/hw.c:1.48 Tue Apr 4 06:35:06 2000
+++ php4/ext/hyperwave/hw.c Thu Apr 6 09:57:32 2000
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: hw.c,v 1.48 2000/04/04 13:35:06 steinm Exp $ */
+/* $Id: hw.c,v 1.49 2000/04/06 16:57:32 cmv Exp $ */
#if COMPILE_DL
#include "dl/phpdl.h"
#endif
@@ -3664,7 +3664,10 @@
PHP_MINFO_FUNCTION(hw)
{
- php_printf("HG-CSP Version: 7.17<BR>\n");
+ php_info_print_table_start();
+ php_info_print_table_row(2, "Hyperwave Support", "enabled");
+ php_info_print_table_row(2, "HG-CSP Version", "7.17");
+ php_info_print_table_end();
DISPLAY_INI_ENTRIES();
}
Index: php4/ext/icap/php_icap.c
diff -u php4/ext/icap/php_icap.c:1.6 php4/ext/icap/php_icap.c:1.7
--- php4/ext/icap/php_icap.c:1.6 Sat Mar 11 12:57:33 2000
+++ php4/ext/icap/php_icap.c Thu Apr 6 09:57:32 2000
@@ -50,6 +50,7 @@
#include "cal.h"
#include "php_icap.h"
#include "modules.h"
+#include "ext/standard/info.h"
#if (WIN32|WINNT)
#include "winsock.h"
#endif
@@ -127,11 +128,10 @@
PHP_MINFO_FUNCTION(icap)
{
- php_printf("Icap Support enabled<br>");
- php_printf("<table>");
- php_printf("<tr><td>Icap Version:</td>");
- php_printf("<td>%s</td>",CALVER);
- php_printf("</tr></table>");
+ php_info_print_table_start();
+ php_info_print_table_row(2, "ICAP Support", "enabled");
+ php_info_print_table_row(2, "ICAP Version", CALVER);
+ php_info_print_table_end();
}
PHP_MINIT_FUNCTION(icap)
Index: php4/ext/imap/php_imap.c
diff -u php4/ext/imap/php_imap.c:1.6 php4/ext/imap/php_imap.c:1.7
--- php4/ext/imap/php_imap.c:1.6 Tue Apr 4 11:10:24 2000
+++ php4/ext/imap/php_imap.c Thu Apr 6 09:57:32 2000
@@ -22,7 +22,7 @@
| PHP 4.0 updates: Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
-/* $Id: php_imap.c,v 1.6 2000/04/04 18:10:24 chagenbu Exp $ */
+/* $Id: php_imap.c,v 1.7 2000/04/06 16:57:32 cmv Exp $ */
#define IMAP41
@@ -34,6 +34,7 @@
#include "php_ini.h"
#include "php_imap.h"
#include "ext/standard/php_string.h"
+#include "ext/standard/info.h"
ZEND_DECLARE_MODULE_GLOBALS(imap)
@@ -345,15 +346,14 @@
PHP_MINFO_FUNCTION(imap)
{
- php_printf("Imap Support enabled<br>");
- php_printf("<table>");
- php_printf("<tr><td>Imap c-client Version:</td>");
+ php_info_print_table_start();
+ php_info_print_table_row(2, "IMAP Support", "enabled");
#ifdef IMAP41
- php_printf("<td>Imap 4.1</td>");
+ php_info_print_table_row(2, "IMAP c-Client Version", "4.1");
#else
- php_printf("<td>Imap 4.0</td>");
+ php_info_print_table_row(2, "IMAP c-Client Version", "4.0");
#endif
- php_printf("</tr></table>");
+ php_info_print_table_end();
}
Index: php4/ext/interbase/interbase.c
diff -u php4/ext/interbase/interbase.c:1.17 php4/ext/interbase/interbase.c:1.18
--- php4/ext/interbase/interbase.c:1.17 Sun Mar 12 11:44:23 2000
+++ php4/ext/interbase/interbase.c Thu Apr 6 09:57:32 2000
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: interbase.c,v 1.17 2000/03/12 19:44:23 jah Exp $ */
+/* $Id: interbase.c,v 1.18 2000/04/06 16:57:32 cmv Exp $ */
/* TODO: Arrays, roles?
@@ -45,6 +45,7 @@
#include <ibase.h>
#include <time.h>
#include "ext/standard/fsock.h"
+#include "ext/standard/info.h"
/*
#include "php_list.h"
#include "php_string.h"
@@ -510,35 +511,41 @@
PHP_MINFO_FUNCTION(ibase)
{
+
+ char tmp[128];
+ char tmp2[128];
+
IBLS_FETCH();
- php_printf(
- "<table>"
- "<tr><td>Revision:</td><td>$Revision: 1.17
$</td></tr>\n"
+ php_info_print_table_start();
+ php_info_print_table_row(2, "Interbase Support", "enabled");
+ php_info_print_table_row(2, "Revision", "$Revision: 1.18 $");
#ifdef COMPILE_DL
- "<tr><td>Dynamic
module:</td><td>Yes</td></tr>\n"
+ php_info_print_table_row(2, "Dynamic Module", "yes");
#endif
- "<tr><td>Allow persistent
links:</td><td>%s</td></tr>\n"
- "<tr><td>Persistent links:</td><td>%d/",
- (IBG(allow_persistent)?"Yes":"No"),
- IBG(num_persistent));
+ php_info_print_table_row(2, "Allow Persistent Links",
(IBG(allow_persistent)?"Yes":"No") );
+
+ sprintf(tmp, "%d/", IBG(num_persistent) );
if (IBG(max_persistent) == -1) {
- php_printf("Unlimited");
+ strcat(tmp, "unlimited");
} else {
- php_printf("%ld",IBG(max_persistent));
+ sprintf(tmp2, "%ld", IBG(max_persistent));
+ strcat(tmp, tmp2);
}
- php_printf("</td></tr>\n"
- "<tr><td>Total links:</td><td>%d/",
- IBG(num_links));
+ php_info_print_table_row(2, "Persistent Links", tmp );
+
+ sprintf(tmp, "%d/", IBG(num_links) );
if (IBG(max_links) == -1) {
- php_printf("Unlimited");
+ strcat(tmp, "unlimited");
} else {
- php_printf("%ld",IBG(max_links));
+ sprintf(tmp2, "%ld", IBG(max_links));
+ strcat(tmp, tmp2);
}
- php_printf("</td></tr>\n"
- "<tr><td>Time
format:</td><td>\"%s\"</td></tr>\n"
- "</table>\n",
- IBG(timeformat));
+ php_info_print_table_row(2, "Total Links", tmp );
+
+ php_info_print_table_row(2, "Time Format", IBG(timeformat) );
+
+ php_info_print_table_end();
}
/* }}} */
Index: php4/ext/ldap/ldap.c
diff -u php4/ext/ldap/ldap.c:1.31 php4/ext/ldap/ldap.c:1.32
--- php4/ext/ldap/ldap.c:1.31 Thu Apr 6 05:36:47 2000
+++ php4/ext/ldap/ldap.c Thu Apr 6 09:57:33 2000
@@ -21,7 +21,7 @@
*/
-/* $Id: ldap.c,v 1.31 2000/04/06 12:36:47 sterling Exp $ */
+/* $Id: ldap.c,v 1.32 2000/04/06 16:57:33 cmv Exp $ */
#define IS_EXT_MODULE
#include "php.h"
@@ -44,8 +44,8 @@
#endif
#include "ext/standard/php_string.h"
+#include "ext/standard/info.h"
-
ZEND_DECLARE_MODULE_GLOBALS(ldap)
@@ -177,7 +177,7 @@
php_printf("<table>"
"<tr><td>Total links:</td><td>%d/%s</td></tr>\n"
- "<tr><td>RCS Version:</td><td>$Id: ldap.c,v 1.31 2000/04/06
12:36:47 sterling Exp $</td></tr>\n"
+ "<tr><td>RCS Version:</td><td>$Id: ldap.c,v 1.32 2000/04/06
16:57:33 cmv Exp $</td></tr>\n"
#if HAVE_NSLDAP
"<tr><td>SDK Version:</td><td>%f</td></tr>"
"<tr><td>Highest LDAP Protocol
Supported:</td><td>%f</td></tr>"
@@ -1274,4 +1274,4 @@
RETURN_STRING(ldap_err2string(ld_errno), 1);
}
-/* }}} */
\ No newline at end of file
+/* }}} */
Index: php4/ext/mcal/php_mcal.c
diff -u php4/ext/mcal/php_mcal.c:1.18 php4/ext/mcal/php_mcal.c:1.19
--- php4/ext/mcal/php_mcal.c:1.18 Mon Apr 3 19:56:41 2000
+++ php4/ext/mcal/php_mcal.c Thu Apr 6 09:57:33 2000
@@ -50,6 +50,7 @@
#include "mcal.h"
#include "php_mcal.h"
#include "modules.h"
+#include "ext/standard/info.h"
#ifdef PHP_WIN32
#include "winsock.h"
#endif
@@ -149,14 +150,16 @@
PHP_MINFO_FUNCTION(mcal)
{
- php_printf("Mcal Support enabled<br>");
- php_printf("<table>");
- php_printf("<tr><td>Mcal Version:</td>");
- php_printf("<td>%s</td>", CALVER);
+ char tmp[128];
+
+ php_info_print_table_start();
+ php_info_print_table_row(2, "MCAL Support", "enabled" );
+ php_info_print_table_row(2, "MCAL Version", CALVER );
#ifdef MCALVER
- php_printf("<td>%d</td>", MCALVER);
+ sprintf(tmp, "%d", MCALVER );
+ php_info_print_table_row(2, "", tmp );
#endif
- php_printf("</tr></table>");
+ php_info_print_table_end();
}
PHP_MINIT_FUNCTION(mcal)