export nothing if no tables are selected
This commit is contained in:
@@ -5,6 +5,9 @@ phpMyAdmin - ChangeLog
|
|||||||
$Id$
|
$Id$
|
||||||
$HeadURL$
|
$HeadURL$
|
||||||
|
|
||||||
|
2006-10-17 Marc Delisle <lem9@users.sourceforge.net>
|
||||||
|
* export.php: export nothing if no tables are selected
|
||||||
|
|
||||||
2006-10-17 Michal Čihař <michal@cihar.com>
|
2006-10-17 Michal Čihař <michal@cihar.com>
|
||||||
* Documentation.html: Fix HTML errors.
|
* Documentation.html: Fix HTML errors.
|
||||||
* libraries/sqlparser.data.php, libraries/sqlparser.lib.php: Add support
|
* libraries/sqlparser.data.php, libraries/sqlparser.lib.php: Add support
|
||||||
|
44
export.php
44
export.php
@@ -337,6 +337,23 @@ if (!$save_on_server) {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// HTML
|
// HTML
|
||||||
|
// Check if we have something to export
|
||||||
|
if ($export_type == 'database') {
|
||||||
|
if (isset($table_select)) {
|
||||||
|
$tables = $table_select;
|
||||||
|
} else {
|
||||||
|
$tables = array();
|
||||||
|
}
|
||||||
|
$num_tables = count($tables);
|
||||||
|
if ($num_tables == 0) {
|
||||||
|
$message = $strNoTablesFound;
|
||||||
|
$js_to_run = 'functions.js';
|
||||||
|
require_once('./libraries/header.inc.php');
|
||||||
|
$active_page = 'db_details_export.php';
|
||||||
|
require('./db_details_export.php');
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
}
|
||||||
$backup_cfgServer = $cfg['Server'];
|
$backup_cfgServer = $cfg['Server'];
|
||||||
require_once('./libraries/header.inc.php');
|
require_once('./libraries/header.inc.php');
|
||||||
$cfg['Server'] = $backup_cfgServer;
|
$cfg['Server'] = $backup_cfgServer;
|
||||||
@@ -352,33 +369,6 @@ if (!$save_on_server) {
|
|||||||
} // end download
|
} // end download
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if we have something to export
|
|
||||||
if ($export_type == 'database') {
|
|
||||||
if (isset($table_select)) {
|
|
||||||
$tables = $table_select;
|
|
||||||
} else {
|
|
||||||
// not sure if this can happen, let's play safe
|
|
||||||
$tables = PMA_DBI_get_tables($db);
|
|
||||||
}
|
|
||||||
$num_tables = count($tables);
|
|
||||||
if ($num_tables == 0) {
|
|
||||||
$message = $strNoTablesFound;
|
|
||||||
$js_to_run = 'functions.js';
|
|
||||||
require_once('./libraries/header.inc.php');
|
|
||||||
//if ($export_type == 'server') {
|
|
||||||
// $active_page = 'server_export.php';
|
|
||||||
// require('./server_export.php');
|
|
||||||
//} elseif ($export_type == 'database') {
|
|
||||||
$active_page = 'db_details_export.php';
|
|
||||||
require('./db_details_export.php');
|
|
||||||
//} else {
|
|
||||||
// $active_page = 'tbl_properties_export.php';
|
|
||||||
// require('./tbl_properties_export.php');
|
|
||||||
//}
|
|
||||||
exit();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Fake loop just to allow skip of remain of this code by break, I'd really
|
// Fake loop just to allow skip of remain of this code by break, I'd really
|
||||||
// need exceptions here :-)
|
// need exceptions here :-)
|
||||||
do {
|
do {
|
||||||
|
@@ -669,7 +669,7 @@ class PMA_Table {
|
|||||||
// moving table from replicated one to not replicated one
|
// moving table from replicated one to not replicated one
|
||||||
PMA_DBI_select_db($source_db);
|
PMA_DBI_select_db($source_db);
|
||||||
|
|
||||||
if (PMA_Table::_isView($source_db,$source)) {
|
if (PMA_Table::_isView($source_db,$source_table)) {
|
||||||
$sql_drop_query = 'DROP VIEW';
|
$sql_drop_query = 'DROP VIEW';
|
||||||
} else {
|
} else {
|
||||||
$sql_drop_query = 'DROP TABLE';
|
$sql_drop_query = 'DROP TABLE';
|
||||||
|
Reference in New Issue
Block a user