summaryrefslogtreecommitdiffstats
path: root/system/libraries/Ftp.php
diff options
context:
space:
mode:
authorDerek Jones <derek.jones@ellislab.com>2008-05-13 06:22:33 +0200
committerDerek Jones <derek.jones@ellislab.com>2008-05-13 06:22:33 +0200
commit0b59f270a432f8c7b6128981f0a39b4a2e2fbd34 (patch)
tree1e7655eabd76bb981692f5d4f21cb1fc7be3e9cd /system/libraries/Ftp.php
parent5cf664748ee295867f593d7eb7991bd35fe8eca6 (diff)
Some sweeping syntax changes for consistency:
(! foo) changed to ( ! foo) || changed to OR changed newline standardization code in various places from preg_replace to str_replace
Diffstat (limited to 'system/libraries/Ftp.php')
-rw-r--r--system/libraries/Ftp.php40
1 files changed, 20 insertions, 20 deletions
diff --git a/system/libraries/Ftp.php b/system/libraries/Ftp.php
index 01354cf05..170ebe1c4 100644
--- a/system/libraries/Ftp.php
+++ b/system/libraries/Ftp.php
@@ -1,4 +1,4 @@
-<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
+<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* CodeIgniter
*
@@ -98,7 +98,7 @@ class CI_FTP {
return FALSE;
}
- if (! $this->_login())
+ if ( ! $this->_login())
{
if ($this->debug == TRUE)
{
@@ -139,7 +139,7 @@ class CI_FTP {
*/
function _is_conn()
{
- if (! is_resource($this->conn_id))
+ if ( ! is_resource($this->conn_id))
{
if ($this->debug == TRUE)
{
@@ -216,7 +216,7 @@ class CI_FTP {
}
// Set file permissions if needed
- if (! is_null($permissions))
+ if ( ! is_null($permissions))
{
$this->chmod($path, (int)$permissions);
}
@@ -237,12 +237,12 @@ class CI_FTP {
*/
function upload($locpath, $rempath, $mode = 'auto', $permissions = NULL)
{
- if (! $this->_is_conn())
+ if ( ! $this->_is_conn())
{
return FALSE;
}
- if (! file_exists($locpath))
+ if ( ! file_exists($locpath))
{
$this->_error('ftp_no_source_file');
return FALSE;
@@ -270,7 +270,7 @@ class CI_FTP {
}
// Set file permissions if needed
- if (! is_null($permissions))
+ if ( ! is_null($permissions))
{
$this->chmod($rempath, (int)$permissions);
}
@@ -291,7 +291,7 @@ class CI_FTP {
*/
function rename($old_file, $new_file, $move = FALSE)
{
- if (! $this->_is_conn())
+ if ( ! $this->_is_conn())
{
return FALSE;
}
@@ -338,7 +338,7 @@ class CI_FTP {
*/
function delete_file($filepath)
{
- if (! $this->_is_conn())
+ if ( ! $this->_is_conn())
{
return FALSE;
}
@@ -369,7 +369,7 @@ class CI_FTP {
*/
function delete_dir($filepath)
{
- if (! $this->_is_conn())
+ if ( ! $this->_is_conn())
{
return FALSE;
}
@@ -385,7 +385,7 @@ class CI_FTP {
{
// If we can't delete the item it's probaly a folder so
// we'll recursively call delete_dir()
- if (! @ftp_delete($this->conn_id, $item))
+ if ( ! @ftp_delete($this->conn_id, $item))
{
$this->delete_dir($item);
}
@@ -418,13 +418,13 @@ class CI_FTP {
*/
function chmod($path, $perm)
{
- if (! $this->_is_conn())
+ if ( ! $this->_is_conn())
{
return FALSE;
}
// Permissions can only be set when running PHP 5
- if (! function_exists('ftp_chmod'))
+ if ( ! function_exists('ftp_chmod'))
{
if ($this->debug == TRUE)
{
@@ -457,7 +457,7 @@ class CI_FTP {
*/
function list_files($path = '.')
{
- if (! $this->_is_conn())
+ if ( ! $this->_is_conn())
{
return FALSE;
}
@@ -481,7 +481,7 @@ class CI_FTP {
*/
function mirror($locpath, $rempath)
{
- if (! $this->_is_conn())
+ if ( ! $this->_is_conn())
{
return FALSE;
}
@@ -490,10 +490,10 @@ class CI_FTP {
if ($fp = @opendir($locpath))
{
// Attempt to open the remote file path.
- if (! $this->changedir($rempath, TRUE))
+ if ( ! $this->changedir($rempath, TRUE))
{
// If it doesn't exist we'll attempt to create the direcotory
- if (! $this->mkdir($rempath) OR ! $this->changedir($rempath))
+ if ( ! $this->mkdir($rempath) OR ! $this->changedir($rempath))
{
return FALSE;
}
@@ -586,7 +586,7 @@ class CI_FTP {
*/
function close()
{
- if (! $this->_is_conn())
+ if ( ! $this->_is_conn())
{
return FALSE;
}
@@ -613,6 +613,6 @@ class CI_FTP {
}
// END FTP Class
-
-/* End of file Ftp.php */
+
+/* End of file Ftp.php */
/* Location: ./system/libraries/Ftp.php */ \ No newline at end of file