summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Viebrock <cmv@php.net>2000-04-05 22:30:19 +0000
committerColin Viebrock <cmv@php.net>2000-04-05 22:30:19 +0000
commit731404c0ba2d8a66bded77feec15bf8ba50099c8 (patch)
tree6410f0d01e6eadb4b22380047d0876f75f25e539
parent0c2b366ce18ec4927ae31151ad05249c857e2e72 (diff)
downloadphp-git-731404c0ba2d8a66bded77feec15bf8ba50099c8.tar.gz
phpinfo() prettying
I will get to the rest of the functions later tonight or tomorrow (i.e. from hyperwave to snmp)
-rw-r--r--ext/aspell/aspell.c7
-rw-r--r--ext/cpdf/cpdf.c8
-rw-r--r--ext/dav/dav.c4
-rw-r--r--ext/db/db.c4
-rw-r--r--ext/dba/dba.c4
-rw-r--r--ext/domxml/domxml.c9
-rw-r--r--ext/fdf/fdf.c7
-rw-r--r--ext/gd/gd.c30
-rw-r--r--ext/gettext/gettext.c5
-rw-r--r--ext/standard/info.c2
10 files changed, 59 insertions, 21 deletions
diff --git a/ext/aspell/aspell.c b/ext/aspell/aspell.c
index 74d8a73df1..b890f212e2 100644
--- a/ext/aspell/aspell.c
+++ b/ext/aspell/aspell.c
@@ -19,6 +19,7 @@
/* $Id$ */
#include "php.h"
+
#if defined(COMPILE_DL)
#include "phpdl.h"
#endif
@@ -30,6 +31,7 @@
#include "php_aspell.h"
#include <aspell-c.h>
+#include "ext/standard/info.h"
function_entry aspell_functions[] = {
PHP_FE(aspell_new, NULL)
@@ -194,8 +196,9 @@ PHP_FUNCTION(aspell_check_raw)
PHP_MINFO_FUNCTION(aspell)
{
- php_printf("ASpell support enabled");
-
+ php_info_print_table_start();
+ php_info_print_table_row(2, "ASpell Support", "enabled");
+ php_info_print_table_end();
}
#endif
diff --git a/ext/cpdf/cpdf.c b/ext/cpdf/cpdf.c
index 973f7ca5dc..30a9b2840b 100644
--- a/ext/cpdf/cpdf.c
+++ b/ext/cpdf/cpdf.c
@@ -42,7 +42,6 @@
#include "php_globals.h"
#include "ext/standard/php_standard.h"
#include "ext/standard/head.h"
-#include "ext/standard/info.h"
#include <math.h>
#if HAVE_LIBGD13
#include <gd.h>
@@ -58,6 +57,7 @@
#if HAVE_CPDFLIB
#include "php_cpdf.h"
+#include "ext/standard/info.h"
#ifdef THREAD_SAFE
DWORD CPDFlibTls;
@@ -187,7 +187,11 @@ PHP_RINIT_FUNCTION(cpdf)
PHP_MINFO_FUNCTION(cpdf) {
/* need to use a PHPAPI function here because it is external module in windows */
- php_printf("Version %s", cpdf_version());
+ /* (don't knwo if that still applies (cmv) */
+ php_info_print_table_start();
+ php_info_print_table_row(2, "CPDF Support", "enabled");
+ php_info_print_table_row(2, "Version", cpdf_version() );
+ php_info_print_table_end();
}
PHP_MSHUTDOWN_FUNCTION(cpdf){
diff --git a/ext/dav/dav.c b/ext/dav/dav.c
index 89a6c27ca8..021ac4741f 100644
--- a/ext/dav/dav.c
+++ b/ext/dav/dav.c
@@ -36,6 +36,7 @@
#if HAVE_MOD_DAV
# include "mod_dav.h"
+#include "ext/standard/info.h"
/* {{{ thread safety stuff */
@@ -158,6 +159,9 @@ PHP_RSHUTDOWN_FUNCTION(phpdav)
PHP_MINFO_FUNCTION(phpdav);
{
+ php_info_print_table_start();
+ php_info_print_table_row(2, "DAV Support", "enabled");
+ php_info_print_table_end();
}
/* {{{ extension-internal functions */
diff --git a/ext/db/db.c b/ext/db/db.c
index 8d7fc7cb5c..bc131aa759 100644
--- a/ext/db/db.c
+++ b/ext/db/db.c
@@ -30,6 +30,7 @@
#include "safe_mode.h"
#include "fopen-wrappers.h"
#include "ext/standard/flock_compat.h"
+#include "ext/standard/info.h"
#include <stdlib.h>
#include <string.h>
@@ -230,7 +231,10 @@ static char *php_get_info_db(void)
PHP_MINFO_FUNCTION(db)
{
+ /* this isn't pretty ... should break out the info a bit more (cmv) */
+ php_info_print_box_start(0);
php_printf(php_get_info_db());
+ php_info_print_box_end();
}
PHP_FUNCTION(dblist)
diff --git a/ext/dba/dba.c b/ext/dba/dba.c
index 6e40c9c8e9..ab5ebb1dd2 100644
--- a/ext/dba/dba.c
+++ b/ext/dba/dba.c
@@ -34,6 +34,7 @@
#if HAVE_DBA
#include "php_dba.h"
+#include "ext/standard/info.h"
#include "php_gdbm.h"
#include "php_ndbm.h"
@@ -197,6 +198,8 @@ static PHP_MSHUTDOWN_FUNCTION(dba)
static PHP_MINFO_FUNCTION(dba)
{
+ /* could be prettier (cmv) */
+ php_info_print_box_start();
dba_handler *hptr;
PUTS("V1 ($Id$)");
@@ -204,6 +207,7 @@ static PHP_MINFO_FUNCTION(dba)
PUTS(" ");
PUTS(hptr->name);
}
+ php_info_print_box_end();
}
static void php_dba_update(INTERNAL_FUNCTION_PARAMETERS, int mode)
diff --git a/ext/domxml/domxml.c b/ext/domxml/domxml.c
index 599becb57f..7c397961d0 100644
--- a/ext/domxml/domxml.c
+++ b/ext/domxml/domxml.c
@@ -23,6 +23,7 @@
#include "php_domxml.h"
#if HAVE_DOMXML
+#include "ext/standard/info.h"
//#define newcode
static int le_domxmldocp;
@@ -313,9 +314,11 @@ PHP_FUNCTION(domxml_test)
PHP_MINFO_FUNCTION(domxml)
{
- PUTS("DOM/XML support active (compiled with libxml ");
-// php_printf("%s", LIBXML_VERSION);
- PUTS(".)");
+ /* don't know why that line was commented out in the previous version, so i left it (cmv) */
+ php_info_print_table_start();
+ php_info_print_table_row(2, "DOM/XML Support", "enabled");
+// php_info_print_table_row(2, "libmxl Version", LIBXML_VERSION );
+ php_info_print_table_end();
}
/* {{{ proto string domxml_attrname([int dir_handle])
diff --git a/ext/fdf/fdf.c b/ext/fdf/fdf.c
index 75817a68c6..0c75cc98b8 100644
--- a/ext/fdf/fdf.c
+++ b/ext/fdf/fdf.c
@@ -61,6 +61,8 @@
#if HAVE_FDFLIB
+#include "ext/standard/info.h"
+
#ifdef THREAD_SAFE
DWORD FDFlibTls;
static int numthreads=0;
@@ -123,7 +125,10 @@ PHP_MINIT_FUNCTION(fdf)
PHP_MINFO_FUNCTION(fdf)
{
/* need to use a PHPAPI function here because it is external module in windows */
- php_printf("FdfTk Version %s", FDFGetVersion());
+ php_info_print_table_start();
+ php_info_print_table_row(2, "FDF Support", "enabled");
+ php_info_print_table_row(2, "FdfTk Version", FDFGetVersion() );
+ php_info_print_table_end();
}
PHP_MSHUTDOWN_FUNCTION(fdf)
diff --git a/ext/gd/gd.c b/ext/gd/gd.c
index 50ffb70b5e..2ca2b9182e 100644
--- a/ext/gd/gd.c
+++ b/ext/gd/gd.c
@@ -43,6 +43,9 @@
#endif
#if HAVE_LIBGD
+
+#include "ext/standard/info.h"
+
#include <gd.h>
#include <gdfontt.h> /* 1 Tiny font */
#include <gdfonts.h> /* 2 Small font */
@@ -221,34 +224,39 @@ PHP_MINIT_FUNCTION(gd)
PHP_MINFO_FUNCTION(gd)
{
+ php_info_print_table_start();
+ php_info_print_table_row(2, "GD Support", "enabled");
+
/* need to use a PHPAPI function here because it is external module in windows */
+
#if HAVE_GDIMAGECOLORRESOLVE
- php_printf("Version 1.6.2 or higher");
+ php_info_print_table_row(2, "GD Version", "1.6.2 or higher");
#elif HAVE_LIBGD13
- php_printf("Version between 1.3 and 1.6.1");
+ php_info_print_table_row(2, "GD Version", "between 1.3 and 1.6.1");
#else
- php_printf("Version 1.2");
+ php_info_print_table_row(2, "GD Version", "1.2");
#endif
#ifdef ENABLE_GD_TTF
- php_printf(" with FreeType support");
+ php_info_print_table_row(2, "FreeType Support", "enabled");
#if HAVE_LIBFREETYPE
- php_printf(" (linked with freetype)");
+ php_info_print_table_row(2, "FreeType Linkage", "with freetype");
#elif HAVE_LIBTTF
- php_printf(" (linked with ttf library)");
+ php_info_print_table_row(2, "FreeType Linkage", "with TTF library");
#else
- php_printf(" (linked with unknown library)");
+ php_info_print_table_row(2, "FreeType Linkage", "with unknown library");
#endif
#endif
- php_printf(" which supports:");
-
+/* this next part is stupid ... if I knew better, I'd put them all on one row (cmv) */
+
#ifdef HAVE_GD_GIF
- php_printf(" GIF");
+ php_info_print_table_row(2, "GIF Support", "enabled);
#endif
#ifdef HAVE_GD_PNG
- php_printf(" PNG");
+ php_info_print_table_row(2, "PNG Support", "enabled);
#endif
+ php_info_print_table_end();
}
/* Need this for cpdf. See also comment in file.c php3i_get_le_fp() */
diff --git a/ext/gettext/gettext.c b/ext/gettext/gettext.c
index 3a0cac4144..8ef9adfd79 100644
--- a/ext/gettext/gettext.c
+++ b/ext/gettext/gettext.c
@@ -25,6 +25,7 @@
#if HAVE_LIBINTL
#include <libintl.h>
+#include "ext/standard/info.h"
function_entry php_gettext_functions[] = {
PHP_FE(textdomain, NULL)
@@ -42,7 +43,9 @@ zend_module_entry php_gettext_module_entry = {
PHP_MINFO_FUNCTION(gettext)
{
- php_printf("GNU gettext support active.");
+ php_info_print_table_start();
+ php_info_print_table_row(2, "GNU GetText Support", "enabled");
+ php_info_print_table_end();
}
/* {{{ proto string textdomain(string domain)
diff --git a/ext/standard/info.c b/ext/standard/info.c
index f980bec01a..db7f06f2c7 100644
--- a/ext/standard/info.c
+++ b/ext/standard/info.c
@@ -193,7 +193,7 @@ PHPAPI void php_print_info(int flag)
}
PUTS("?=PHPE9568F35-D428-11d2-A769-00AA001ACF42\" border=\"0\" align=\"right\"></a>\n");
}
- php_printf("This program makes use of the Zend scripting language engine:<br><pre>%s</pre>", get_zend_version());
+ php_printf("This program makes use of the Zend scripting language engine:<BR>%s<BR>\n", get_zend_version());
php_info_print_box_end();
}