diff --git a/ChangeLog b/ChangeLog index 0fb894b16..413c97738 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,10 @@ phpMyAdmin - Changelog $Id$ $Source$ +2005-02-06 Alexander M. Turek + * header.inc.php, tbl_properties_table_info.php: View detection for + header.inc.php. + 2005-02-05 Marc Delisle * tbl_relation.php: removed comments handling (pmadb-style) from relation view diff --git a/header.inc.php b/header.inc.php index 1a3a3ffe3..144532f8e 100644 --- a/header.inc.php +++ b/header.inc.php @@ -192,12 +192,17 @@ if (empty($GLOBALS['is_header_sent'])) { . '' . "\n\n"; if (!empty($GLOBALS['table'])) { + if (PMA_MYSQL_INT_VERSION >= 50000) { + require_once('./tbl_properties_table_info.php'); + } else { + $tbl_is_view = FALSE; + } echo ' ' . '
' . "\n" . ' ' - . '' . $GLOBALS['strTable'] . ': ' + . '' . ($GLOBALS['tbl_is_view'] ? $GLOBALS['strView'] : $GLOBALS['strTable']) . ': ' . ''; if ($GLOBALS['cfg']['MainPageIconic']) { - echo '' . htmlspecialchars($GLOBALS['table']) . ''; + echo '' . htmlspecialchars($GLOBALS['table']) . ''; } echo htmlspecialchars($GLOBALS['table']) . '' . "\n" . '' . "\n\n"; diff --git a/tbl_properties_table_info.php b/tbl_properties_table_info.php index 220223cc5..38ac81e4b 100644 --- a/tbl_properties_table_info.php +++ b/tbl_properties_table_info.php @@ -11,6 +11,13 @@ require_once('./libraries/common.lib.php'); PMA_checkParameters(array('db', 'table')); +/** + * Defining global variables, in case this script is included by a function. + * This is necessary because this script can be included by header.inc.php. + */ +global $showtable, $tbl_is_view, $tbl_type, $show_comment, $tbl_collation, + $table_info_num_rows, $auto_increment; + /** * Gets table informations */ @@ -29,7 +36,7 @@ if (PMA_MYSQL_INT_VERSION >= 50000 && !isset($showtable['Type']) && isset($showt $tbl_type = isset($showtable['Type']) ? strtoupper($showtable['Type']) : ''; $show_comment = (isset($showtable['Comment']) ? $showtable['Comment'] : ''); } -$tbl_collation = empty($showtable['Collation']) ? '' : $showtable['Collation']; +$tbl_collation = empty($showtable['Collation']) ? '' : $showtable['Collation']; $table_info_num_rows = (isset($showtable['Rows']) ? $showtable['Rows'] : 0); $auto_increment = (isset($showtable['Auto_increment']) ? $showtable['Auto_increment'] : '');