phpBB

Code Changes

File: includes/functions_transfer.php

  Unmodified   Added   Modified   Removed
Line 281Line 281
		}

// Init some needed values

		}

// Init some needed values

		$this->transfer();

		parent::__construct();


return;
}


return;
}

Line 341Line 341
	*/
function _mkdir($dir)
{

	*/
function _mkdir($dir)
{

 
		if (!$this->connection)
{
return false;
}


		return @ftp_mkdir($this->connection, $dir);
}


		return @ftp_mkdir($this->connection, $dir);
}


Line 350Line 355
	*/
function _rmdir($dir)
{

	*/
function _rmdir($dir)
{

 
		if (!$this->connection)
{
return false;
}


		return @ftp_rmdir($this->connection, $dir);
}


		return @ftp_rmdir($this->connection, $dir);
}


Line 359Line 369
	*/
function _rename($old_handle, $new_handle)
{

	*/
function _rename($old_handle, $new_handle)
{

 
		if (!$this->connection)
{
return false;
}


		return @ftp_rename($this->connection, $old_handle, $new_handle);
}


		return @ftp_rename($this->connection, $old_handle, $new_handle);
}


Line 368Line 383
	*/
function _chdir($dir = '')
{

	*/
function _chdir($dir = '')
{

 
		if (!$this->connection)
{
return false;
}


		if ($dir && $dir !== '/')
{
if (substr($dir, -1, 1) == '/')

		if ($dir && $dir !== '/')
{
if (substr($dir, -1, 1) == '/')

Line 385Line 405
	*/
function _chmod($file, $perms)
{

	*/
function _chmod($file, $perms)
{

 
		if (!$this->connection)
{
return false;
}


		if (function_exists('ftp_chmod'))
{
$err = @ftp_chmod($this->connection, $perms, $file);

		if (function_exists('ftp_chmod'))
{
$err = @ftp_chmod($this->connection, $perms, $file);

Line 406Line 431
	*/
function _put($from_file, $to_file)
{

	*/
function _put($from_file, $to_file)
{

 
		if (!$this->connection)
{
return false;
}


		// We only use the BINARY file mode to cicumvent rewrite actions from ftp server (mostly linefeeds being replaced)
$mode = FTP_BINARY;


		// We only use the BINARY file mode to cicumvent rewrite actions from ftp server (mostly linefeeds being replaced)
$mode = FTP_BINARY;


Line 425Line 455
	*/
function _delete($file)
{

	*/
function _delete($file)
{

 
		if (!$this->connection)
{
return false;
}


		return @ftp_delete($this->connection, $file);
}


		return @ftp_delete($this->connection, $file);
}


Line 449Line 484
	*/
function _cwd()
{

	*/
function _cwd()
{

 
		if (!$this->connection)
{
return false;
}


		return @ftp_pwd($this->connection);
}


		return @ftp_pwd($this->connection);
}


Line 458Line 498
	*/
function _ls($dir = './')
{

	*/
function _ls($dir = './')
{

 
		if (!$this->connection)
{
return false;
}


		$list = @ftp_nlist($this->connection, $dir);

// See bug #46295 - Some FTP daemons don't like './'

		$list = @ftp_nlist($this->connection, $dir);

// See bug #46295 - Some FTP daemons don't like './'

Line 498Line 543
	*/
function _site($command)
{

	*/
function _site($command)
{

 
		if (!$this->connection)
{
return false;
}


		return @ftp_site($this->connection, $command);
}
}

		return @ftp_site($this->connection, $command);
}
}

Line 782Line 832
	*/
function _send_command($command, $args = '', $check = true)
{

	*/
function _send_command($command, $args = '', $check = true)
{

 
		if (!$this->connection)
{
return false;
}


		if (!empty($args))
{
$command = "$command $args";

		if (!empty($args))
{
$command = "$command $args";

Line 871Line 926
	*/
function _close_data_connection()
{

	*/
function _close_data_connection()
{

 
		if (!$this->connection)
{
return false;
}


		return @fclose($this->data_connection);
}


		return @fclose($this->data_connection);
}


Line 880Line 940
	*/
function _check_command($return = false)
{

	*/
function _check_command($return = false)
{

 
		if (!$this->connection)
{
return false;
}


		$response = '';

do

		$response = '';

do