From: Colin Viebrock Date: Wed, 5 Apr 2000 21:43:03 +0000 (+0000) Subject: phpinfo() prettying X-Git-Tag: php-4.0RC2~467 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0c2b366ce18ec4927ae31151ad05249c857e2e72;p=php phpinfo() prettying --- diff --git a/ext/ereg/ereg.c b/ext/ereg/ereg.c index f48413606f..478c92c0e3 100644 --- a/ext/ereg/ereg.c +++ b/ext/ereg/ereg.c @@ -23,6 +23,7 @@ #include "php.h" #include "php_string.h" #include "reg.h" +#include "ext/standard/info.h" #if 0 zend_module_entry regexp_module_entry = { @@ -107,9 +108,9 @@ PHP_MSHUTDOWN_FUNCTION(regex) PHP_MINFO_FUNCTION(regex) { #if HSREGEX - PUTS("Bundled regex library enabled
\n"); + php_info_print_table_row(2, "Regex Library", "Bundled library enabled"); #else - PUTS("System regex library enabled
\n"); + php_info_print_table_row(2, "Regex Library", "System library enabled"); #endif } diff --git a/ext/posix/posix.c b/ext/posix/posix.c index 38a9e12e63..dbbe242ab5 100644 --- a/ext/posix/posix.c +++ b/ext/posix/posix.c @@ -31,6 +31,7 @@ #include "php.h" +#include "ext/standard/info.h" #if !defined(PHP_API_VERSION) || PHP_API_VERSION < 19990421 #include "internal_functions.h" #endif @@ -134,7 +135,9 @@ DLEXPORT zend_module_entry *get_module(void) { return &posix__module_entry; } static PHP_MINFO_FUNCTION(posix) { - PUTS("$Revision$\n"); + php_info_print_table_start(); + php_info_print_table_row(2, "Revision", "$Revision$"); + php_info_print_table_end(); } /* {{{ proto int posix_kill(int pid, int sig) diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index 91052accb0..97e3d2942c 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -23,6 +23,7 @@ #include "php_ini.h" #include "internal_functions_registry.h" #include "php_standard.h" +#include "ext/standard/info.h" #include "zend_operators.h" #include #include @@ -708,9 +709,11 @@ PHP_GINIT_FUNCTION(basic) PHP_MINFO_FUNCTION(basic) { + php_info_print_table_start(); PHP_MINFO(regex)(ZEND_MODULE_INFO_FUNC_ARGS_PASSTHRU); PHP_MINFO(dl)(ZEND_MODULE_INFO_FUNC_ARGS_PASSTHRU); PHP_MINFO(mail)(ZEND_MODULE_INFO_FUNC_ARGS_PASSTHRU); + php_info_print_table_end(); PHP_MINFO(assert)(ZEND_MODULE_INFO_FUNC_ARGS_PASSTHRU); } diff --git a/ext/standard/dl.c b/ext/standard/dl.c index a06c7bb77d..05e92e7c08 100644 --- a/ext/standard/dl.c +++ b/ext/standard/dl.c @@ -21,6 +21,7 @@ #include "php.h" #include "dl.h" #include "php_globals.h" +#include "ext/standard/info.h" #ifdef HAVE_LIBDL #include @@ -181,7 +182,7 @@ void php_dl(pval *file,int type,pval *return_value) PHP_MINFO_FUNCTION(dl) { - PUTS("Dynamic Library support enabled
.\n"); + php_info_print_table_row(2, "Dynamic Library Support", "enabled"); } #else diff --git a/ext/standard/mail.c b/ext/standard/mail.c index 4f4938d432..77b8dd0a19 100644 --- a/ext/standard/mail.c +++ b/ext/standard/mail.c @@ -22,6 +22,7 @@ #include #include #include "php.h" +#include "ext/standard/info.h" #if !defined(PHP_WIN32) #include "build-defs.h" #endif @@ -135,9 +136,9 @@ int php_mail(char *to, char *subject, char *message, char *headers) PHP_MINFO_FUNCTION(mail) { #ifdef PHP_WIN32 - PUTS("Internal Sendmail support for Windows 4"); + php_info_print_table_row(2, "Internal Sendmail Support for Windows 4", "enabled"); #else - php_printf("Path to sendmail: %s", INI_STR("sendmail_path")); + php_info_print_table_row(2, "Path to sendmail", INI_STR("sendmail_path") ); #endif } diff --git a/ext/standard/reg.c b/ext/standard/reg.c index f48413606f..478c92c0e3 100644 --- a/ext/standard/reg.c +++ b/ext/standard/reg.c @@ -23,6 +23,7 @@ #include "php.h" #include "php_string.h" #include "reg.h" +#include "ext/standard/info.h" #if 0 zend_module_entry regexp_module_entry = { @@ -107,9 +108,9 @@ PHP_MSHUTDOWN_FUNCTION(regex) PHP_MINFO_FUNCTION(regex) { #if HSREGEX - PUTS("Bundled regex library enabled
\n"); + php_info_print_table_row(2, "Regex Library", "Bundled library enabled"); #else - PUTS("System regex library enabled
\n"); + php_info_print_table_row(2, "Regex Library", "System library enabled"); #endif } diff --git a/ext/xml/xml.c b/ext/xml/xml.c index b4ae6be08a..7576e0af3c 100644 --- a/ext/xml/xml.c +++ b/ext/xml/xml.c @@ -25,7 +25,7 @@ #include "php_xml.h" #include "zend_variables.h" #include "ext/standard/php_string.h" - +#include "ext/standard/info.h" #if HAVE_LIBEXPAT @@ -218,7 +218,10 @@ PHP_RSHUTDOWN_FUNCTION(xml) PHP_MINFO_FUNCTION(xml) { - PUTS("XML support active"); + + php_info_print_table_start(); + php_info_print_table_row(2, "XML Support", "active"); + php_info_print_table_end(); } diff --git a/ext/yp/yp.c b/ext/yp/yp.c index 40fbf44a68..a8d82d751c 100644 --- a/ext/yp/yp.c +++ b/ext/yp/yp.c @@ -18,6 +18,7 @@ /* $Id$ */ #include "php.h" +#include "ext/standard/info.h" #if HAVE_YP @@ -176,6 +177,8 @@ PHP_FUNCTION(yp_next) { /* }}} */ PHP_MINFO_FUNCTION(yp) { - PUTS("Compiled with YP Support."); + php_info_print_table_start(); + php_info_print_table_row(2, "YP Support", "enabled"); + php_info_print_table_end(); } #endif /* HAVE_YP */ diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c index 52440e749c..9ecf815122 100644 --- a/ext/zlib/zlib.c +++ b/ext/zlib/zlib.c @@ -39,6 +39,7 @@ #include "ext/standard/head.h" #include "safe_mode.h" #include "ext/standard/php_standard.h" +#include "ext/standard/info.h" #include "php_zlib.h" #include "fopen-wrappers.h" #if HAVE_PWD_H @@ -141,11 +142,11 @@ PHP_MSHUTDOWN_FUNCTION(zlib) PHP_MINFO_FUNCTION(zlib) { - PUTS("Zlib support active (compiled with "); - PUTS(ZLIB_VERSION); - PUTS(", linked with "); - PUTS((char *)zlibVersion()); - PUTS(")."); + php_info_print_table_start(); + php_info_print_table_row(2, "ZLib Support", "enabled"); + php_info_print_table_row(2, "Compiled Version", ZLIB_VERSION ); + php_info_print_table_row(2, "Linked Version", (char *)zlibVersion() ); + php_info_print_table_end(); } static gzFile *php_gzopen_with_path(char *filename, char *mode, char *path, char **opened_path);