From 7bf1edfa09385c2e361819dfa5cecd57db9e619b Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Tue, 3 Sep 2002 01:47:53 +0000 Subject: [PATCH] large edit and delete links --- ChangeLog | 4 +++ libraries/display_tbl.lib.php3 | 46 ++++++++++++++++++++++++++-------- 2 files changed, 40 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index c10724776..fffb859ed 100755 --- a/ChangeLog +++ b/ChangeLog @@ -9,6 +9,10 @@ $Source$ * db_details_structure.php3, mult_submits.inc.php3: Patch 582904: add REPAIR TABLE choice in drop-down of db view, thanks to Cal Henderson (iamcal) + * libraries/display_tbl.lib.php3: new function PMA_linkOrButton + to accomodate some browsers' limitations on the URL length, used on + left and right Edit and Delete links (or buttons), idea + and part of the code from patch 591497, thanks to Ruben Barkow (rubo77) 2002-09-01 Loïc Chapeaux * libraries/auth/cookie.auth.lib.php3: bug 601721 (cookie and IIS) diff --git a/libraries/display_tbl.lib.php3 b/libraries/display_tbl.lib.php3 index f027b8c09..dafc4e7bb 100644 --- a/libraries/display_tbl.lib.php3 +++ b/libraries/display_tbl.lib.php3 @@ -704,6 +704,38 @@ 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 + * + * @param string the URL + * @param string the link message + * @param string js confirmation + * + * @return boolean always true + */ + function PMA_linkOrButton($url, $message, $js_conf) + { + if (strlen($url)<=1024) {?> + + > +
" method="post"> + " value=""> +
+ - - + - > - + - - + - > - +