Check for correct parameters.

This commit is contained in:
Michal Čihař
2005-12-05 10:09:00 +00:00
parent 75a16f45f8
commit 5b8329b473
2 changed files with 6 additions and 3 deletions

View File

@@ -7,6 +7,7 @@ $Source$
2005-12-05 Michal Čihař <michal@cihar.com>
* many files: Use same script tag, use CDATA for scripts (RFE #995065).
* export.php: Check for correct parameters.
2005-12-04 Marc Delisle <lem9@users.sourceforge.net>
* lang/catalan update, thanks to Xavier Navarro (xavin).

View File

@@ -8,7 +8,7 @@
require_once('./libraries/common.lib.php');
require_once('./libraries/zip.lib.php');
PMA_checkParameters(array('what'));
PMA_checkParameters(array('what', 'export_type'));
// What type of export are we doing?
if ($what == 'excel') {
@@ -23,10 +23,12 @@ require('./libraries/export/' . PMA_securePath($type) . '.php');
// Generate error url
if ($export_type == 'server') {
$err_url = 'server_export.php?' . PMA_generate_common_url();
} elseif ($export_type == 'database') {
} elseif ($export_type == 'database' && !empty($db)) {
$err_url = 'db_details_export.php?' . PMA_generate_common_url($db);
} else {
} elseif ($export_type == 'table' && !empty($db) && !empty($table)) {
$err_url = 'tbl_properties_export.php?' . PMA_generate_common_url($db, $table);
} else {
die('Bad parameters!');
}
/**