refresh left frame on view creation
This commit is contained in:
@@ -5,6 +5,9 @@ phpMyAdmin - Changelog
|
||||
$Id$
|
||||
$Source$
|
||||
|
||||
2005-10-19 Sebastian Mendel <cybot_tm@users.sourceforge.net>
|
||||
* sql.php, footer.inc.php: refresh left frame on view creation
|
||||
|
||||
2005-10-19 Alexander M. Turek <me@derrabus.de>
|
||||
* lang/*.inc.php, libraries/mysql_charsets.lib.php: Correct description
|
||||
for collations utf8_esperanto_ci, ucs2_esperanto_ci.
|
||||
|
@@ -21,14 +21,18 @@ if ( $cfg['QueryFrame'] && $cfg['QueryFrameJS'] ) {
|
||||
<?php
|
||||
if (!isset($no_history) && !empty($db) && (!isset($error_message) || $error_message == '')) {
|
||||
$table = isset( $table ) ? $table : '';
|
||||
// updates current settings
|
||||
?>
|
||||
// sets selection in left frame quick db selectbox to current db
|
||||
window.parent.setAll( '<?php echo $lang; ?>', '<?php echo $collation_connection; ?>', '<?php echo $server; ?>', '<?php echo $db; ?>', '<?php echo $table; ?>' );
|
||||
window.parent.setAll( '<?php echo $lang; ?>', '<?php echo $collation_connection; ?>', '<?php echo $server; ?>', '<?php echo $db; ?>', '<?php echo $table; ?>' );
|
||||
<?php
|
||||
}
|
||||
|
||||
if ( ! empty( $reload ) ) {
|
||||
?>
|
||||
window.parent.refreshLeft();
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
if ( ! isset( $no_history ) && empty( $error_message ) ) {
|
||||
if ( isset( $LockFromUpdate ) && $LockFromUpdate == '1' && isset( $sql_query ) ) {
|
||||
// When the button 'LockFromUpdate' was selected in the querywindow,
|
||||
@@ -42,20 +46,18 @@ if ( $cfg['QueryFrame'] && $cfg['QueryFrameJS'] ) {
|
||||
}
|
||||
}
|
||||
?>
|
||||
window.parent.reload_querywindow(
|
||||
"<?php echo isset( $db ) ? addslashes( $db ) : '' ?>",
|
||||
"<?php echo isset( $table ) ? addslashes( $table ) : '' ?>",
|
||||
"<?php echo isset( $sql_query ) ? urlencode( $sql_query ) : ''; ?>" );
|
||||
window.parent.reload_querywindow(
|
||||
"<?php echo isset( $db ) ? addslashes( $db ) : '' ?>",
|
||||
"<?php echo isset( $table ) ? addslashes( $table ) : '' ?>",
|
||||
"<?php echo isset( $sql_query ) ? urlencode( $sql_query ) : ''; ?>" );
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
if ( ! empty( $focus_querywindow ) ) {
|
||||
?>
|
||||
if ( parent.querywindow && !parent.querywindow.closed && parent.querywindow.location) {
|
||||
self.focus();
|
||||
}
|
||||
if ( parent.querywindow && !parent.querywindow.closed && parent.querywindow.location) {
|
||||
self.focus();
|
||||
}
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
8
sql.php
8
sql.php
@@ -147,7 +147,7 @@ if ($is_select) {
|
||||
$db = $prev_db;
|
||||
}
|
||||
// Nijel: don't change reload, if we already decided to reload in import
|
||||
if (!isset($reload) || $reload == 0) {
|
||||
if ( empty( $reload ) ) {
|
||||
$reload = ($db == $prev_db) ? 0 : 1;
|
||||
}
|
||||
}
|
||||
@@ -270,9 +270,9 @@ else {
|
||||
// A table has to be created or renamed -> left frame should be reloaded
|
||||
// TODO: use the parser/analyzer
|
||||
|
||||
if ((!isset($reload) || $reload == 0)
|
||||
&& (preg_match('@^CREATE TABLE[[:space:]]+(.*)@i', $sql_query)
|
||||
|| preg_match('@^ALTER TABLE[[:space:]]+(.*)RENAME@i', $sql_query))) {
|
||||
if ( empty( $reload )
|
||||
&& (preg_match('@^CREATE (VIEW|TABLE)\s+@i', $sql_query)
|
||||
|| preg_match('@^ALTER TABLE\s+.*RENAME@i', $sql_query))) {
|
||||
$reload = 1;
|
||||
}
|
||||
// Gets the number of rows per page
|
||||
|
Reference in New Issue
Block a user