1
0
mirror of https://github.com/phpmyadmin/phpmyadmin.git synced 2026-10-31 10:54:46 +03:00

Remove CSS odd class logic from PHP code

The odd/even class is no longer needed as it's done with CSS now.

Signed-off-by: Patric Gustafsson <patricjgustafsson@outlook.com>
This commit is contained in:
Patric Gustafsson
2016-08-16 14:13:59 +03:00
parent d7cb40bbb5
commit 83c205ab41
2 changed files with 6 additions and 9 deletions

View File

@@ -2746,8 +2746,6 @@ class DisplayResults
// table being displayed has one or more keys; but to display
// delete/edit options correctly for tables without keys.
$odd_row = true;
$whereClauseMap = $this->__get('whereClauseMap');
while ($row = $GLOBALS['dbi']->fetchRow($dt_result)) {
@@ -2767,11 +2765,10 @@ class DisplayResults
if ($GLOBALS['cfg']['BrowseMarkerEnable'] != true) {
$tr_class[] = 'nomarker';
}
$tr_class[] = ($odd_row ? 'odd' : 'even');
$odd_row = ! $odd_row;
// pointer code part
$table_body_html .= '<tr class="' . implode(' ', $tr_class) . '">';
$classes = (empty($tr_class) ? ' ' : 'class="' . implode(' ', $tr_class) . '"');
$table_body_html .= '<tr ' . $classes . ' >';
// 1. Prepares the row

View File

@@ -372,7 +372,7 @@ class DisplayResultsTest extends PMATestCase
array('`new`.`id`' => '= 1'),
'[%_PMA_CHECKBOX_DIR_%]',
'odd',
'<td class="odd" class="center print_ignore"><input type'
'<td class="center print_ignore"><input type'
. '="checkbox" id="id_rows_to_delete0[%_PMA_CHECKBOX_DIR_%]" name='
. '"rows_to_delete[0]" class="multi_checkbox checkall" value="%60'
. 'new%60.%60id%60+%3D+1" /><input type="hidden" class="condition_'
@@ -433,7 +433,7 @@ class DisplayResultsTest extends PMATestCase
. '"Edit" class="icon ic_b_edit" /> Edit</span>',
'`customer`.`id` = 1',
'%60customer%60.%60id%60+%3D+1',
'<td class="odd edit_row_anchor center print_ignore" >'
'<td class="edit_row_anchor center print_ignore" >'
. '<span class="nowrap">' . "\n"
. '<a href="tbl_change.php?db=Data&amp;table=customer&amp;where_'
. 'clause=%60customer%60.%60id%60+%3D+1&amp;clause_is_unique=1&amp;'
@@ -496,7 +496,7 @@ class DisplayResultsTest extends PMATestCase
'`customer`.`id` = 1',
'%60customer%60.%60id%60+%3D+1',
'odd',
'<td class="odd center print_ignore" ><span class='
'<td class="center print_ignore" ><span class='
. '"nowrap">' . "\n"
. '<a href="tbl_change.php?db=Data&amp;table=customer&amp;where_'
. 'clause=%60customer%60.%60id%60+%3D+1&amp;clause_is_unique=1&amp;'
@@ -560,7 +560,7 @@ class DisplayResultsTest extends PMATestCase
. 'alt="Delete" class="icon ic_b_drop" /> Delete</span>',
'DELETE FROM `Data`.`customer` WHERE `customer`.`id` = 1',
'odd',
'<td class="odd center print_ignore" >' . "\n"
'<td class="center print_ignore" >' . "\n"
. '<a href="sql.php?db=Data&amp;table=customer&amp;sql_query=DELETE'
. '+FROM+%60Data%60.%60customer%60+WHERE+%60customer%60.%60id%60+%3D'
. '+1&amp;message_to_show=The+row+has+been+deleted&amp;goto=sql.php'