From 4c0b94af2e33d247f2a771de15556050af10140b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Chapeaux?= Date: Sun, 9 Sep 2001 16:43:23 +0000 Subject: [PATCH] o reson to display the "modify" link in $goto = main.php3 --- libraries/common.lib.php3 | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/libraries/common.lib.php3 b/libraries/common.lib.php3 index d084f2f02..86ab93bb7 100644 --- a/libraries/common.lib.php3 +++ b/libraries/common.lib.php3 @@ -699,7 +699,7 @@ if (!defined('__LIB_COMMON__')){ /** * Displays a message at the top of the "main" (right) frame * - * @param string the message to display + * @param string the message to display * * @access public */ @@ -723,7 +723,7 @@ window.parent.frames['nav'].location.replace(''); echo "\n"; ?>
- +

@@ -743,9 +743,16 @@ window.parent.frames['nav'].location.replace(''); $query_base = htmlspecialchars($GLOBALS['sql_query']); $query_base = ereg_replace("((\015\012)|(\015)|(\012))+", $new_line, $query_base); if (!isset($GLOBALS['show_query']) || $GLOBALS['show_query'] != 'y') { - if (isset($GLOBALS['goto']) && $GLOBALS['goto'] == 'tbl_properties.php3') { - $edit_link = '' . $GLOBALS['strEdit'] . ''; + if (!isset($GLOBALS['goto'])) { + $edit_target = (isset($GLOBALS['table'])) ? 'tbl_properties.php3' : 'db_details.php3'; + } else if ($GLOBALS['goto'] != 'main.php3') { + $edit_target = $GLOBALS['goto']; } else { + $edit_target = ''; + } + if ($edit_target == 'tbl_properties.php3') { + $edit_link = '' . $GLOBALS['strEdit'] . ''; + } else if ($edit_target != '') { $edit_link = '' . $GLOBALS['strEdit'] . ''; } echo ' ' . $GLOBALS['strSQLQuery'] . ' : [' . $edit_link . ']
' . "\n"; @@ -758,13 +765,6 @@ window.parent.frames['nav'].location.replace(''); if (!empty($GLOBALS['sql_limit_to_append'])) { echo $GLOBALS['sql_limit_to_append']; } - // loic1 : this was far to be optimal - // $is_append_limit = (isset($GLOBALS['pos']) - // && (eregi('^SELECT', $GLOBALS['sql_query']) && !eregi('^SELECT COUNT\((.*\.+)?\*\) FROM ', $GLOBALS['sql_query'])) - // && !eregi('LIMIT[ 0-9,]+$', $GLOBALS['sql_query'])); - // if ($is_append_limit) { - // echo ' LIMIT ' . $GLOBALS['pos'] . ', ' . $GLOBALS['cfgMaxRows']; - // } echo "\n"; ?>