diff options
Diffstat (limited to 'phpBB/includes/functions_transfer.php')
-rw-r--r-- | phpBB/includes/functions_transfer.php | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/phpBB/includes/functions_transfer.php b/phpBB/includes/functions_transfer.php index 42fdee364c..7427b89917 100644 --- a/phpBB/includes/functions_transfer.php +++ b/phpBB/includes/functions_transfer.php @@ -38,7 +38,7 @@ class transfer /** * Constructor - init some basic values */ - function transfer() + function __construct() { global $phpbb_root_path; @@ -112,7 +112,7 @@ class transfer $dir = explode('/', $dir); $dirs = ''; - for ($i = 0, $total = sizeof($dir); $i < $total; $i++) + for ($i = 0, $total = count($dir); $i < $total; $i++) { $result = true; @@ -264,7 +264,7 @@ class ftp extends transfer /** * Standard parameters for FTP session */ - function ftp($host, $username, $password, $root_path, $port = 21, $timeout = 10) + function __construct($host, $username, $password, $root_path, $port = 21, $timeout = 10) { $this->host = $host; $this->port = $port; @@ -406,9 +406,6 @@ class ftp extends transfer */ function _put($from_file, $to_file) { - // get the file extension - $file_extension = strtolower(substr(strrchr($to_file, '.'), 1)); - // We only use the BINARY file mode to cicumvent rewrite actions from ftp server (mostly linefeeds being replaced) $mode = FTP_BINARY; @@ -515,7 +512,7 @@ class ftp_fsock extends transfer /** * Standard parameters for FTP session */ - function ftp_fsock($host, $username, $password, $root_path, $port = 21, $timeout = 10) + function __construct($host, $username, $password, $root_path, $port = 21, $timeout = 10) { $this->host = $host; $this->port = $port; @@ -532,7 +529,7 @@ class ftp_fsock extends transfer } // Init some needed values - $this->transfer(); + parent::__construct(); return; } |