aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorthe_systech <the_systech@users.sourceforge.net>2002-03-06 21:23:51 +0000
committerthe_systech <the_systech@users.sourceforge.net>2002-03-06 21:23:51 +0000
commit2f882026efb20af14bd51a9c22eeb6b6568e067b (patch)
treeac983ef87bf2352e7316c56236dcfa396be7f2af
parentf00941114a525e48499c67fac2a877564b941d28 (diff)
downloadforums-2f882026efb20af14bd51a9c22eeb6b6568e067b.tar
forums-2f882026efb20af14bd51a9c22eeb6b6568e067b.tar.gz
forums-2f882026efb20af14bd51a9c22eeb6b6568e067b.tar.bz2
forums-2f882026efb20af14bd51a9c22eeb6b6568e067b.tar.xz
forums-2f882026efb20af14bd51a9c22eeb6b6568e067b.zip
Minor screw up in file upload checking.. If file_uploads is not set at all in the php.ini file then the check for get_cfg_var('file_uploads') == 0 would return true and say it was disabled, when in actuallity it was enabled.. Now check for it to empty as well... Empty as my head that is :D
git-svn-id: file:///svn/phpbb/trunk@2277 89ea8834-ac86-4346-8a33-228a782c2dd0
-rw-r--r--phpBB/admin/admin_db_utilities.php3
-rw-r--r--phpBB/admin/admin_users.php3
-rw-r--r--phpBB/profile.php5
3 files changed, 7 insertions, 4 deletions
diff --git a/phpBB/admin/admin_db_utilities.php b/phpBB/admin/admin_db_utilities.php
index 664904ec7a..84340f8b05 100644
--- a/phpBB/admin/admin_db_utilities.php
+++ b/phpBB/admin/admin_db_utilities.php
@@ -32,7 +32,8 @@ if( !empty($setmodules) )
{
$filename = basename(__FILE__);
$module['General']['Backup_DB'] = $filename . "?perform=backup";
- if( (get_cfg_var('file_uploads') != 0) && (strtolower(get_cfg_var('file_uploads')) != 'off') && (phpversion() != '4.0.4pl1') )
+ $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 a9cf26b336..5da3131b2e 100644
--- a/phpBB/admin/admin_users.php
+++ b/phpBB/admin/admin_users.php
@@ -983,7 +983,8 @@ 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....
//
- if( (get_cfg_var('file_uploads') == 0) || (strtolower(get_cfg_var('file_uploads')) == 'off') || (phpversion() == '4.0.4pl1') || (!$board_config['allow_avatar_upload']) )
+ $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 = '';
}
diff --git a/phpBB/profile.php b/phpBB/profile.php
index 4cd3d2b5ce..34745ac5ec 100644
--- a/phpBB/profile.php
+++ b/phpBB/profile.php
@@ -1493,7 +1493,8 @@ if( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) )
// Let's do an overall check for settings/versions which would prevent
// us from doing file uploads....
//
- if( (get_cfg_var('file_uploads') == 0) || (strtolower(get_cfg_var('file_uploads')) == 'off')|| (phpversion() == '4.0.4pl1') || (!$board_config['allow_avatar_upload']) )
+ $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 = '';
}
@@ -2002,4 +2003,4 @@ if( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) )
}
}
-?> \ No newline at end of file
+?>