From: Johannes Schlüter Date: Tue, 20 Sep 2005 22:19:01 +0000 (+0000) Subject: - MFH: Remove HTML fragments from phpcredits() in CLI mode X-Git-Tag: php-5.1.0RC2~212 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ddf3f9b068be8e1735606f4aebcac64cac87c35a;p=php - MFH: Remove HTML fragments from phpcredits() in CLI mode --- diff --git a/ext/standard/credits.c b/ext/standard/credits.c index 963d8ebc4b..713739cd69 100644 --- a/ext/standard/credits.c +++ b/ext/standard/credits.c @@ -21,6 +21,7 @@ #include "php.h" #include "info.h" +#include "SAPI.h" #define CREDIT_LINE(module, authors) php_info_print_table_row(2, module, authors) @@ -28,11 +29,15 @@ */ PHPAPI void php_print_credits(int flag TSRMLS_DC) { - if (flag & PHP_CREDITS_FULLPAGE) { + if (!sapi_module.phpinfo_as_text && flag & PHP_CREDITS_FULLPAGE) { php_print_info_htmlhead(TSRMLS_C); } - PUTS("

PHP Credits

\n"); + if (!sapi_module.phpinfo_as_text) { + PUTS("

PHP Credits

\n"); + } else { + PUTS("PHP Credits\n"); + } if (flag & PHP_CREDITS_GROUP) { /* Group */ @@ -46,7 +51,11 @@ PHPAPI void php_print_credits(int flag TSRMLS_DC) if (flag & PHP_CREDITS_GENERAL) { /* Design & Concept */ php_info_print_table_start(); - php_info_print_table_header(1, "Language Design & Concept"); + if (!sapi_module.phpinfo_as_text) { + php_info_print_table_header(1, "Language Design & Concept"); + } else { + php_info_print_table_header(1, "Language Design & Concept"); + } php_info_print_table_row(1, "Andi Gutmans, Rasmus Lerdorf, Zeev Suraski"); php_info_print_table_end(); @@ -109,7 +118,7 @@ PHPAPI void php_print_credits(int flag TSRMLS_DC) php_info_print_table_end(); } - if (flag & PHP_CREDITS_FULLPAGE) { + if (!sapi_module.phpinfo_as_text && flag & PHP_CREDITS_FULLPAGE) { PUTS("\n"); } }