From 8b67c1819b214438c8d86fc9e35ef5e670bd97f0 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Mon, 5 Nov 2007 12:24:13 +0000 Subject: [PATCH] bug #1817224 [import] Incorrect detection of file_uploads in some cases --- ChangeLog | 2 ++ libraries/Config.class.php | 14 ++++++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 111399982..fd8146c9a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -22,6 +22,8 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA - wrong default charset in case of broken session - bug #1824506 [profiling] Profile command repeated on older MySQL servers - bug #1825172 [export] Exporting and functions +- bug #1817224 [import] Incorrect detection of file_uploads in some cases, + thanks to Juergen Wind 2.11.2.0 (2007-10-27) - patch #1791576 HTTP auth: support REDIRECT_REMOTE_USER, thanks to Allard diff --git a/libraries/Config.class.php b/libraries/Config.class.php index 9ec622606..120a4acab 100644 --- a/libraries/Config.class.php +++ b/libraries/Config.class.php @@ -745,13 +745,19 @@ class PMA_Config * checks if upload is enabled * */ + function checkUpload() { - $this->set('enable_upload', true); - if (strtolower(@ini_get('file_uploads')) == 'off' - || @ini_get('file_uploads') == 0) { + if (ini_get('file_uploads')) { + $this->set('enable_upload', true); + // if set "php_admin_value file_uploads Off" in httpd.conf + // ini_get() also returns the string "Off" in this case: + if ('off' == strtolower(ini_get('file_uploads'))) { + $this->set('enable_upload', false); + } + } else { $this->set('enable_upload', false); - } + } } /**