diff --git a/ChangeLog b/ChangeLog index c36e68cdb..9a30d81c4 100755 --- a/ChangeLog +++ b/ChangeLog @@ -11,6 +11,8 @@ $Source$ * Almost everyting: Be valid XHTML (probably still not completely). 2004-04-27 Garvin Hicking + * libraries/display_tbl.lib.php: Bug #942392 - Wrapping sort order + link in a way that the image always belongs to the last word * libraries/display_tbl.lib.php: RFE #867284 - Click on result row to mark the checkbox. * tbl_select.php: RFE #940194 - Add REGEXP to table search options diff --git a/libraries/display_tbl.lib.php b/libraries/display_tbl.lib.php index ad1778af9..f4a304321 100644 --- a/libraries/display_tbl.lib.php +++ b/libraries/display_tbl.lib.php @@ -812,36 +812,33 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $ . '&sql_query=' . urlencode($sorted_sql_query); // 2.1.5 Displays the sorting url + $order_link_pre = ''; + $order_link_post = ''; + $order_link_content = ($disp_direction == 'horizontalflipped' && $GLOBALS['cfg']['HeaderFlipType'] == 'fake' ? PMA_flipstring(htmlspecialchars(PMA_convert_display_charset($fields_meta[$i]->name)), "
\n") : htmlspecialchars(PMA_convert_display_charset($fields_meta[$i]->name))); + $order_link_words = explode(' ', $order_link_content); + if (isset($order_link_words[1])) { + $order_last_word_index = count($order_link_words)-1; + $order_last_word = $order_link_words[$order_last_word_index]; + unset($order_link_words[$order_last_word_index]); + $order_link = $order_link_pre . implode(' ', $order_link_words) + . '
' . $order_last_word . $order_img . '
' . $order_link_post . "\n"; + } else { + $order_link = '
' . $order_link_pre . $order_link_content . $order_link_post . $order_img . '
' . "\n"; + } + if ($disp_direction == 'horizontal' || $disp_direction == 'horizontalflipped') { echo "\n"; ?> > - '; - - if ($disp_direction == 'horizontalflipped' && $GLOBALS['cfg']['HeaderFlipType'] == 'fake') { - echo PMA_flipstring(htmlspecialchars(PMA_convert_display_charset($fields_meta[$i]->name)), "
\n"); - } else { - echo htmlspecialchars(PMA_convert_display_charset($fields_meta[$i]->name)); - } - - echo ''; - echo $order_img . "\n"; - echo $comments_table_wrap_post; - ?> + + + ' . "\n" . $comments_table_wrap_pre - . ' ' - . htmlspecialchars($fields_meta[$i]->name) . '' . $order_img . "\n" + . $order_link . $comments_table_wrap_post . ' ' . "\n"; } // end if (2.1) @@ -1089,7 +1086,7 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) } } // end if (1.2.1) - if ($table == $GLOBALS['cfg']['Bookmark']['table'] && $db == $GLOBALS['cfg']['Bookmark']['db']) { + if ($table == $GLOBALS['cfg']['Bookmark']['table'] && $db == $GLOBALS['cfg']['Bookmark']['db'] && isset($row[1]) && isset($row[0])) { $bookmark_go = '