diff options
author | Andrey Andreev <narf@bofh.bg> | 2012-06-06 13:12:15 +0200 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2012-06-06 13:12:15 +0200 |
commit | 968690491f625ddf59a5136b55ae1b9a2cf98a9a (patch) | |
tree | 6bc3eff6e8ec3ecae925ac3ff5c9542888f160f4 /system/libraries/Ftp.php | |
parent | 58dc75471c25f33b059967ffb515eedc08e86a0b (diff) | |
parent | 6683c3c872952ae16d98c89ef474e5522897592a (diff) |
Merge upstream branch and some changes for better readability
Diffstat (limited to 'system/libraries/Ftp.php')
-rw-r--r-- | system/libraries/Ftp.php | 32 |
1 files changed, 15 insertions, 17 deletions
diff --git a/system/libraries/Ftp.php b/system/libraries/Ftp.php index 8aa1650d2..461e884fb 100644 --- a/system/libraries/Ftp.php +++ b/system/libraries/Ftp.php @@ -44,7 +44,6 @@ class CI_FTP { public $debug = FALSE; public $conn_id = FALSE; - public function __construct($config = array()) { if (count($config) > 0) @@ -94,7 +93,7 @@ class CI_FTP { if (FALSE === ($this->conn_id = @ftp_connect($this->hostname, $this->port))) { - if ($this->debug == TRUE) + if ($this->debug === TRUE) { $this->_error('ftp_unable_to_connect'); } @@ -103,7 +102,7 @@ class CI_FTP { if ( ! $this->_login()) { - if ($this->debug == TRUE) + if ($this->debug === TRUE) { $this->_error('ftp_unable_to_login'); } @@ -111,7 +110,7 @@ class CI_FTP { } // Set passive mode if needed - if ($this->passive == TRUE) + if ($this->passive === TRUE) { ftp_pasv($this->conn_id, TRUE); } @@ -142,7 +141,7 @@ class CI_FTP { { if ( ! is_resource($this->conn_id)) { - if ($this->debug == TRUE) + if ($this->debug === TRUE) { $this->_error('ftp_no_connection'); } @@ -168,7 +167,7 @@ class CI_FTP { */ public function changedir($path = '', $supress_debug = FALSE) { - if ($path == '' OR ! $this->_is_conn()) + if ($path === '' OR ! $this->_is_conn()) { return FALSE; } @@ -177,7 +176,7 @@ class CI_FTP { if ($result === FALSE) { - if ($this->debug == TRUE && $supress_debug == FALSE) + if ($this->debug === TRUE && $supress_debug === FALSE) { $this->_error('ftp_unable_to_changedir'); } @@ -198,7 +197,7 @@ class CI_FTP { */ public function mkdir($path = '', $permissions = NULL) { - if ($path == '' OR ! $this->_is_conn()) + if ($path === '' OR ! $this->_is_conn()) { return FALSE; } @@ -207,7 +206,7 @@ class CI_FTP { if ($result === FALSE) { - if ($this->debug == TRUE) + if ($this->debug === TRUE) { $this->_error('ftp_unable_to_makdir'); } @@ -261,7 +260,7 @@ class CI_FTP { if ($result === FALSE) { - if ($this->debug == TRUE) + if ($this->debug === TRUE) { $this->_error('ftp_unable_to_upload'); } @@ -308,7 +307,7 @@ class CI_FTP { if ($result === FALSE) { - if ($this->debug == TRUE) + if ($this->debug === TRUE) { $this->_error('ftp_unable_to_download'); } @@ -339,9 +338,9 @@ class CI_FTP { if ($result === FALSE) { - if ($this->debug == TRUE) + if ($this->debug === TRUE) { - $this->_error('ftp_unable_to_' . ($move == FALSE ? 'rename' : 'move')); + $this->_error('ftp_unable_to_' . ($move === FALSE ? 'rename' : 'move')); } return FALSE; } @@ -382,7 +381,7 @@ class CI_FTP { if ($result === FALSE) { - if ($this->debug == TRUE) + if ($this->debug === TRUE) { $this->_error('ftp_unable_to_delete'); } @@ -430,7 +429,7 @@ class CI_FTP { if ($result === FALSE) { - if ($this->debug == TRUE) + if ($this->debug === TRUE) { $this->_error('ftp_unable_to_delete'); } @@ -460,7 +459,7 @@ class CI_FTP { if ($result === FALSE) { - if ($this->debug == TRUE) + if ($this->debug === TRUE) { $this->_error('ftp_unable_to_chmod'); } @@ -539,7 +538,6 @@ class CI_FTP { return FALSE; } - // -------------------------------------------------------------------- /** |