From 7eafab8a29f41699b874cc29acde47504e2c3a85 Mon Sep 17 00:00:00 2001 From: Garvin Hicking Date: Wed, 12 Mar 2003 21:23:36 +0000 Subject: [PATCH] RFE #550554 - execute bookmarks when browsing this table. --- ChangeLog | 4 ++++ db_details_structure.php3 | 2 +- libraries/display_tbl.lib.php3 | 26 ++++++++++++++++++++------ 3 files changed, 25 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1b99f20ff..fad41d5f6 100755 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,10 @@ $Id$ $Source$ 2003-03-12 Garvin Hicking + * db_details_structure.php3: When using Alias-Displays for Tables, fix bug when a tablename + was not displayed if it has no comment. + * libraries/display_tbl.lib.php3 RFE #550554 - Execute SQL bookmarks when browsing the + bookmarktable. * db_details_structure.php, left.php3, tbl_properties_links.php3, libraries/bookmark.lib.php3: RFE #550552: Change default initial query for browse mode, if a bookmark with the same label as the tablename is found. diff --git a/db_details_structure.php3 b/db_details_structure.php3 index 4e6e575bb..d2ad573aa 100644 --- a/db_details_structure.php3 +++ b/db_details_structure.php3 @@ -61,7 +61,7 @@ else if (PMA_MYSQL_INT_VERSION >= 32303) { $result = PMA_mysql_query('SHOW TABLE STATUS FROM ' . PMA_backquote($db)); while ($tmp = PMA_mysql_fetch_array($result)) { - $tooltip_truename[$tmp['Name']] = ($cfg['ShowTooltipAliasTB'] ? (!empty($tmp['Comment']) ? $tmp['Comment'] . ' ' : '') : $tmp['Name']); + $tooltip_truename[$tmp['Name']] = ($cfg['ShowTooltipAliasTB'] ? (!empty($tmp['Comment']) ? $tmp['Comment'] . ' ' : $tmp['Name']) : $tmp['Name']); $tooltip_aliasname[$tmp['Name']] = ($cfg['ShowTooltipAliasTB'] ? $tmp['Name'] : (!empty($tmp['Comment']) ? $tmp['Comment'] . ' ' : '')); } // end while } // end if diff --git a/libraries/display_tbl.lib.php3 b/libraries/display_tbl.lib.php3 index b1ee56abd..475f55a0c 100644 --- a/libraries/display_tbl.lib.php3 +++ b/libraries/display_tbl.lib.php3 @@ -943,6 +943,17 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')) { $edit_str = $GLOBALS['strEdit']; } // end if (1.2.1) + if ($table == $GLOBALS['cfg']['Bookmark']['table'] && $db == $GLOBALS['cfg']['Bookmark']['db']) { + $bookmark_go = '
' + . PMA_generate_common_hidden_inputs($row['dbase'], '') + . '' + . '' + . '' + . '
'; + } else { + $bookmark_go = ''; + } + // 1.2.2 Delete/Kill link(s) if ($is_display['del_lnk'] == 'dr') { // delete row case $lnk_goto = 'sql.php3' @@ -976,12 +987,13 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')) { if ($GLOBALS['cfg']['ModifyDeleteAtLeft'] && ($disp_direction == 'horizontal' || $disp_direction == 'horizontalflipped')) { if (!empty($edit_url)) { - echo ' ' . "\n"; + echo ' ' . "\n"; echo PMA_linkOrButton($edit_url, $edit_str, ''); + echo $bookmark_go; echo ' ' . "\n"; } if (!empty($del_url)) { - echo ' ' . "\n"; + echo ' ' . "\n"; echo PMA_linkOrButton($del_url, $del_str, (isset($js_conf) ? $js_conf : '')); echo ' ' . "\n"; } @@ -1236,12 +1248,13 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')) { if ($GLOBALS['cfg']['ModifyDeleteAtRight'] && ($disp_direction == 'horizontal' || $disp_direction == 'horizontalflipped')) { if (!empty($edit_url)) { - echo ' ' . "\n"; + echo ' ' . "\n"; echo PMA_linkOrButton($edit_url, $edit_str, ''); + echo $bookmark_go; echo ' ' . "\n"; } if (!empty($del_url)) { - echo ' ' . "\n"; + echo ' ' . "\n"; echo PMA_linkOrButton($del_url, $del_str, (isset($js_conf) ? $js_conf : '')); echo ' ' . "\n"; } @@ -1262,13 +1275,14 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')) { } if (isset($edit_url)) { - $vertical_display['edit'][$row_no] .= ' ' . "\n" + $vertical_display['edit'][$row_no] .= ' ' . "\n" . PMA_linkOrButton($edit_url, $edit_str, '') + . $bookmark_go . ' ' . "\n"; } if (isset($del_url)) { - $vertical_display['delete'][$row_no] .= ' ' . "\n" + $vertical_display['delete'][$row_no] .= ' ' . "\n" . PMA_linkOrButton($del_url, $del_str, (isset($js_conf) ? $js_conf : '')) . ' ' . "\n"; }