Do not attempt to read upload dir when not configured.

This commit is contained in:
Michal Čihař
2005-10-14 08:34:04 +00:00
parent 09badf9bd4
commit 4559cf5373
2 changed files with 9 additions and 1 deletions

View File

@@ -469,7 +469,11 @@ function PMA_sqlQueryFormUpload() {
$matcher = '@\.sql(\.(' . PMA_supportedDecompressions() . '))?$@'; // we allow only SQL here
$files = PMA_getFileSelectOptions($GLOBALS['cfg']['UploadDir'], $matcher, (isset($timeout_passed) && $timeout_passed && isset($local_import_file)) ? $local_import_file : '');
if (!empty($GLOBALS['cfg']['UploadDir'])) {
$files = PMA_getFileSelectOptions($GLOBALS['cfg']['UploadDir'], $matcher, (isset($timeout_passed) && $timeout_passed && isset($local_import_file)) ? $local_import_file : '');
} else {
$files = '';
}
// start output
echo '<fieldset id="">';