From dd9ad539fdab80badedf801a816b8a0beafbbf5c Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Tue, 6 Jun 2006 20:53:46 +0000 Subject: ok, this one is rather large... the most important change: re-introduce append_sid: old style continues to work, not a performance hog as it was in 2.0.x -> structure is different apart from this, code cleanage, bug fixing, etc. git-svn-id: file:///svn/phpbb/trunk@6015 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions_transfer.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'phpBB/includes/functions_transfer.php') diff --git a/phpBB/includes/functions_transfer.php b/phpBB/includes/functions_transfer.php index 1cc0c48406..401eb01f46 100644 --- a/phpBB/includes/functions_transfer.php +++ b/phpBB/includes/functions_transfer.php @@ -47,7 +47,7 @@ class transfer { global $phpbb_root_path; - $destination_file = $this->root_path . '/' . str_replace($phpbb_root_path, '', $destination_file); + $destination_file = $this->root_path . str_replace($phpbb_root_path, '', $destination_file); // need to create a temp file and then move that temp file. // ftp functions can only move files around and can't create. @@ -121,7 +121,7 @@ class transfer $this->_chmod($dir[$i], $this->dir_perms); } - $this->_chdir($this->root_path . '/' . $dirs . $dir[$i]); + $this->_chdir($this->root_path . $dirs . $dir[$i]); $dirs .= $cur_dir; } @@ -141,7 +141,7 @@ class transfer global $phpbb_root_path; $from_loc = ((strpos($from_loc, $phpbb_root_path) !== 0) ? $phpbb_root_path : '') . $from_loc; - $to_loc = $this->root_path . '/' . str_replace($phpbb_root_path, '', $to_loc); + $to_loc = $this->root_path . str_replace($phpbb_root_path, '', $to_loc); if (!file_exists($from_loc)) { @@ -160,7 +160,7 @@ class transfer { global $phpbb_root_path; - $file = $this->root_path . '/' . str_replace($phpbb_root_path, '', $file); + $file = $this->root_path . str_replace($phpbb_root_path, '', $file); return $this->_delete($file); } @@ -173,7 +173,7 @@ class transfer { global $phpbb_root_path; - $dir = $this->root_path . '/' . str_replace($phpbb_root_path, '', $dir); + $dir = $this->root_path . str_replace($phpbb_root_path, '', $dir); return $this->_rmdir($dir); } @@ -185,7 +185,7 @@ class transfer { global $phpbb_root_path; - $old_handle = $this->root_path . '/' . str_replace($phpbb_root_path, '', $old_handle); + $old_handle = $this->root_path . str_replace($phpbb_root_path, '', $old_handle); return $this->_rename($old_handle, $new_handle); } @@ -245,9 +245,9 @@ class ftp extends transfer $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) + // Make sure $this->root_path is layed out the same way as the $user->page['root_script_path'] value (/ 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); + $this->root_path = (($root_path{0} != '/' ) ? '/' : '') . ((substr($root_path, -1, 1) == '/') ? '' : '/') . $root_path; // Init some needed values transfer::transfer(); @@ -447,7 +447,7 @@ class ftp_fsock extends transfer // 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); + $this->root_path = (($root_path{0} != '/' ) ? '/' : '') . ((substr($root_path, -1, 1) == '/') ? '' : '/') . $root_path; // Init some needed values transfer::transfer(); -- cgit v1.2.1