aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_transfer.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2006-03-01 21:48:02 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2006-03-01 21:48:02 +0000
commitf9a451cce21686c19e0c725efc2edbfadabc4d3a (patch)
tree97179308cbf8b09fff4a94a860692e060650ba47 /phpBB/includes/functions_transfer.php
parentcbfe138cdc505511f0f91288afe8da548b93c3bd (diff)
downloadforums-f9a451cce21686c19e0c725efc2edbfadabc4d3a.tar
forums-f9a451cce21686c19e0c725efc2edbfadabc4d3a.tar.gz
forums-f9a451cce21686c19e0c725efc2edbfadabc4d3a.tar.bz2
forums-f9a451cce21686c19e0c725efc2edbfadabc4d3a.tar.xz
forums-f9a451cce21686c19e0c725efc2edbfadabc4d3a.zip
- some bugfixes
- committed coding guidelines as they are at area51 - removed script_path (needs a close inspection later) - removed the need for server_name and server_port - able to define server port/name/protocol and force the user-defined server vars (very handy for proxy setups) git-svn-id: file:///svn/phpbb/trunk@5595 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_transfer.php')
-rw-r--r--phpBB/includes/functions_transfer.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/phpBB/includes/functions_transfer.php b/phpBB/includes/functions_transfer.php
index dca6391e4e..2be9790e09 100644
--- a/phpBB/includes/functions_transfer.php
+++ b/phpBB/includes/functions_transfer.php
@@ -238,6 +238,9 @@ class ftp extends transfer
$this->username = $username;
$this->password = $password;
$this->timeout = $timeout;
+
+ // Make sure $this->root_path is layed out the same way as the $user->page['root_script_path'] value (prefixed with / and no / at the end)
+ $this->root_path = str_replace('\\', '/', $this->root_path);
$this->root_path = (($root_path{0} != '/' ) ? '/' : '') . ((substr($root_path, -1, 1) == '/') ? substr($root_path, 0, -1) : $root_path);
// Init some needed values
@@ -251,8 +254,9 @@ class ftp extends transfer
*/
function data()
{
- global $config;
- return array('host' => 'localhost' , 'username' => 'anonymous', 'password' => '', 'root_path' => $config['script_path'], 'port' => 21, 'timeout' => 10);
+ global $user;
+
+ return array('host' => 'localhost' , 'username' => 'anonymous', 'password' => '', 'root_path' => $user->page['root_script_path'], 'port' => 21, 'timeout' => 10);
}
/**