diff --git a/ChangeLog b/ChangeLog index fffb859ed..9b2da390f 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,12 @@ phpMyAdmin - Changelog $Id$ $Source$ +2002-09-03 Loïc Chapeaux + * libraries/display_tbl.lib.php3: + - fix a PHP3 problem (foreach function was called); + - XHTML fixes; + - coding standards. + 2002-09-02 Marc Delisle * db_details_structure.php3, mult_submits.inc.php3: Patch 582904: add REPAIR TABLE choice in drop-down of db view, thanks to diff --git a/libraries/display_tbl.lib.php3 b/libraries/display_tbl.lib.php3 index dafc4e7bb..cb83d116c 100644 --- a/libraries/display_tbl.lib.php3 +++ b/libraries/display_tbl.lib.php3 @@ -704,6 +704,7 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')){ return TRUE; } // end of the 'PMA_displayTableHeaders()' function + /** * Displays a link, or a button if the link's URL is too large, to * accomodate some browsers' limitations @@ -714,28 +715,35 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')){ * * @return boolean always true */ - function PMA_linkOrButton($url, $message, $js_conf) - { - if (strlen($url)<=1024) {?> - - > -
" method="post"> - " value=""> + function PMA_linkOrButton($url, $message, $js_conf) + { + if (strlen($url) <= 1024) { + $onclick_url = (empty($js_conf) ? '' : ' onclick="return confirmLink(this, \'' . $js_conf . '\')"'); + echo ' ' . "\n" + . ' ' . $message . '' . "\n"; + } + else { + $edit_url_parts = parse_url($url); + $query_parts = explode('&', $edit_url_parts['query']); + ?> + + ' . "\n"; + } // end while + ?> +
- - - - - ' . "\n"; + PMA_linkOrButton($edit_url, $edit_str, ''); + echo ' ' . "\n"; } if (!empty($del_url)) { - echo "\n"; - ?> - - - - ' . "\n"; + PMA_linkOrButton($del_url, $del_str, (isset($js_conf) ? $js_conf : '')); + echo ' ' . "\n"; } } // end if (1.3) echo (($disp_direction == 'horizontal') ? "\n" : ''); @@ -1149,19 +1152,14 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')){ if ($GLOBALS['cfg']['ModifyDeleteAtRight'] && ($disp_direction == 'horizontal')) { if (!empty($edit_url)) { - ?> - - - - ' . "\n"; + PMA_linkOrButton($edit_url, $edit_str, ''); + echo ' ' . "\n"; } if (!empty($del_url)) { - echo "\n"; - ?> - - - - ' . "\n"; + PMA_linkOrButton($del_url, $del_str, (isset($js_conf) ? $js_conf : '')); + echo ' ' . "\n"; } } // end if (3)