mirror of
https://github.com/HaschekSolutions/pictshare.git
synced 2025-11-12 03:06:22 +00:00
use passive mode by default
This commit is contained in:
@@ -16,7 +16,10 @@ class FTPStorage implements StorageController
|
|||||||
if(!$this->connection)
|
if(!$this->connection)
|
||||||
$this->connection = ftp_connect(FTP_SERVER);
|
$this->connection = ftp_connect(FTP_SERVER);
|
||||||
if(!$this->login)
|
if(!$this->login)
|
||||||
|
{
|
||||||
$this->login = ftp_login($this->connection, FTP_USER, FTP_PASS);
|
$this->login = ftp_login($this->connection, FTP_USER, FTP_PASS);
|
||||||
|
ftp_pasv($this->connection, TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
// Was the connection successful?
|
// Was the connection successful?
|
||||||
if ((!$this->connection) || (!$this->login)) {
|
if ((!$this->connection) || (!$this->login)) {
|
||||||
@@ -46,7 +49,6 @@ class FTPStorage implements StorageController
|
|||||||
function getItems($dev=false)
|
function getItems($dev=false)
|
||||||
{
|
{
|
||||||
if(!$this->connect()) return false;
|
if(!$this->connect()) return false;
|
||||||
ftp_pasv($this->connection, TRUE);
|
|
||||||
return $this->ftp_list_files_recursive(FTP_BASEDIR);
|
return $this->ftp_list_files_recursive(FTP_BASEDIR);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user