diff options
author | Alexander M. Turek <me@derrabus.de> | 2005-03-28 19:54:14 +0400 |
---|---|---|
committer | Alexander M. Turek <me@derrabus.de> | 2005-03-28 19:54:14 +0400 |
commit | 532c1ee25fc72bfa81f052676ffd6b3980e5ad11 (patch) | |
tree | 220b7af3b8758af20ac7d725920f5162b9761959 | |
parent | b66f210b7f99f5e71585441272cbb102868656bb (diff) |
Implemented the forgotten view icon.
-rwxr-xr-x | ChangeLog | 3 | ||||
-rw-r--r-- | left.php | 12 |
2 files changed, 10 insertions, 5 deletions
@@ -5,6 +5,9 @@ phpMyAdmin - Changelog $Id$ $Source$ +2005-03-28 Alexander M. Turek <me@derrabus.de> + * left.php: Implemented the forgotten view icon. + 2005-03-27 Marc Delisle <lem9@users.sourceforge.net> * lang/serbian: Updated, thanks to Mihailo Stefanovic (mikis). * libraries/relation.lib.php: bug #1170549, adding fields NOT NULL @@ -451,7 +451,7 @@ if ($num_dbs > 1) { if (!empty($db_start) && $db == $db_start) { $selected_db = $j; } - $tables = PMA_DBI_try_query('SHOW TABLES FROM ' . PMA_backquote($db) . ';', NULL, PMA_DBI_QUERY_STORE); + $tables = PMA_DBI_try_query('SHOW ' . (PMA_MYSQL_INT_VERSION >= 50000 ? 'FULL ' : '') . 'TABLES FROM ' . PMA_backquote($db) . ';', NULL, PMA_DBI_QUERY_STORE); $num_tables = ($tables) ? @PMA_DBI_num_rows($tables) : 0; $common_url_query = PMA_generate_common_url($db); if ($num_tables) { @@ -517,11 +517,13 @@ if ($num_dbs > 1) { // Displays the list of tables from the current database $tablestack = array(); $table_array = array(); - while (list($table) = PMA_DBI_fetch_row($tables)) { + $table_types = array(); + while (list($table, $type) = PMA_DBI_fetch_row($tables)) { $table_item = (!empty($tooltip_name) && isset($tooltip_name[$table]) && !empty($tooltip_name[$table]) && $cfg['ShowTooltipAliasTB'] && strtolower($cfg['ShowTooltipAliasTB']) !== 'nested' ? htmlspecialchars($tooltip_name[$table]) : htmlspecialchars($table)); $table_array[$table] = $table_item; + $table_types[$table] = empty($type) ? 'BASE TABLE' : $type; } if ($cfg['NaturalOrder']) { @@ -546,7 +548,7 @@ if ($num_dbs > 1) { $book_sql_query = (isset($book_sql_cache[$table]) ? $book_sql_cache[$table] : FALSE); $list_item = '<a target="phpmain' . $hash . '" href="sql.php?' . $common_url_query . '&table=' . urlencode($table) . '&sql_query=' . (isset($book_sql_query) && $book_sql_query != FALSE ? urlencode($book_sql_query) : urlencode('SELECT * FROM ' . PMA_backquote($table))) . '&pos=0&goto=' . $cfg['DefaultTabTable'] . '" title="' . $strBrowse . ': ' . $url_title . '">'; - $list_item .= '<img src="' . $pmaThemeImage . 'b_sbrowse.png" width="10" height="10" border="0" alt="' . $strBrowse . ': ' . $url_title . '" /></a>'; + $list_item .= '<img src="' . $pmaThemeImage . ($table_types[$table] == 'VIEW' ? 's_views' : 'b_sbrowse') . '.png" width="10" height="10" border="0" alt="' . $strBrowse . ': ' . $url_title . '" /></a>'; $list_item .= '<bdo dir="' . $text_dir . '"> </bdo>' . "\n"; $list_item .= '<a class="tblItem" id="tbl_' . md5($table) . '" title="' . $url_title . '" target="phpmain' . $hash . '" href="' . $cfg['DefaultTabTable'] . '?' . $common_url_query . '&table=' . urlencode($table) . '">'; $list_item .= $table_item . '</a><br />' . "\n"; @@ -594,7 +596,7 @@ if ($num_dbs > 1) { $table_array = array(); // Gets the list of tables from the current database $book_sql_cache = PMA_queryDBBookmarks($db, $cfg['Bookmark'], $table_array); - while (list($table) = PMA_DBI_fetch_row($tables)) { + while (list($table, $type) = PMA_DBI_fetch_row($tables)) { $table_array[$table] = ''; $url_title = (!empty($tooltip) && isset($tooltip[$table])) ? htmlspecialchars($tooltip[$table]) @@ -608,7 +610,7 @@ if ($num_dbs > 1) { // natural order or not, use an array for the table list $table_array[$table] .= ' <div class="nowrap"><a target="phpmain' . $hash . '" href="sql.php?' . $common_url_query . '&table=' . urlencode($table) . '&sql_query=' . (isset($book_sql_query) && $book_sql_query != FALSE ? urlencode($book_sql_query) : urlencode('SELECT * FROM ' . PMA_backquote($table))) . '&pos=0&goto=' . $cfg['DefaultTabTable'] . '">' . "\n"; - $table_array[$table] .= ' <img src="' . $pmaThemeImage . 'b_sbrowse.png" width="10" height="10" border="0" alt="' . $strBrowse . ': ' . $url_title . '" title="' . $strBrowse . ': ' . $url_title . '" /></a><bdo dir="' . $text_dir . '"> </bdo>' . "\n"; + $table_array[$table] .= ' <img src="' . $pmaThemeImage . (!empty($type) && $type == 'VIEW' ? 's_views' : 'b_sbrowse') . '.png" width="10" height="10" border="0" alt="' . $strBrowse . ': ' . $url_title . '" title="' . $strBrowse . ': ' . $url_title . '" /></a><bdo dir="' . $text_dir . '"> </bdo>' . "\n"; if (PMA_USR_BROWSER_AGENT == 'IE') { $table_array[$table] .= ' <span class="tblItem"><a class="tblItem" id="tbl_' . md5($table) . '" title="' . $url_title . '" target="phpmain' . $hash . '" href="' . $cfg['DefaultTabTable'] . '?' . $common_url_query . '&table=' . urlencode($table) . '">' . ($alias != '' && $cfg['ShowTooltipAliasTB'] ? $alias : htmlspecialchars($table)) . '</a></span></div>' . "\n"; |