diff options
author | the_systech <the_systech@users.sourceforge.net> | 2002-03-12 21:12:00 +0000 |
---|---|---|
committer | the_systech <the_systech@users.sourceforge.net> | 2002-03-12 21:12:00 +0000 |
commit | 1db4b1fc4412a696fb2833bd2590c982925c222b (patch) | |
tree | 7e6dbf6b3775be5d7cf35391f55af7e104213ab9 /phpBB/admin | |
parent | efc74bc4f0b76321014b0299f3539099e3d57876 (diff) | |
download | forums-1db4b1fc4412a696fb2833bd2590c982925c222b.tar forums-1db4b1fc4412a696fb2833bd2590c982925c222b.tar.gz forums-1db4b1fc4412a696fb2833bd2590c982925c222b.tar.bz2 forums-1db4b1fc4412a696fb2833bd2590c982925c222b.tar.xz forums-1db4b1fc4412a696fb2833bd2590c982925c222b.zip |
Ok one last attempt on my part to fix file upload bugs.. Might actually work (Hey it could happen, even I get one right occasionally)
git-svn-id: file:///svn/phpbb/trunk@2296 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/admin')
-rw-r--r-- | phpBB/admin/admin_db_utilities.php | 9 | ||||
-rw-r--r-- | phpBB/admin/admin_users.php | 9 |
2 files changed, 16 insertions, 2 deletions
diff --git a/phpBB/admin/admin_db_utilities.php b/phpBB/admin/admin_db_utilities.php index 84340f8b05..72b019b56f 100644 --- a/phpBB/admin/admin_db_utilities.php +++ b/phpBB/admin/admin_db_utilities.php @@ -32,7 +32,14 @@ if( !empty($setmodules) ) { $filename = basename(__FILE__); $module['General']['Backup_DB'] = $filename . "?perform=backup"; - $file_uploads = get_cfg_var('file_uploads'); + if(phpversion() >= '4.0.0') + { + $file_uploads = ini_get('file_uploads'); + } + else + { + $file_uploads = get_cfg_var('file_uploads'); + } if( ($file_uploads != 0 || empty($file_uploads)) && (strtolower($file_uploads) != 'off') && (phpversion() != '4.0.4pl1') ) { $module['General']['Restore_DB'] = $filename . "?perform=restore"; diff --git a/phpBB/admin/admin_users.php b/phpBB/admin/admin_users.php index 5da3131b2e..191bc2b496 100644 --- a/phpBB/admin/admin_users.php +++ b/phpBB/admin/admin_users.php @@ -983,7 +983,14 @@ if( $mode == "edit" || $mode == "save" && ( isset($HTTP_POST_VARS['username']) | // Let's do an overall check for settings/versions which would prevent // us from doing file uploads.... // - $file_uploads = get_cfg_var('file_uploads'); + if(phpversion() >= '4.0.0') + { + $file_uploads = ini_get('file_uploads'); + } + else + { + $file_uploads = get_cfg_var('file_uploads'); + } if( ($file_uploads == 0 && !empty($file_uploads)) || (strtolower($file_uploads) == 'off') || (phpversion() == '4.0.4pl1') || (!$board_config['allow_avatar_upload']) ) { $form_enctype = ''; |