diff --git a/db_datadict.php b/db_datadict.php
index 9e74204771..4586895bef 100644
--- a/db_datadict.php
+++ b/db_datadict.php
@@ -123,7 +123,6 @@ foreach ($tables as $table) {
echo '
MIME ' , "\n";
}
echo '';
- $odd_row = true;
foreach ($columns as $row) {
if ($row['Null'] == '') {
@@ -146,9 +145,7 @@ foreach ($tables as $table) {
}
$column_name = $row['Field'];
- echo '';
+ echo ' ';
echo '';
echo htmlspecialchars($column_name);
diff --git a/db_export.php b/db_export.php
index 316c7523f7..5eb9deeafb 100644
--- a/db_export.php
+++ b/db_export.php
@@ -90,7 +90,6 @@ foreach (array('table_select', 'table_structure', 'table_data') as $one_key) {
}
}
-$odd = true;
foreach ($tables as $each_table) {
if (isset($_GET['table_select']) && is_array($_GET['table_select'])) {
$is_checked = PMA_getCheckedClause(
@@ -118,7 +117,7 @@ foreach ($tables as $each_table) {
$data_checked = $is_checked;
}
$table_html = htmlspecialchars($each_table['Name']);
- $multi_values .= ' ';
+ $multi_values .= ' ';
$multi_values .= ' ';
$multi_values .= ''
@@ -130,7 +129,6 @@ foreach ($tables as $each_table) {
. ' ';
$multi_values .= ' ';
- $odd = ! $odd;
} // end for
$multi_values .= "\n";
diff --git a/libraries/display_change_password.lib.php b/libraries/display_change_password.lib.php
index 33834d45f5..7639906be2 100644
--- a/libraries/display_change_password.lib.php
+++ b/libraries/display_change_password.lib.php
@@ -49,7 +49,7 @@ function PMA_getHtmlForChangePassword($mode, $username, $hostname)
)
. '>' . __('Change password') . ''
. '';
}
diff --git a/libraries/navigation/Navigation.php b/libraries/navigation/Navigation.php
index 8bf54cbae3..31ed3f5a27 100644
--- a/libraries/navigation/Navigation.php
+++ b/libraries/navigation/Navigation.php
@@ -205,7 +205,6 @@ class Navigation
$html .= (! $first ? ' ' : '')
. '' . $lable . ' ';
$html .= '';
- $odd = true;
foreach ($hidden[$t] as $hiddenItem) {
$params = array(
'unhideNavItem' => true,
@@ -214,14 +213,13 @@ class Navigation
'dbName' => $dbName
);
- $html .= '';
+ $html .= ' ';
$html .= '' . htmlspecialchars($hiddenItem) . ' ';
$html .= ''
. Util::getIcon('show.png', __('Show'))
. ' ';
- $odd = ! $odd;
}
$html .= '
';
$first = false;
diff --git a/libraries/rte/rte_list.lib.php b/libraries/rte/rte_list.lib.php
index e318655d73..8e9532c812 100644
--- a/libraries/rte/rte_list.lib.php
+++ b/libraries/rte/rte_list.lib.php
@@ -120,9 +120,10 @@ function PMA_RTE_getList($type, $items)
$retval .= " \n";
$count = 0;
foreach ($items as $item) {
- $rowclass = ($count % 2 == 0) ? 'odd' : 'even';
if ($GLOBALS['is_ajax_request'] && empty($_REQUEST['ajax_page_request'])) {
- $rowclass .= ' ajaxInsert hide';
+ $rowclass = 'ajaxInsert hide';
+ } else {
+ $rowclass = '';
}
// Get each row from the correct function
switch ($type) {
@@ -174,7 +175,7 @@ function PMA_RTE_getList($type, $items)
* Creates the contents for a row in the list of routines
*
* @param array $routine An array of routine data
- * @param string $rowclass Empty or one of ['even'|'odd']
+ * @param string $rowclass Additional class
*
* @return string HTML code of a row for the list of routines
*/
@@ -327,7 +328,7 @@ function PMA_RTN_getRowForList($routine, $rowclass = '')
* Creates the contents for a row in the list of triggers
*
* @param array $trigger An array of routine data
- * @param string $rowclass Empty or one of ['even'|'odd']
+ * @param string $rowclass Additional class
*
* @return string HTML code of a cell for the list of triggers
*/
@@ -406,7 +407,7 @@ function PMA_TRI_getRowForList($trigger, $rowclass = '')
* Creates the contents for a row in the list of events
*
* @param array $event An array of routine data
- * @param string $rowclass Empty or one of ['even'|'odd']
+ * @param string $rowclass Additional class
*
* @return string HTML code of a cell for the list of events
*/
diff --git a/libraries/rte/rte_routines.lib.php b/libraries/rte/rte_routines.lib.php
index 642f1c6d4a..8db7906950 100644
--- a/libraries/rte/rte_routines.lib.php
+++ b/libraries/rte/rte_routines.lib.php
@@ -1423,11 +1423,8 @@ function PMA_RTN_handleExecute()
}
$output .= "";
- $color_class = 'odd';
-
while ($row = $GLOBALS['dbi']->fetchAssoc($result)) {
- $output .= "" . browseRow($row, $color_class) . " ";
- $color_class = ($color_class == 'odd') ? 'even' : 'odd';
+ $output .= "" . browseRow($row) . " ";
}
$output .= "";
@@ -1554,7 +1551,7 @@ function PMA_RTN_handleExecute()
*
* @return string
*/
-function browseRow($row, $color_class)
+function browseRow($row)
{
$output = null;
foreach ($row as $value) {
@@ -1626,8 +1623,7 @@ function PMA_RTN_getExecuteForm($routine)
) {
continue;
}
- $rowclass = ($i % 2 == 0) ? 'even' : 'odd';
- $retval .= "\n\n";
+ $retval .= "\n \n";
$retval .= "{$routine['item_param_name'][$i]} \n";
$retval .= "{$routine['item_param_type'][$i]} \n";
if ($cfg['ShowFunctionFields']) {
diff --git a/libraries/server_user_groups.lib.php b/libraries/server_user_groups.lib.php
index 6df990fae9..d10f638ed4 100644
--- a/libraries/server_user_groups.lib.php
+++ b/libraries/server_user_groups.lib.php
@@ -81,7 +81,6 @@ function PMA_getHtmlForUserGroupsTable()
$html_output .= ' ';
$html_output .= '';
- $odd = true;
$userGroups = array();
while ($row = $GLOBALS['dbi']->fetchAssoc($result)) {
$groupName = $row['usergroup'];
@@ -91,7 +90,7 @@ function PMA_getHtmlForUserGroupsTable()
$userGroups[$groupName][$row['tab']] = $row['allowed'];
}
foreach ($userGroups as $groupName => $tabs) {
- $html_output .= '';
+ $html_output .= ' ';
$html_output .= '' . htmlspecialchars($groupName) . ' ';
$html_output .= '' . _getAllowedTabNames($tabs, 'server') . ' ';
$html_output .= '' . _getAllowedTabNames($tabs, 'db') . ' ';
@@ -129,8 +128,6 @@ function PMA_getHtmlForUserGroupsTable()
$html_output .= '';
$html_output .= ' ';
-
- $odd = ! $odd;
}
$html_output .= ' ';
diff --git a/libraries/tracking.lib.php b/libraries/tracking.lib.php
index d038fac658..0fc5654f79 100644
--- a/libraries/tracking.lib.php
+++ b/libraries/tracking.lib.php
@@ -290,7 +290,6 @@ function PMA_getHtmlForTableVersionDetails(
$html .= '';
$html .= '';
- $style = 'odd';
$GLOBALS['dbi']->dataSeek($sql_result, 0);
$delete = PMA\libraries\Util::getIcon('b_drop.png', __('Delete version'));
$report = PMA\libraries\Util::getIcon('b_report.png', __('Tracking report'));
@@ -312,7 +311,7 @@ function PMA_getHtmlForTableVersionDetails(
. '&submit_delete_version=true';
$checkbox_id = 'selected_versions_' . htmlspecialchars($version['version']);
- $html .= '';
+ $html .= ' ';
$html .= '';
$html .= ' ';
$html .= ' ';
$html .= ' ';
-
- if ($style == 'even') {
- $style = 'odd';
- } else {
- $style = 'even';
- }
}
$html .= ' ';
@@ -708,7 +701,6 @@ function PMA_getHtmlForDataManipulationStatements($data, $filter_users,
* @param array $filter_users filter users
* @param int $filter_ts_from filter time stamp from
* @param int $filter_ts_to filter time stamp to
- * @param string $style style
* @param int $line_number line number
* @param array $url_params url parameters
* @param int $offset line number offset
@@ -718,7 +710,7 @@ function PMA_getHtmlForDataManipulationStatements($data, $filter_users,
* @return string
*/
function PMA_getHtmlForOneStatement($entry, $filter_users,
- $filter_ts_from, $filter_ts_to, $style, $line_number, $url_params, $offset,
+ $filter_ts_from, $filter_ts_to, $line_number, $url_params, $offset,
$drop_image_or_text, $delete_param
) {
$statement = PMA\libraries\Util::formatSql($entry['statement'], true);
@@ -730,7 +722,7 @@ function PMA_getHtmlForOneStatement($entry, $filter_users,
&& $timestamp <= $filter_ts_to
&& (in_array('*', $filter_users) || $filtered_user)
) {
- $html = '';
+ $html = ' ';
$html .= '' . $line_number . ' ';
$html .= ''
. htmlspecialchars($entry['date']) . ' ';
@@ -811,18 +803,12 @@ function PMA_getHtmlForDataStatements($data, $filter_users,
$html .= '';
$html .= ' ';
- $style = 'odd';
foreach ($data[$which_log] as $entry) {
$html .= PMA_getHtmlForOneStatement(
- $entry, $filter_users, $filter_ts_from, $filter_ts_to, $style,
+ $entry, $filter_users, $filter_ts_from, $filter_ts_to,
$line_number, $url_params, $offset, $drop_image_or_text,
'delete_' . $which_log
);
- if ($style == 'even') {
- $style = 'odd';
- } else {
- $style = 'even';
- }
$line_number++;
}
$html .= ' ';
@@ -905,15 +891,9 @@ function PMA_getHtmlForColumns($columns)
$html .= '';
$html .= '';
$html .= '';
- $style = 'odd';
$index = 1;
foreach ($columns as $field) {
- $html .= PMA_getHtmlForField($index++, $field, $style);
- if ($style == 'even') {
- $style = 'odd';
- } else {
- $style = 'even';
- }
+ $html .= PMA_getHtmlForField($index++, $field);
}
$html .= ' ';
@@ -927,13 +907,12 @@ function PMA_getHtmlForColumns($columns)
*
* @param int $index index
* @param array $field field
- * @param string $style style
*
* @return string
*/
-function PMA_getHtmlForField($index, $field, $style)
+function PMA_getHtmlForField($index, $field)
{
- $html = '';
+ $html = ' ';
$html .= '' . $index . ' ';
$html .= '' . htmlspecialchars($field['Field']);
if ($field['Key'] == 'PRI') {
@@ -1001,14 +980,8 @@ function PMA_getHtmlForIndexes($indexes)
$html .= ' ';
$html .= '';
- $style = 'odd';
foreach ($indexes as $index) {
- $html .= PMA_getHtmlForIndex($index, $style);
- if ($style == 'even') {
- $style = 'odd';
- } else {
- $style = 'even';
- }
+ $html .= PMA_getHtmlForIndex($index);
}
$html .= ' ';
$html .= '';
@@ -1019,11 +992,10 @@ function PMA_getHtmlForIndexes($indexes)
* Function to get html for an index in schema snapshot
*
* @param array $index index
- * @param string $style style
*
* @return string
*/
-function PMA_getHtmlForIndex($index, $style)
+function PMA_getHtmlForIndex($index)
{
if ($index['Non_unique'] == 0) {
$str_unique = __('Yes');
@@ -1036,7 +1008,7 @@ function PMA_getHtmlForIndex($index, $style)
$str_packed = __('No');
}
- $html = '';
+ $html = ' ';
$html .= '' . htmlspecialchars($index['Key_name']) . ' ';
$html .= '' . htmlspecialchars($index['Index_type']) . ' ';
$html .= '' . $str_unique . ' ';
@@ -1486,9 +1458,8 @@ function PMA_displayUntrackedTables(
$tablename) {
- $style = PMA_displayOneUntrackedTable($db, $tablename, $url_query, $style);
+ PMA_displayOneUntrackedTable($db, $tablename, $url_query);
}
?>
@@ -1517,11 +1488,10 @@ function PMA_displayUntrackedTables(
* @param string $db current database
* @param string $tablename the table name for which to display a line
* @param string $url_query url query string
- * @param string $style odd|even
*
- * @return string $style changed style (even|odd)
+ * @return void
*/
-function PMA_displayOneUntrackedTable($db, $tablename, $url_query, $style)
+function PMA_displayOneUntrackedTable($db, $tablename, $url_query)
{
$checkbox_id = "selected_tbl_"
. htmlspecialchars($tablename);
@@ -1531,7 +1501,7 @@ function PMA_displayOneUntrackedTable($db, $tablename, $url_query, $style)
$my_link .= PMA\libraries\Util::getIcon('eye.png', __('Track table'));
$my_link .= '';
?>
-
+
fetchArray($all_tables_result)) {
list($table_name, $version_number) = $one_result;
$table_query = ' SELECT * FROM ' .
@@ -1672,7 +1635,7 @@ function PMA_displayTrackedTables(
$checkbox_id = "selected_tbl_"
. htmlspecialchars($version_data['table_name']);
?>
-
+
' , $structure , ''
, ' '
, ' ';
- if ($style == 'even') {
- $style = 'odd';
- } else {
- $style = 'even';
- }
}
?>