bug #1192468, bookmarks copied too many times
This commit is contained in:
@@ -5,6 +5,10 @@ phpMyAdmin - Changelog
|
||||
$Id$
|
||||
$Source$
|
||||
|
||||
2005-04-30 Marc Delisle <lem9@users.sourceforge.net>
|
||||
* db_operations.php, libraries/tbl_move_copy.php:
|
||||
bug #1192468, bookmarks copied too many times
|
||||
|
||||
2005-04-27 Marc Delisle <lem9@users.sourceforge.net>
|
||||
* lang/finnish: update, thanks to Jouni Kahkonen
|
||||
* lang/russian: update, thanks to lobovich
|
||||
|
@@ -6,7 +6,7 @@ require_once('./libraries/grab_globals.lib.php');
|
||||
require_once('./libraries/common.lib.php');
|
||||
require_once('./libraries/mysql_charsets.lib.php');
|
||||
/**
|
||||
* Rename database
|
||||
* Rename database or Copy database
|
||||
*/
|
||||
if (isset($db) &&
|
||||
((isset($db_rename) && $db_rename == 'true') ||
|
||||
@@ -30,6 +30,15 @@ if (isset($db) &&
|
||||
PMA_table_move_copy($db, $table, $newname, $table, isset($what) ? $what : 'data', $move);
|
||||
$sql_query = $back . $sql_query;
|
||||
}
|
||||
|
||||
// Duplicate the bookmarks for this db (done once for each db)
|
||||
if ($db != $newname) {
|
||||
$get_fields = array('user','label','query');
|
||||
$where_fields = array('dbase' => $db);
|
||||
$new_fields = array('dbase' => $newname);
|
||||
PMA_duplicate_table_info('bookmarkwork', 'bookmark', $get_fields, $where_fields, $new_fields);
|
||||
}
|
||||
|
||||
if ($move) {
|
||||
$local_query = 'DROP DATABASE ' . PMA_backquote($db) . ';';
|
||||
$sql_query .= "\n" . $local_query;
|
||||
|
@@ -328,12 +328,8 @@ function PMA_table_move_copy($source_db, $source_table, $target_db, $target_tabl
|
||||
} // end while
|
||||
}
|
||||
|
||||
if ($source_db != $target_db) {
|
||||
$get_fields = array('user','label','query');
|
||||
$where_fields = array('dbase' => $source_db);
|
||||
$new_fields = array('dbase' => $target_db);
|
||||
PMA_duplicate_table_info('bookmarkwork', 'bookmark', $get_fields, $where_fields, $new_fields);
|
||||
}
|
||||
// duplicating the bookmarks must not be done here, but
|
||||
// just once per db
|
||||
|
||||
$get_fields = array('display_field');
|
||||
$where_fields = array('db_name' => $source_db, 'table_name' => $source_table);
|
||||
|
Reference in New Issue
Block a user