aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/admin
diff options
context:
space:
mode:
authorthe_systech <the_systech@users.sourceforge.net>2002-03-01 17:40:21 +0000
committerthe_systech <the_systech@users.sourceforge.net>2002-03-01 17:40:21 +0000
commitab516ec67d160c992f9c3a6a6a9f804cc93c99cb (patch)
tree86c53ed32d5531784cd9204878c8e34fe133d00e /phpBB/admin
parentfbdb08846ea33d26e220b4365f11d26a851730bd (diff)
downloadforums-ab516ec67d160c992f9c3a6a6a9f804cc93c99cb.tar
forums-ab516ec67d160c992f9c3a6a6a9f804cc93c99cb.tar.gz
forums-ab516ec67d160c992f9c3a6a6a9f804cc93c99cb.tar.bz2
forums-ab516ec67d160c992f9c3a6a6a9f804cc93c99cb.tar.xz
forums-ab516ec67d160c992f9c3a6a6a9f804cc93c99cb.zip
Workarounds for file_uploads disabled...
git-svn-id: file:///svn/phpbb/trunk@2241 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/admin')
-rw-r--r--phpBB/admin/admin_board.php9
-rw-r--r--phpBB/admin/admin_db_utilities.php7
-rw-r--r--phpBB/admin/admin_users.php18
3 files changed, 30 insertions, 4 deletions
diff --git a/phpBB/admin/admin_board.php b/phpBB/admin/admin_board.php
index b858968fb4..2c55f5fc2c 100644
--- a/phpBB/admin/admin_board.php
+++ b/phpBB/admin/admin_board.php
@@ -123,6 +123,15 @@ $template->set_filenames(array(
"body" => "admin/board_config_body.tpl")
);
//
+// Check to see if file uploads are possible before displaying
+// avatar upload option.
+//
+if( (get_cfg_var('file_uploads') != 0) && (strtolower(get_cfg_var('file_uploads')) != 'off') && (phpversion() != '4.0.4pl1') )
+{
+ $template->assign_block_vars('switch_uploads_possible', array());
+}
+
+//
// Escape any quotes in the site description for proper display in the text
// box on the admin page
//
diff --git a/phpBB/admin/admin_db_utilities.php b/phpBB/admin/admin_db_utilities.php
index 595d4fe6d7..664904ec7a 100644
--- a/phpBB/admin/admin_db_utilities.php
+++ b/phpBB/admin/admin_db_utilities.php
@@ -32,7 +32,10 @@ if( !empty($setmodules) )
{
$filename = basename(__FILE__);
$module['General']['Backup_DB'] = $filename . "?perform=backup";
- $module['General']['Restore_DB'] = $filename . "?perform=restore";
+ if( (get_cfg_var('file_uploads') != 0) && (strtolower(get_cfg_var('file_uploads')) != 'off') && (phpversion() != '4.0.4pl1') )
+ {
+ $module['General']['Restore_DB'] = $filename . "?perform=restore";
+ }
return;
}
@@ -731,7 +734,7 @@ if( isset($HTTP_GET_VARS['perform']) || isset($HTTP_POST_VARS['perform']) )
$template->set_filenames(array(
"body" => "admin/db_utils_backup_body.tpl")
);
-
+
$s_hidden_fields = "<input type=\"hidden\" name=\"perform\" value=\"backup\" /><input type=\"hidden\" name=\"drop\" value=\"1\" /><input type=\"hidden\" name=\"perform\" value=\"$perform\" />";
$template->assign_vars(array(
diff --git a/phpBB/admin/admin_users.php b/phpBB/admin/admin_users.php
index 1606383bba..bbc9905fda 100644
--- a/phpBB/admin/admin_users.php
+++ b/phpBB/admin/admin_users.php
@@ -127,6 +127,7 @@ function validate_optional_fields(&$icq, &$aim, &$msnm, &$yim, &$website, &$loca
//
// Begin program
//
+
if( $mode == "edit" || $mode == "save" && ( isset($HTTP_POST_VARS['username']) || isset($HTTP_GET_VARS[POST_USERS_URL]) || isset($HTTP_POST_VARS[POST_USERS_URL]) ) )
{
@@ -977,7 +978,19 @@ if( $mode == "edit" || $mode == "save" && ( isset($HTTP_POST_VARS['username']) |
$template->set_filenames(array(
"body" => "admin/user_edit_body.tpl")
);
-
+
+ //
+ // 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']) )
+ {
+ $form_enctype = '';
+ }
+ else
+ {
+ $form_enctype = 'enctype="multipart/form-data"';
+ }
$template->assign_vars(array(
"USERNAME" => $username,
"EMAIL" => $email,
@@ -1077,6 +1090,7 @@ if( $mode == "edit" || $mode == "save" && ( isset($HTTP_POST_VARS['username']) |
"L_PROFILE_INFO_NOTICE" => $lang['Profile_info_warn'],
"L_CONFIRM" => $lang['Confirm'],
"L_EMAIL_ADDRESS" => $lang['Email_address'],
+ "S_FORM_ENCTYPE" => $form_enctype,
"HTML_STATUS" => $html_status,
"BBCODE_STATUS" => sprintf($bbcode_status, '<a href="../' . append_sid("faq.$phpEx?mode=bbcode") . '" target="_phpbbcode">', '</a>'),
@@ -1144,4 +1158,4 @@ else
include('page_footer_admin.'.$phpEx);
-?> \ No newline at end of file
+?>