mirror of
https://github.com/php/php-src.git
synced 2025-01-20 10:43:40 +08:00
Extend print_table_row so that one can specify the CSS class
directly. Add "vr" class which aligns the content to the right border.
This commit is contained in:
parent
1939d27aca
commit
e4183ae980
@ -751,12 +751,12 @@ PHPAPI void php_info_print_table_header(int num_cols, ...)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ php_info_print_table_row
|
||||
/* {{{ php_info_print_table_row_internal
|
||||
*/
|
||||
PHPAPI void php_info_print_table_row(int num_cols, ...)
|
||||
static void php_info_print_table_row_internal(int num_cols,
|
||||
const char *value_class, va_list row_elements)
|
||||
{
|
||||
int i;
|
||||
va_list row_elements;
|
||||
char *row_element;
|
||||
char *elem_esc = NULL;
|
||||
/*
|
||||
@ -765,14 +765,13 @@ PHPAPI void php_info_print_table_row(int num_cols, ...)
|
||||
|
||||
TSRMLS_FETCH();
|
||||
|
||||
va_start(row_elements, num_cols);
|
||||
if (!sapi_module.phpinfo_as_text) {
|
||||
php_printf("<tr>");
|
||||
}
|
||||
for (i=0; i<num_cols; i++) {
|
||||
if (!sapi_module.phpinfo_as_text) {
|
||||
php_printf("<td class=\"%s\">",
|
||||
(i==0 ? "e" : "v" )
|
||||
(i==0 ? "e" : value_class )
|
||||
);
|
||||
}
|
||||
row_element = va_arg(row_elements, char *);
|
||||
@ -803,7 +802,30 @@ PHPAPI void php_info_print_table_row(int num_cols, ...)
|
||||
if (!sapi_module.phpinfo_as_text) {
|
||||
php_printf("</tr>\n");
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ php_info_print_table_row
|
||||
*/
|
||||
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);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ php_info_print_table_row_ex
|
||||
*/
|
||||
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);
|
||||
}
|
||||
/* }}} */
|
||||
|
@ -73,6 +73,7 @@ PHPAPI void php_info_print_style(TSRMLS_D);
|
||||
PHPAPI void php_info_print_table_colspan_header(int num_cols, char *header);
|
||||
PHPAPI void php_info_print_table_header(int num_cols, ...);
|
||||
PHPAPI void php_info_print_table_row(int num_cols, ...);
|
||||
PHPAPI void php_info_print_table_row_ex(int num_cols, const char *, ...);
|
||||
PHPAPI void php_info_print_table_start(void);
|
||||
PHPAPI void php_info_print_table_end(void);
|
||||
PHPAPI void php_info_print_box_start(int bg);
|
||||
|
Loading…
Reference in New Issue
Block a user