diff options
author | Andrei Zmievski <andrei@php.net> | 2000-06-26 18:05:55 +0000 |
---|---|---|
committer | Andrei Zmievski <andrei@php.net> | 2000-06-26 18:05:55 +0000 |
commit | 4010b422ddca37f110a47f17863f9114cc50b7a6 (patch) | |
tree | f5f5d2daf750da0c7a99dbd827e4df14173a71d6 | |
parent | bcb308c522e2a6ae495fca931a448e353e945b9e (diff) | |
download | php-git-4010b422ddca37f110a47f17863f9114cc50b7a6.tar.gz |
Separate plain name returned by php_sapi_module() and pretty name
used for output.
-rw-r--r-- | ext/standard/info.c | 4 | ||||
-rw-r--r-- | main/SAPI.h | 1 | ||||
-rw-r--r-- | sapi/aolserver/aolserver.c | 1 | ||||
-rw-r--r-- | sapi/apache/mod_php4.c | 3 | ||||
-rw-r--r-- | sapi/cgi/cgi_main.c | 3 | ||||
-rw-r--r-- | sapi/isapi/php4isapi.c | 5 | ||||
-rw-r--r-- | sapi/nsapi/nsapi.c | 3 | ||||
-rw-r--r-- | sapi/phttpd/phttpd.c | 1 | ||||
-rw-r--r-- | sapi/pi3web/pi3web_sapi.c | 3 | ||||
-rw-r--r-- | sapi/roxen/roxen.c | 1 | ||||
-rw-r--r-- | sapi/servlet/servlet.c | 3 | ||||
-rw-r--r-- | sapi/thttpd/thttpd.c | 1 |
12 files changed, 20 insertions, 9 deletions
diff --git a/ext/standard/info.c b/ext/standard/info.c index e2295b8534..b5de1b3c9e 100644 --- a/ext/standard/info.c +++ b/ext/standard/info.c @@ -179,8 +179,8 @@ PHPAPI void php_print_info(int flag) #ifdef CONFIGURE_COMMAND php_info_print_table_row(2, "Configure Command", CONFIGURE_COMMAND ); #endif - if (sapi_module.name) { - php_info_print_table_row(2, "Server API", sapi_module.name ); + if (sapi_module.pretty_name) { + php_info_print_table_row(2, "Server API", sapi_module.pretty_name ); } #ifdef VIRTUAL_DIR diff --git a/main/SAPI.h b/main/SAPI.h index e7bf31fc2d..5ed4fdb67d 100644 --- a/main/SAPI.h +++ b/main/SAPI.h @@ -148,6 +148,7 @@ SAPI_API size_t sapi_apply_default_charset(char **mimetype, size_t len SLS_DC); struct _sapi_module_struct { char *name; + char *pretty_name; int (*startup)(struct _sapi_module_struct *sapi_module); int (*shutdown)(struct _sapi_module_struct *sapi_module); diff --git a/sapi/aolserver/aolserver.c b/sapi/aolserver/aolserver.c index 6effcda8e9..0374893a31 100644 --- a/sapi/aolserver/aolserver.c +++ b/sapi/aolserver/aolserver.c @@ -290,6 +290,7 @@ php_ns_startup(sapi_module_struct *sapi_module) /* this structure is static (as in "it does not change") */ static sapi_module_struct sapi_module = { + "aolserver", "AOLserver", php_ns_startup, /* startup */ diff --git a/sapi/apache/mod_php4.c b/sapi/apache/mod_php4.c index ab21ee77f8..514c11e05b 100644 --- a/sapi/apache/mod_php4.c +++ b/sapi/apache/mod_php4.c @@ -332,7 +332,8 @@ static char *php_apache_getenv(char *name, int name_len SLS_DC) static sapi_module_struct sapi_module = { - "Apache", /* name */ + "apache", /* name */ + "Apache", /* pretty name */ php_apache_startup, /* startup */ php_module_shutdown_wrapper, /* shutdown */ diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c index 9807cafcf3..f3b91f0ffe 100644 --- a/sapi/cgi/cgi_main.c +++ b/sapi/cgi/cgi_main.c @@ -199,7 +199,8 @@ static int sapi_cgi_deactivate(SLS_D) static sapi_module_struct sapi_module = { - "CGI", /* name */ + "cgi", /* name */ + "CGI", /* pretty name */ php_module_startup, /* startup */ php_module_shutdown_wrapper, /* shutdown */ diff --git a/sapi/isapi/php4isapi.c b/sapi/isapi/php4isapi.c index 4b6d22bc4a..949e96bc00 100644 --- a/sapi/isapi/php4isapi.c +++ b/sapi/isapi/php4isapi.c @@ -383,7 +383,8 @@ static void sapi_isapi_register_server_variables(zval *track_vars_array ELS_DC S static sapi_module_struct sapi_module = { - "ISAPI", /* name */ + "isapi", /* name */ + "ISAPI", /* pretty name */ php_isapi_startup, /* startup */ php_module_shutdown_wrapper, /* shutdown */ @@ -419,7 +420,7 @@ BOOL WINAPI GetFilterVersion(PHTTP_FILTER_VERSION pFilterVersion) { bFilterLoaded = 1; pFilterVersion->dwFilterVersion = HTTP_FILTER_REVISION; - strcpy(pFilterVersion->lpszFilterDesc, sapi_module.name); + strcpy(pFilterVersion->lpszFilterDesc, sapi_module.pretty_name); pFilterVersion->dwFlags= (SF_NOTIFY_AUTHENTICATION | SF_NOTIFY_PREPROC_HEADERS); return TRUE; } diff --git a/sapi/nsapi/nsapi.c b/sapi/nsapi/nsapi.c index 6b4bf1a6a7..4e664b6559 100644 --- a/sapi/nsapi/nsapi.c +++ b/sapi/nsapi/nsapi.c @@ -322,7 +322,8 @@ sapi_nsapi_register_server_variables(zval *track_vars_array ELS_DC SLS_DC PLS_DC } static sapi_module_struct sapi_module = { - "NSAPI", /* name */ + "nsapi", /* name */ + "NSAPI", /* pretty name */ php_module_startup, /* startup */ php_module_shutdown_wrapper, /* shutdown */ diff --git a/sapi/phttpd/phttpd.c b/sapi/phttpd/phttpd.c index ee3fb977e6..9f2eda9c16 100644 --- a/sapi/phttpd/phttpd.c +++ b/sapi/phttpd/phttpd.c @@ -162,6 +162,7 @@ php_phttpd_sapi_read_post(char *buf, uint count_bytes SLS_DC) } static sapi_module_struct sapi_module = { + "phttpd", "PHTTPD", php_phttpd_startup, /* startup */ diff --git a/sapi/pi3web/pi3web_sapi.c b/sapi/pi3web/pi3web_sapi.c index 7c7bc3d3fe..b8f515d452 100644 --- a/sapi/pi3web/pi3web_sapi.c +++ b/sapi/pi3web/pi3web_sapi.c @@ -283,7 +283,8 @@ static char *sapi_pi3web_read_cookies(SLS_D) static sapi_module_struct sapi_module = { - "PI3WEB", /* name */ + "pi3web", /* name */ + "PI3WEB", /* pretty name */ php_pi3web_startup, /* startup */ php_module_shutdown_wrapper, /* shutdown */ diff --git a/sapi/roxen/roxen.c b/sapi/roxen/roxen.c index 13aca14dbc..82c93664bb 100644 --- a/sapi/roxen/roxen.c +++ b/sapi/roxen/roxen.c @@ -491,6 +491,7 @@ static int php_roxen_startup(sapi_module_struct *sapi_module) /* this structure is static (as in "it does not change") */ static sapi_module_struct sapi_module = { + "roxen", "Roxen", php_module_startup, /* startup */ php_module_shutdown_wrapper, /* shutdown */ diff --git a/sapi/servlet/servlet.c b/sapi/servlet/servlet.c index c56566cfd9..b3a8e0f02f 100644 --- a/sapi/servlet/servlet.c +++ b/sapi/servlet/servlet.c @@ -217,7 +217,8 @@ static char *sapi_servlet_read_cookies(SLS_D) */ static sapi_module_struct sapi_module = { - "Java Servlet", /* name */ + "java_servlet", /* name */ + "Java Servlet", /* pretty name */ php_module_startup, /* startup */ php_module_shutdown_wrapper, /* shutdown */ diff --git a/sapi/thttpd/thttpd.c b/sapi/thttpd/thttpd.c index 4692db29ae..a9fe305b03 100644 --- a/sapi/thttpd/thttpd.c +++ b/sapi/thttpd/thttpd.c @@ -103,6 +103,7 @@ static char *sapi_thttpd_read_cookies(SLS_D) static sapi_module_struct sapi_module = { "thttpd", + "thttpd", php_module_startup, php_module_shutdown_wrapper, |