mirror of
https://github.com/HaschekSolutions/pictshare.git
synced 2025-11-15 12:38:01 +00:00
added setting and possible fix for passive mode. fixes #135 probably
This commit is contained in:
@@ -23,7 +23,15 @@ class FTPStorage implements StorageController
|
||||
if($this->connection && !$this->login)
|
||||
{
|
||||
$this->login = ftp_login($this->connection, FTP_USER, FTP_PASS);
|
||||
ftp_pasv($this->connection, TRUE);
|
||||
|
||||
if( (defined('FTP_PASSIVEMODE') && FTP_PASSIVEMODE === true) || !defined('FTP_PASSIVEMODE') )
|
||||
{
|
||||
ftp_set_option($this->connection, FTP_USEPASVADDRESS, false);
|
||||
ftp_pasv($this->connection, TRUE);
|
||||
}
|
||||
else
|
||||
ftp_pasv($this->connection, false);
|
||||
|
||||
}
|
||||
|
||||
// Was the connection successful?
|
||||
|
||||
Reference in New Issue
Block a user