mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 22:10:45 +02:00
- 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
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user