diff options
author | Stanislav Malyshev <stas@php.net> | 2013-07-21 22:49:26 -0700 |
---|---|---|
committer | Stanislav Malyshev <stas@php.net> | 2013-07-21 22:49:26 -0700 |
commit | 46cc826770536d49697e03a82d8a9ec27b9c5fe1 (patch) | |
tree | e837a6c95dcb96e54f61b2f5cd2b6dcdf7e739f4 /ext/standard/info.c | |
parent | e68cd521dc58c646a99eb2828e530d841ed8647f (diff) | |
parent | 98a3d5acc0e41e56124ec1a8fdee48c2085aff19 (diff) | |
download | php-git-46cc826770536d49697e03a82d8a9ec27b9c5fe1.tar.gz |
Merge branch 'pull-request/231'
* pull-request/231:
update Zend Engine logo as per Zeev, and tweak PHP logos ... :)
fix for scrolling, other minor tweaks
Bump up table width a bit more and make columns consistent
Bringing CSS up to this decade's standards.
Diffstat (limited to 'ext/standard/info.c')
-rw-r--r-- | ext/standard/info.c | 70 |
1 files changed, 35 insertions, 35 deletions
diff --git a/ext/standard/info.c b/ext/standard/info.c index 32ef94e599..3a8ee7da36 100644 --- a/ext/standard/info.c +++ b/ext/standard/info.c @@ -1,4 +1,4 @@ -/* +/* +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ @@ -14,7 +14,7 @@ +----------------------------------------------------------------------+ | Authors: Rasmus Lerdorf <rasmus@php.net> | | Zeev Suraski <zeev@zend.com> | - | Colin Viebrock <colin@easydns.com> | + | Colin Viebrock <colin@viebrock.ca> | +----------------------------------------------------------------------+ */ @@ -67,7 +67,7 @@ static int php_info_print_html_esc(const char *str, int len) /* {{{ */ int written; char *new_str; TSRMLS_FETCH(); - + new_str = php_escape_html_entities((unsigned char *) str, len, &new_len, 0, ENT_QUOTES, "utf-8" TSRMLS_CC); written = php_output_write(new_str, new_len TSRMLS_CC); efree(new_str); @@ -81,11 +81,11 @@ static int php_info_printf(const char *fmt, ...) /* {{{ */ int len, written; va_list argv; TSRMLS_FETCH(); - + va_start(argv, fmt); len = vspprintf(&buf, 0, fmt, argv); va_end(argv); - + written = php_output_write(buf, len TSRMLS_CC); efree(buf); return written; @@ -103,7 +103,7 @@ static void php_info_print_stream_hash(const char *name, HashTable *ht TSRMLS_DC { char *key; uint len; - + if (ht) { if (zend_hash_num_elements(ht)) { HashPosition pos; @@ -113,7 +113,7 @@ static void php_info_print_stream_hash(const char *name, HashTable *ht TSRMLS_DC } else { php_info_printf("\nRegistered %s => ", name); } - + zend_hash_internal_pointer_reset_ex(ht, &pos); while (zend_hash_get_current_key_ex(ht, &key, &len, NULL, 0, &pos) == HASH_KEY_IS_STRING) { @@ -129,7 +129,7 @@ static void php_info_print_stream_hash(const char *name, HashTable *ht TSRMLS_DC break; } } - + if (!sapi_module.phpinfo_as_text) { php_info_print("</td></tr>\n"); } @@ -164,10 +164,10 @@ PHPAPI void php_info_print_module(zend_module_entry *zend_module TSRMLS_DC) /* { } } else { if (!sapi_module.phpinfo_as_text) { - php_info_printf("<tr><td>%s</td></tr>\n", zend_module->name); + php_info_printf("<tr><td class=\"v\">%s</td></tr>\n", zend_module->name); } else { php_info_printf("%s\n", zend_module->name); - } + } } } /* }}} */ @@ -212,7 +212,7 @@ static void php_print_gpcse_array(char *name, uint name_length TSRMLS_DC) php_info_print(name); php_info_print("[\""); - + switch (zend_hash_get_current_key_ex(Z_ARRVAL_PP(data), &string_key, &string_len, &num_key, 0, NULL)) { case HASH_KEY_IS_STRING: if (!sapi_module.phpinfo_as_text) { @@ -442,7 +442,7 @@ char* php_get_windows_name() sub = "Web Edition"; else sub = "Standard Edition"; } - } + } } if ( osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 1 ) { @@ -535,7 +535,7 @@ PHPAPI char *php_get_uname(char mode) DWORD dwWindowsMinorVersion = (DWORD)(HIBYTE(LOWORD(dwVersion))); DWORD dwSize = MAX_COMPUTERNAME_LENGTH + 1; char ComputerName[MAX_COMPUTERNAME_LENGTH + 1]; - + GetComputerName(ComputerName, &dwSize); if (mode == 's') { @@ -584,7 +584,7 @@ PHPAPI char *php_get_uname(char mode) if (mode == 's') { php_uname = buf.sysname; } else if (mode == 'r') { - snprintf(tmp_uname, sizeof(tmp_uname), "%d.%d.%d", + snprintf(tmp_uname, sizeof(tmp_uname), "%d.%d.%d", buf.netware_major, buf.netware_minor, buf.netware_revision); php_uname = tmp_uname; } else if (mode == 'n') { @@ -674,7 +674,7 @@ PHPAPI void php_print_info(int flag TSRMLS_DC) char temp_api[10]; php_uname = php_get_uname('a'); - + if (!sapi_module.phpinfo_as_text) { php_info_print_box_start(1); } @@ -698,7 +698,7 @@ PHPAPI void php_print_info(int flag TSRMLS_DC) php_info_printf("<h1 class=\"p\">PHP Version %s</h1>\n", PHP_VERSION); } else { php_info_print_table_row(2, "PHP Version", PHP_VERSION); - } + } php_info_print_box_end(); php_info_print_table_start(); php_info_print_table_row(2, "System", php_uname ); @@ -783,7 +783,7 @@ PHPAPI void php_print_info(int flag TSRMLS_DC) #else php_info_print_table_row(2, "DTrace Support", "disabled" ); #endif - + php_info_print_stream_hash("PHP Streams", php_stream_get_url_stream_wrappers_hash() TSRMLS_CC); php_info_print_stream_hash("Stream Socket Transports", php_stream_xport_get_hash() TSRMLS_CC); php_info_print_stream_hash("Stream Filters", php_get_stream_filters_hash() TSRMLS_CC); @@ -815,7 +815,7 @@ PHPAPI void php_print_info(int flag TSRMLS_DC) php_info_print("<h1>Configuration</h1>\n"); } else { SECTION("Configuration"); - } + } if (!(flag & PHP_INFO_MODULES)) { SECTION("PHP Core"); display_ini_entries(NULL); @@ -889,7 +889,7 @@ PHPAPI void php_print_info(int flag TSRMLS_DC) } - if ((flag & PHP_INFO_CREDITS) && !sapi_module.phpinfo_as_text) { + if ((flag & PHP_INFO_CREDITS) && !sapi_module.phpinfo_as_text) { php_info_print_hr(); php_print_credits(PHP_CREDITS_ALL & ~PHP_CREDITS_FULLPAGE TSRMLS_CC); } @@ -930,24 +930,24 @@ PHPAPI void php_print_info(int flag TSRMLS_DC) if (!sapi_module.phpinfo_as_text) { php_info_print("</div></body></html>"); - } + } } /* }}} */ PHPAPI void php_info_print_table_start(void) /* {{{ */ { if (!sapi_module.phpinfo_as_text) { - php_info_print("<table border=\"0\" cellpadding=\"3\" width=\"600\">\n"); + php_info_print("<table>\n"); } else { php_info_print("\n"); - } + } } /* }}} */ PHPAPI void php_info_print_table_end(void) /* {{{ */ { if (!sapi_module.phpinfo_as_text) { - php_info_print("</table><br />\n"); + php_info_print("</table>\n"); } } @@ -965,7 +965,7 @@ PHPAPI void php_info_print_box_start(int flag) /* {{{ */ php_info_print("<tr class=\"v\"><td>\n"); } else { php_info_print("\n"); - } + } } } /* }}} */ @@ -998,7 +998,7 @@ PHPAPI void php_info_print_table_colspan_header(int num_cols, char *header) /* { } else { spaces = (74 - strlen(header)); php_info_printf("%*s%s%*s\n", (int)(spaces/2), " ", header, (int)(spaces/2), " "); - } + } } /* }}} */ @@ -1013,7 +1013,7 @@ PHPAPI void php_info_print_table_header(int num_cols, ...) va_start(row_elements, num_cols); if (!sapi_module.phpinfo_as_text) { php_info_print("<tr class=\"h\">"); - } + } for (i=0; i<num_cols; i++) { row_element = va_arg(row_elements, char *); if (!row_element || !*row_element) { @@ -1042,7 +1042,7 @@ PHPAPI void php_info_print_table_header(int num_cols, ...) /* {{{ php_info_print_table_row_internal */ -static void php_info_print_table_row_internal(int num_cols, +static void php_info_print_table_row_internal(int num_cols, const char *value_class, va_list row_elements) { int i; @@ -1050,13 +1050,13 @@ static void php_info_print_table_row_internal(int num_cols, if (!sapi_module.phpinfo_as_text) { php_info_print("<tr>"); - } + } for (i=0; i<num_cols; i++) { if (!sapi_module.phpinfo_as_text) { php_info_printf("<td class=\"%s\">", (i==0 ? "e" : value_class ) ); - } + } row_element = va_arg(row_elements, char *); if (!row_element || !*row_element) { if (!sapi_module.phpinfo_as_text) { @@ -1071,7 +1071,7 @@ static void php_info_print_table_row_internal(int num_cols, php_info_print(row_element); if (i < num_cols-1) { php_info_print(" => "); - } + } } } if (!sapi_module.phpinfo_as_text) { @@ -1091,7 +1091,7 @@ static void php_info_print_table_row_internal(int num_cols, PHPAPI void php_info_print_table_row(int num_cols, ...) { va_list row_elements; - + va_start(row_elements, num_cols); php_info_print_table_row_internal(num_cols, "v", row_elements); va_end(row_elements); @@ -1100,11 +1100,11 @@ PHPAPI void php_info_print_table_row(int num_cols, ...) /* {{{ php_info_print_table_row_ex */ -PHPAPI void php_info_print_table_row_ex(int num_cols, const char *value_class, +PHPAPI void php_info_print_table_row_ex(int num_cols, const char *value_class, ...) { va_list row_elements; - + va_start(row_elements, value_class); php_info_print_table_row_internal(num_cols, value_class, row_elements); va_end(row_elements); @@ -1232,7 +1232,7 @@ PHP_FUNCTION(php_ini_scanned_files) if (zend_parse_parameters_none() == FAILURE) { return; } - + if (strlen(PHP_CONFIG_FILE_SCAN_DIR) && php_ini_scanned_files) { RETURN_STRING(php_ini_scanned_files, 1); } else { @@ -1248,7 +1248,7 @@ PHP_FUNCTION(php_ini_loaded_file) if (zend_parse_parameters_none() == FAILURE) { return; } - + if (php_ini_opened_path) { RETURN_STRING(php_ini_opened_path, 1); } else { |