bug #942374 - undefined indizes in left frame. Fixed some code issues.
This commit is contained in:
@@ -6,6 +6,9 @@ $Id$
|
||||
$Source$
|
||||
|
||||
2004-04-27 Garvin Hicking <pma@supergarv.de>
|
||||
* left.php: Fixed bug #942374 - Undefined indizes in left frame
|
||||
for light mode. Improved performance. Fixed tab-formatted code and
|
||||
adjusted to coding guidelines.
|
||||
* read_dump.php: Fixed bug #942390 - When entering a "USE database"
|
||||
query together with multiple other queries, the db was reset to
|
||||
the first one.
|
||||
|
34
left.php
34
left.php
@@ -356,28 +356,21 @@ if ($cfg['LeftDisplayServers']) {
|
||||
}
|
||||
|
||||
if ($cfg['LeftDisplayServersList']){
|
||||
|
||||
if ($selected){
|
||||
echo "» <b>$label</b><br />";
|
||||
if ($selected) {
|
||||
echo '» <b>' . $label . '</b><br />';
|
||||
}else{
|
||||
echo "» <a href=\"index.php?server=$key&lang=$lang&convcharset=$convcharset\" target=\"_top\">$label</a><br />";
|
||||
echo '» <a href="index.php?server=' . $key . '&lang=' . $lang . '&convcharset=' . $convcharset . '" target="_top">' . $label . '</a><br />';
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
echo " <option value=\"$key\"".($selected?' selected':'').">$label</option>\n";
|
||||
echo ' <option value="' . $key . '" ' . ($selected ? ' selected="selected"' : '') . '>' . $label . '</option>' . "\n";
|
||||
}
|
||||
|
||||
|
||||
} // end if (!empty($val['host']))
|
||||
} // end while
|
||||
|
||||
if ($cfg['LeftDisplayServersList']){
|
||||
?>
|
||||
|
||||
<br />
|
||||
|
||||
<?php
|
||||
}else{
|
||||
echo '<br />';
|
||||
} else {
|
||||
?>
|
||||
</select>
|
||||
<input type="hidden" name="lang" value="<?php echo $lang; ?>" />
|
||||
@@ -579,8 +572,11 @@ if ($num_dbs > 1) {
|
||||
|
||||
// Builds the databases' names list
|
||||
if (!empty($db_start) && $db == $db_start) {
|
||||
$table_title = array();
|
||||
$table_array = array();
|
||||
// Gets the list of tables from the current database
|
||||
while (list($table) = PMA_DBI_fetch_row($tables)) {
|
||||
$table_array[$table] = '';
|
||||
$url_title = (!empty($tooltip) && isset($tooltip[$table]))
|
||||
? htmlentities($tooltip[$table])
|
||||
: '';
|
||||
@@ -593,7 +589,6 @@ if ($num_dbs > 1) {
|
||||
// natural order or not, use an array for the table list
|
||||
|
||||
$table_array[$table] .= ' <nobr><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="images/button_smallbrowse.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') {
|
||||
@@ -606,14 +601,15 @@ if ($num_dbs > 1) {
|
||||
|
||||
} // end while (tables list)
|
||||
|
||||
if (count($table_title) > 0) {
|
||||
if ($cfg['NaturalOrder'] && $num_tables > 0) {
|
||||
natsort($table_title);
|
||||
}
|
||||
foreach (array_keys($table_title) as $each){
|
||||
$table_list .= " $table_array[$each]";
|
||||
}
|
||||
|
||||
if (!$table_list) {
|
||||
foreach($table_title as $each_key => $each_val) {
|
||||
$table_list .= ' ' . $table_array[$each_key];
|
||||
}
|
||||
} else {
|
||||
$table_list = ' <br /><br />' . "\n"
|
||||
. ' <div>' . $strNoTablesFound . '</div>' . "\n";
|
||||
}
|
||||
|
Reference in New Issue
Block a user