Use php_info_print_table_header for actual column headers only (#9485)

Using php_info_print_table_header() for "Foo: bar" looks odd and out of place,
because the whole line is colored. It is also questionable from a HTML
semantics point of view, because it does not described the columns that follow.

The use of this across extensions is inconsistent. It was part of the skeleton,
but ext/date or ext/json already use a regular row.
This commit is contained in:
Tim Düsterhus 2022-09-06 08:48:22 +02:00 committed by GitHub
parent 9bea5f443b
commit 03fd405423
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 27 additions and 27 deletions

View file

@ -256,13 +256,13 @@ PHP_MINFO_FUNCTION(com_dotnet)
{ {
php_info_print_table_start(); php_info_print_table_start();
php_info_print_table_header(2, "COM support", "enabled"); php_info_print_table_row(2, "COM support", "enabled");
php_info_print_table_header(2, "DCOM support", COMG(allow_dcom) ? "enabled" : "disabled"); php_info_print_table_row(2, "DCOM support", COMG(allow_dcom) ? "enabled" : "disabled");
#if HAVE_MSCOREE_H #if HAVE_MSCOREE_H
php_info_print_table_header(2, ".Net support", "enabled"); php_info_print_table_row(2, ".Net support", "enabled");
#else #else
php_info_print_table_header(2, ".Net support", "not present in this build"); php_info_print_table_row(2, ".Net support", "not present in this build");
#endif #endif
php_info_print_table_end(); php_info_print_table_end();

View file

@ -123,7 +123,7 @@ PHP_RINIT_FUNCTION(dl_test)
PHP_MINFO_FUNCTION(dl_test) PHP_MINFO_FUNCTION(dl_test)
{ {
php_info_print_table_start(); php_info_print_table_start();
php_info_print_table_header(2, "dl_test support", "enabled"); php_info_print_table_row(2, "dl_test support", "enabled");
php_info_print_table_end(); php_info_print_table_end();
DISPLAY_INI_ENTRIES(); DISPLAY_INI_ENTRIES();

View file

@ -5465,7 +5465,7 @@ ZEND_RSHUTDOWN_FUNCTION(ffi)
ZEND_MINFO_FUNCTION(ffi) ZEND_MINFO_FUNCTION(ffi)
{ {
php_info_print_table_start(); php_info_print_table_start();
php_info_print_table_header(2, "FFI support", "enabled"); php_info_print_table_row(2, "FFI support", "enabled");
php_info_print_table_end(); php_info_print_table_end();
DISPLAY_INI_ENTRIES(); DISPLAY_INI_ENTRIES();

View file

@ -257,7 +257,7 @@ PHP_MINFO_FUNCTION( intl )
#endif #endif
php_info_print_table_start(); php_info_print_table_start();
php_info_print_table_header( 2, "Internationalization support", "enabled" ); php_info_print_table_row( 2, "Internationalization support", "enabled" );
php_info_print_table_row( 2, "ICU version", U_ICU_VERSION ); php_info_print_table_row( 2, "ICU version", U_ICU_VERSION );
#ifdef U_ICU_DATA_VERSION #ifdef U_ICU_DATA_VERSION
php_info_print_table_row( 2, "ICU Data version", U_ICU_DATA_VERSION ); php_info_print_table_row( 2, "ICU Data version", U_ICU_DATA_VERSION );

View file

@ -588,7 +588,7 @@ PHP_MINFO_FUNCTION(mysqli)
char buf[32]; char buf[32];
php_info_print_table_start(); php_info_print_table_start();
php_info_print_table_header(2, "MysqlI Support", "enabled"); php_info_print_table_row(2, "MysqlI Support", "enabled");
php_info_print_table_row(2, "Client API library version", mysql_get_client_info()); php_info_print_table_row(2, "Client API library version", mysql_get_client_info());
snprintf(buf, sizeof(buf), ZEND_LONG_FMT, MyG(num_active_persistent)); snprintf(buf, sizeof(buf), ZEND_LONG_FMT, MyG(num_active_persistent));
php_info_print_table_row(2, "Active Persistent Links", buf); php_info_print_table_row(2, "Active Persistent Links", buf);

View file

@ -79,7 +79,7 @@ PHP_MINFO_FUNCTION(mysqlnd)
char buf[32]; char buf[32];
php_info_print_table_start(); php_info_print_table_start();
php_info_print_table_header(2, "mysqlnd", "enabled"); php_info_print_table_row(2, "mysqlnd", "enabled");
php_info_print_table_row(2, "Version", mysqlnd_get_client_info()); php_info_print_table_row(2, "Version", mysqlnd_get_client_info());
php_info_print_table_row(2, "Compression", php_info_print_table_row(2, "Compression",
#ifdef MYSQLND_COMPRESSION_ENABLED #ifdef MYSQLND_COMPRESSION_ENABLED

View file

@ -438,7 +438,7 @@ PHP_MINFO_FUNCTION(odbc)
char buf[32]; char buf[32];
php_info_print_table_start(); php_info_print_table_start();
php_info_print_table_header(2, "ODBC Support", "enabled"); php_info_print_table_row(2, "ODBC Support", "enabled");
snprintf(buf, sizeof(buf), ZEND_LONG_FMT, ODBCG(num_persistent)); snprintf(buf, sizeof(buf), ZEND_LONG_FMT, ODBCG(num_persistent));
php_info_print_table_row(2, "Active Persistent Links", buf); php_info_print_table_row(2, "Active Persistent Links", buf);
snprintf(buf, sizeof(buf), ZEND_LONG_FMT, ODBCG(num_links)); snprintf(buf, sizeof(buf), ZEND_LONG_FMT, ODBCG(num_links));

View file

@ -160,7 +160,7 @@ PHP_RSHUTDOWN_FUNCTION(pcntl)
PHP_MINFO_FUNCTION(pcntl) PHP_MINFO_FUNCTION(pcntl)
{ {
php_info_print_table_start(); php_info_print_table_start();
php_info_print_table_header(2, "pcntl support", "enabled"); php_info_print_table_row(2, "pcntl support", "enabled");
php_info_print_table_end(); php_info_print_table_end();
} }

View file

@ -275,7 +275,7 @@ PHP_MINFO_FUNCTION(pdo)
pdo_driver_t *pdriver; pdo_driver_t *pdriver;
php_info_print_table_start(); php_info_print_table_start();
php_info_print_table_header(2, "PDO support", "enabled"); php_info_print_table_row(2, "PDO support", "enabled");
ZEND_HASH_MAP_FOREACH_PTR(&pdo_driver_hash, pdriver) { ZEND_HASH_MAP_FOREACH_PTR(&pdo_driver_hash, pdriver) {
spprintf(&drivers, 0, "%s, %s", ldrivers, pdriver->driver_name); spprintf(&drivers, 0, "%s, %s", ldrivers, pdriver->driver_name);

View file

@ -223,7 +223,7 @@ PHP_MSHUTDOWN_FUNCTION(pdo_dblib)
PHP_MINFO_FUNCTION(pdo_dblib) PHP_MINFO_FUNCTION(pdo_dblib)
{ {
php_info_print_table_start(); php_info_print_table_start();
php_info_print_table_header(2, "PDO Driver for " php_info_print_table_row(2, "PDO Driver for "
#ifdef PDO_DBLIB_IS_MSSQL #ifdef PDO_DBLIB_IS_MSSQL
"MSSQL" "MSSQL"
#elif defined(PHP_WIN32) #elif defined(PHP_WIN32)

View file

@ -85,7 +85,7 @@ PHP_MINFO_FUNCTION(pdo_firebird) /* {{{ */
isc_get_client_version(version); isc_get_client_version(version);
php_info_print_table_start(); php_info_print_table_start();
php_info_print_table_header(2, "PDO Driver for Firebird", "enabled"); php_info_print_table_row(2, "PDO Driver for Firebird", "enabled");
php_info_print_table_row(2, "Client Library Version", version); php_info_print_table_row(2, "Client Library Version", version);
php_info_print_table_end(); php_info_print_table_end();
} }

View file

@ -153,7 +153,7 @@ static PHP_MINFO_FUNCTION(pdo_mysql)
{ {
php_info_print_table_start(); php_info_print_table_start();
php_info_print_table_header(2, "PDO Driver for MySQL", "enabled"); php_info_print_table_row(2, "PDO Driver for MySQL", "enabled");
php_info_print_table_row(2, "Client API version", mysql_get_client_info()); php_info_print_table_row(2, "Client API version", mysql_get_client_info());
php_info_print_table_end(); php_info_print_table_end();

View file

@ -147,7 +147,7 @@ PHP_MSHUTDOWN_FUNCTION(pdo_oci)
PHP_MINFO_FUNCTION(pdo_oci) PHP_MINFO_FUNCTION(pdo_oci)
{ {
php_info_print_table_start(); php_info_print_table_start();
php_info_print_table_header(2, "PDO Driver for OCI 8 and later", "enabled"); php_info_print_table_row(2, "PDO Driver for OCI 8 and later", "enabled");
php_info_print_table_end(); php_info_print_table_end();
} }
/* }}} */ /* }}} */

View file

@ -118,7 +118,7 @@ PHP_MSHUTDOWN_FUNCTION(pdo_odbc)
PHP_MINFO_FUNCTION(pdo_odbc) PHP_MINFO_FUNCTION(pdo_odbc)
{ {
php_info_print_table_start(); php_info_print_table_start();
php_info_print_table_header(2, "PDO Driver for ODBC (" PDO_ODBC_TYPE ")" , "enabled"); php_info_print_table_row(2, "PDO Driver for ODBC (" PDO_ODBC_TYPE ")" , "enabled");
#ifdef SQL_ATTR_CONNECTION_POOLING #ifdef SQL_ATTR_CONNECTION_POOLING
php_info_print_table_row(2, "ODBC Connection Pooling", pdo_odbc_pool_on == SQL_CP_OFF ? php_info_print_table_row(2, "ODBC Connection Pooling", pdo_odbc_pool_on == SQL_CP_OFF ?
"Disabled" : (pdo_odbc_pool_mode == SQL_CP_STRICT_MATCH ? "Enabled, strict matching" : "Enabled, relaxed matching")); "Disabled" : (pdo_odbc_pool_mode == SQL_CP_STRICT_MATCH ? "Enabled, strict matching" : "Enabled, relaxed matching"));

View file

@ -84,7 +84,7 @@ PHP_MSHUTDOWN_FUNCTION(pdo_sqlite)
PHP_MINFO_FUNCTION(pdo_sqlite) PHP_MINFO_FUNCTION(pdo_sqlite)
{ {
php_info_print_table_start(); php_info_print_table_start();
php_info_print_table_header(2, "PDO Driver for SQLite 3.x", "enabled"); php_info_print_table_row(2, "PDO Driver for SQLite 3.x", "enabled");
php_info_print_table_row(2, "SQLite Library", sqlite3_libversion()); php_info_print_table_row(2, "SQLite Library", sqlite3_libversion());
php_info_print_table_end(); php_info_print_table_end();
} }

View file

@ -512,7 +512,7 @@ PHP_MINFO_FUNCTION(pgsql)
char buf[256]; char buf[256];
php_info_print_table_start(); php_info_print_table_start();
php_info_print_table_header(2, "PostgreSQL Support", "enabled"); php_info_print_table_row(2, "PostgreSQL Support", "enabled");
php_info_print_table_row(2, "PostgreSQL (libpq) Version", pgsql_libpq_version); php_info_print_table_row(2, "PostgreSQL (libpq) Version", pgsql_libpq_version);
#ifdef HAVE_PGSQL_WITH_MULTIBYTE_SUPPORT #ifdef HAVE_PGSQL_WITH_MULTIBYTE_SUPPORT
php_info_print_table_row(2, "Multibyte character support", "enabled"); php_info_print_table_row(2, "Multibyte character support", "enabled");

View file

@ -3565,7 +3565,7 @@ PHP_MINFO_FUNCTION(phar) /* {{{ */
{ {
phar_request_initialize(); phar_request_initialize();
php_info_print_table_start(); php_info_print_table_start();
php_info_print_table_header(2, "Phar: PHP Archive support", "enabled"); php_info_print_table_row(2, "Phar: PHP Archive support", "enabled");
php_info_print_table_row(2, "Phar API version", PHP_PHAR_API_VERSION); php_info_print_table_row(2, "Phar API version", PHP_PHAR_API_VERSION);
php_info_print_table_row(2, "Phar-based phar archives", "enabled"); php_info_print_table_row(2, "Phar-based phar archives", "enabled");
php_info_print_table_row(2, "Tar-based phar archives", "enabled"); php_info_print_table_row(2, "Tar-based phar archives", "enabled");

View file

@ -800,7 +800,7 @@ PHP_MSHUTDOWN_FUNCTION(cli_readline)
PHP_MINFO_FUNCTION(cli_readline) PHP_MINFO_FUNCTION(cli_readline)
{ {
php_info_print_table_start(); php_info_print_table_start();
php_info_print_table_header(2, "Readline Support", "enabled"); php_info_print_table_row(2, "Readline Support", "enabled");
#ifdef PHP_WIN32 #ifdef PHP_WIN32
php_info_print_table_row(2, "Readline library", "WinEditLine"); php_info_print_table_row(2, "Readline library", "WinEditLine");
#else #else

View file

@ -58,7 +58,7 @@ PHP_RINIT_FUNCTION(%EXTNAME%)
PHP_MINFO_FUNCTION(%EXTNAME%) PHP_MINFO_FUNCTION(%EXTNAME%)
{ {
php_info_print_table_start(); php_info_print_table_start();
php_info_print_table_header(2, "%EXTNAME% support", "enabled"); php_info_print_table_row(2, "%EXTNAME% support", "enabled");
php_info_print_table_end(); php_info_print_table_end();
} }
/* }}} */ /* }}} */

View file

@ -184,7 +184,7 @@ PHP_MSHUTDOWN_FUNCTION(sodium)
PHP_MINFO_FUNCTION(sodium) PHP_MINFO_FUNCTION(sodium)
{ {
php_info_print_table_start(); php_info_print_table_start();
php_info_print_table_header(2, "sodium support", "enabled"); php_info_print_table_row(2, "sodium support", "enabled");
php_info_print_table_row(2, "libsodium headers version", SODIUM_VERSION_STRING); php_info_print_table_row(2, "libsodium headers version", SODIUM_VERSION_STRING);
php_info_print_table_row(2, "libsodium library version", sodium_version_string()); php_info_print_table_row(2, "libsodium library version", sodium_version_string());
php_info_print_table_end(); php_info_print_table_end();

View file

@ -670,7 +670,7 @@ PHP_MINFO_FUNCTION(spl)
char *strg; char *strg;
php_info_print_table_start(); php_info_print_table_start();
php_info_print_table_header(2, "SPL support", "enabled"); php_info_print_table_row(2, "SPL support", "enabled");
array_init(&list); array_init(&list);
SPL_LIST_CLASSES(&list, 0, 1, ZEND_ACC_INTERFACE) SPL_LIST_CLASSES(&list, 0, 1, ZEND_ACC_INTERFACE)

View file

@ -2406,7 +2406,7 @@ PHP_MSHUTDOWN_FUNCTION(sqlite3)
PHP_MINFO_FUNCTION(sqlite3) PHP_MINFO_FUNCTION(sqlite3)
{ {
php_info_print_table_start(); php_info_print_table_start();
php_info_print_table_header(2, "SQLite3 support", "enabled"); php_info_print_table_row(2, "SQLite3 support", "enabled");
php_info_print_table_row(2, "SQLite Library", sqlite3_libversion()); php_info_print_table_row(2, "SQLite Library", sqlite3_libversion());
php_info_print_table_end(); php_info_print_table_end();

View file

@ -804,7 +804,7 @@ static PHP_GSHUTDOWN_FUNCTION(zend_test)
PHP_MINFO_FUNCTION(zend_test) PHP_MINFO_FUNCTION(zend_test)
{ {
php_info_print_table_start(); php_info_print_table_start();
php_info_print_table_header(2, "zend_test extension", "enabled"); php_info_print_table_row(2, "zend_test extension", "enabled");
php_info_print_table_end(); php_info_print_table_end();
DISPLAY_INI_ENTRIES(); DISPLAY_INI_ENTRIES();

View file

@ -1404,7 +1404,7 @@ static PHP_RSHUTDOWN_FUNCTION(zlib)
static PHP_MINFO_FUNCTION(zlib) static PHP_MINFO_FUNCTION(zlib)
{ {
php_info_print_table_start(); php_info_print_table_start();
php_info_print_table_header(2, "ZLib Support", "enabled"); php_info_print_table_row(2, "ZLib Support", "enabled");
php_info_print_table_row(2, "Stream Wrapper", "compress.zlib://"); php_info_print_table_row(2, "Stream Wrapper", "compress.zlib://");
php_info_print_table_row(2, "Stream Filter", "zlib.inflate, zlib.deflate"); php_info_print_table_row(2, "Stream Filter", "zlib.inflate, zlib.deflate");
php_info_print_table_row(2, "Compiled Version", ZLIB_VERSION); php_info_print_table_row(2, "Compiled Version", ZLIB_VERSION);