]> granicus.if.org Git - php/commitdiff
fix phpinfo() & php -i
authorMarcus Boerger <helly@php.net>
Sat, 29 Mar 2003 21:25:03 +0000 (21:25 +0000)
committerMarcus Boerger <helly@php.net>
Sat, 29 Mar 2003 21:25:03 +0000 (21:25 +0000)
main/php_ini.c

index 2422392f9b051b9791cd9240cf115cf2b652d9b6..9b3fe10c63c1cff17f0cb404545ea6c5c07efc01 100644 (file)
@@ -67,9 +67,9 @@ static void php_ini_displayer_cb(zend_ini_entry *ini_entry, int type)
                        if (ini_entry->orig_value && ini_entry->orig_value[0]) {
                                display_string = ini_entry->orig_value;
                                display_string_length = ini_entry->orig_value_length;
-                               esc_html = 1;
+                               esc_html = !sapi_module.phpinfo_as_text;
                        } else {
-                               if (PG(html_errors)) {
+                               if (!sapi_module.phpinfo_as_text) {
                                        display_string = "<i>no value</i>";
                                        display_string_length = sizeof("<i>no value</i>") - 1;
                                } else {
@@ -80,9 +80,9 @@ static void php_ini_displayer_cb(zend_ini_entry *ini_entry, int type)
                } else if (ini_entry->value && ini_entry->value[0]) {
                        display_string = ini_entry->value;
                        display_string_length = ini_entry->value_length;
-                       esc_html=1;
+                       esc_html = !sapi_module.phpinfo_as_text;
                } else {
-                       if (PG(html_errors)) {
+                       if (!sapi_module.phpinfo_as_text) {
                                display_string = "<i>no value</i>";
                                display_string_length = sizeof("<i>no value</i>") - 1;
                        } else {
@@ -107,7 +107,7 @@ static int php_ini_displayer(zend_ini_entry *ini_entry, int module_number TSRMLS
        if (ini_entry->module_number != module_number) {
                return 0;
        }
-       if (PG(html_errors)) {
+       if (!sapi_module.phpinfo_as_text) {
                PUTS("<tr>");
                PUTS("<td class=\"e\">");
                PHPWRITE(ini_entry->name, ini_entry->name_length - 1);