aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acp/acp_language.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2007-03-30 10:49:06 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2007-03-30 10:49:06 +0000
commit9f82dec04b18813c060e5a090a149c1a2c140689 (patch)
treeefab7d5e9ce8166ff4bff69d180c82230c3df481 /phpBB/includes/acp/acp_language.php
parent331a549c42a74472d27dadbe213618a7b914a737 (diff)
downloadforums-9f82dec04b18813c060e5a090a149c1a2c140689.tar
forums-9f82dec04b18813c060e5a090a149c1a2c140689.tar.gz
forums-9f82dec04b18813c060e5a090a149c1a2c140689.tar.bz2
forums-9f82dec04b18813c060e5a090a149c1a2c140689.tar.xz
forums-9f82dec04b18813c060e5a090a149c1a2c140689.zip
some changes/bugfixes
git-svn-id: file:///svn/phpbb/trunk@7241 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/acp/acp_language.php')
-rw-r--r--phpBB/includes/acp/acp_language.php23
1 files changed, 8 insertions, 15 deletions
diff --git a/phpBB/includes/acp/acp_language.php b/phpBB/includes/acp/acp_language.php
index 50fb854d54..5805318a93 100644
--- a/phpBB/includes/acp/acp_language.php
+++ b/phpBB/includes/acp/acp_language.php
@@ -105,9 +105,10 @@ class acp_language
}
$hidden_data = build_hidden_fields(array(
- 'file' => $this->language_file,
- 'dir' => $this->language_directory,
- 'method' => $method)
+ 'file' => $this->language_file,
+ 'dir' => $this->language_directory,
+ 'language_file' => $selected_lang_file,
+ 'method' => $method)
);
$hidden_data .= build_hidden_fields(array('entry' => $_POST['entry']), true, STRIP);
@@ -301,21 +302,13 @@ class acp_language
include_once($phpbb_root_path . 'includes/functions_transfer.' . $phpEx);
$method = request_var('method', '');
- switch ($method)
+ if ($method != 'ftp' && $method != 'ftp_fsock')
{
- case 'ftp':
- $transfer = new ftp(request_var('host', ''), request_var('username', ''), request_var('password', ''), request_var('root_path', ''), request_var('port', ''), request_var('timeout', ''));
- break;
-
- case 'ftp_fsock':
- $transfer = new ftp_fsock(request_var('host', ''), request_var('username', ''), request_var('password', ''), request_var('root_path', ''), request_var('port', ''), request_var('timeout', ''));
- break;
-
- default:
- trigger_error($user->lang['INVALID_UPLOAD_METHOD'], E_USER_ERROR);
- break;
+ trigger_error($user->lang['INVALID_UPLOAD_METHOD'], E_USER_ERROR);
}
+ $transfer = new $method(request_var('host', ''), request_var('username', ''), request_var('password', ''), request_var('root_path', ''), request_var('port', ''), request_var('timeout', ''));
+
if (($result = $transfer->open_session()) !== true)
{
trigger_error($user->lang[$result] . adm_back_link($this->u_action . '&amp;action=details&amp;id=' . $lang_id . '&amp;language_file=' . urlencode($selected_lang_file)), E_USER_WARNING);