Commit 62e5dafd authored by webchick's avatar webchick

Issue #1182374 by lyricnz, brianV: Code style fixes for includes/filetransfer.

parent 2141c28c
......@@ -56,11 +56,11 @@ protected function removeDirectoryJailed($directory) {
if (!$list) {
$list = array();
}
foreach ($list as $item){
foreach ($list as $item) {
if ($item == '.' || $item == '..') {
continue;
}
if (@ftp_chdir($this->connection, $item)){
if (@ftp_chdir($this->connection, $item)) {
ftp_cdup($this->connection);
$this->removeDirectory(ftp_pwd($this->connection) . '/' . $item);
}
......@@ -108,7 +108,7 @@ public function isFile($path) {
*/
function chmodJailed($path, $mode, $recursive) {
if (!ftp_chmod($this->connection, $mode, $path)) {
throw new FileTransferException("Unable to set permissions on %file", NULL, array ('%file' => $path));
throw new FileTransferException("Unable to set permissions on %file", NULL, array('%file' => $path));
}
if ($this->isDirectory($path) && $recursive) {
$filelist = @ftp_nlist($this->connection, $path);
......
......@@ -106,7 +106,8 @@ public function isDirectory($path) {
return TRUE;
}
return FALSE;
} else {
}
else {
throw new FileTransferException('Cannot check @path.', NULL, array('@path' => $path));
}
}
......@@ -122,7 +123,8 @@ public function isFile($path) {
return TRUE;
}
return FALSE;
} else {
}
else {
throw new FileTransferException('Cannot check @path.', NULL, array('@path' => $path));
}
}
......
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