From c5ab6175cd6bb99c7960ab2785bb8c756b14124b Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Mon, 30 Aug 2010 13:28:51 -0400 Subject: [PATCH] table name should be displayed on top --- libraries/header.inc.php | 69 ++++++++++++++++++++-------------------- 1 file changed, 35 insertions(+), 34 deletions(-) diff --git a/libraries/header.inc.php b/libraries/header.inc.php index 448f1c005..33531ea6e 100644 --- a/libraries/header.inc.php +++ b/libraries/header.inc.php @@ -127,51 +127,52 @@ if (!$GLOBALS['is_ajax_request']) { // if the table is being dropped, $_REQUEST['purge'] is set // (it always contains "1") // so do not display the table name in upper div - } elseif (strlen($GLOBALS['table']) && ! (isset($_REQUEST['purge']))) { - require_once './libraries/tbl_info.inc.php'; + if (strlen($GLOBALS['table']) && ! (isset($_REQUEST['purge']))) { + require_once './libraries/tbl_info.inc.php'; - echo $separator; - printf($item, + echo $separator; + printf($item, $GLOBALS['cfg']['DefaultTabTable'], PMA_generate_common_url($GLOBALS['db'], $GLOBALS['table']), str_replace(' ', ' ', htmlspecialchars($GLOBALS['table'])), (isset($GLOBALS['tbl_is_view']) && $GLOBALS['tbl_is_view'] ? __('View') : __('Table')), (isset($GLOBALS['tbl_is_view']) && $GLOBALS['tbl_is_view'] ? 'b_views' : 's_tbl') . '.png'); - /** - * Displays table comment - * @uses $show_comment from libraries/tbl_info.inc.php - * @uses $GLOBALS['avoid_show_comment'] from tbl_relation.php - */ - if (!empty($show_comment) && !isset($GLOBALS['avoid_show_comment'])) { - if (strstr($show_comment, '; InnoDB free')) { - $show_comment = preg_replace('@; InnoDB free:.*?$@', '', $show_comment); - } - echo '' - .'"' . htmlspecialchars($show_comment) - .'"' . "\n"; - } // end if - } else { - // no table selected, display database comment if present - /** - * Settings for relations stuff - */ - require_once './libraries/relation.lib.php'; - $cfgRelation = PMA_getRelationsParam(); - - // Get additional information about tables for tooltip is done - // in libraries/db_info.inc.php only once - if ($cfgRelation['commwork']) { - $comment = PMA_getDbComment($GLOBALS['db']); /** * Displays table comment + * @uses $show_comment from libraries/tbl_info.inc.php + * @uses $GLOBALS['avoid_show_comment'] from tbl_relation.php */ - if (! empty($comment)) { - echo '"' - . htmlspecialchars($comment) - . '"' . "\n"; + if (!empty($show_comment) && !isset($GLOBALS['avoid_show_comment'])) { + if (strstr($show_comment, '; InnoDB free')) { + $show_comment = preg_replace('@; InnoDB free:.*?$@', '', $show_comment); + } + echo '' + .'"' . htmlspecialchars($show_comment) + .'"' . "\n"; } // end if + } else { + // no table selected, display database comment if present + /** + * Settings for relations stuff + */ + require_once './libraries/relation.lib.php'; + $cfgRelation = PMA_getRelationsParam(); + + // Get additional information about tables for tooltip is done + // in libraries/db_info.inc.php only once + if ($cfgRelation['commwork']) { + $comment = PMA_getDbComment($GLOBALS['db']); + /** + * Displays table comment + */ + if (! empty($comment)) { + echo '"' + . htmlspecialchars($comment) + . '"' . "\n"; + } // end if + } } } }