Commit 558ad0ce authored by alexpott's avatar alexpott

Issue #2242405 by mikebarkas, jlbellido | alexpott: Fixed...

Issue #2242405 by mikebarkas, jlbellido | alexpott: Fixed FileTransfer::connect is protected yet the implementations are public and this is relied upon.
parent 2aa98311
......@@ -110,7 +110,7 @@ function __get($name) {
/**
* Connects to the server.
*/
abstract protected function connect();
abstract public function connect();
/**
* Copies a directory.
......
......@@ -15,7 +15,7 @@ class Local extends FileTransfer implements ChmodInterface {
/**
* Implements Drupal\Core\FileTransfer\FileTransfer::connect().
*/
function connect() {
public function connect() {
// No-op
}
......
......@@ -26,7 +26,7 @@ function __construct($jail, $username, $password, $hostname = "localhost", $port
/**
* Implements Drupal\Core\FileTransfer\FileTransfer::connect().
*/
function connect() {
public function connect() {
$this->connection = @ssh2_connect($this->hostname, $this->port);
if (!$this->connection) {
throw new FileTransferException('SSH Connection failed to @host:@port', NULL, array('@host' => $this->hostname, '@port' => $this->port));
......
......@@ -32,7 +32,7 @@ static function factory($jail, $settings) {
return new TestFileTransfer($jail, $settings['username'], $settings['password'], $settings['hostname'], $settings['port']);
}
function connect() {
public function connect() {
$this->connection = new MockTestConnection();
$this->connection->connectionString = 'test://' . urlencode($this->username) . ':' . urlencode($this->password) . "@$this->host:$this->port/";
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment