From 4559cf53735f3d18e9ef7ad45a4947a49a7fc31d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Fri, 14 Oct 2005 08:34:04 +0000 Subject: [PATCH] Do not attempt to read upload dir when not configured. --- ChangeLog | 4 ++++ libraries/sql_query_form.lib.php | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 5a226a2e8..4b9c0b851 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,10 @@ phpMyAdmin - Changelog $Id$ $Source$ +2005-10-14 Michal Čihař + * libraries/sql_query_form.lib.php: Do not attempt to read upload dir when + not configured. + 2005-10-13 Sebastian Mendel * lang/*: typo 'unser' -> 'user' diff --git a/libraries/sql_query_form.lib.php b/libraries/sql_query_form.lib.php index dfbb884e6..e2a49919b 100644 --- a/libraries/sql_query_form.lib.php +++ b/libraries/sql_query_form.lib.php @@ -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 '
';