Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions src/wp-admin/includes/class-ftp.php
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,7 @@ function put($localfile, $remotefile=NULL, $rest=0) {
return $ret;
}

function mput($local=".", $remote=NULL, $continious=false) {
function mput($local=".", $remote=NULL, $continuous=false) {
$local=realpath($local);
if(!@file_exists($local)) {
$this->PushError("mput","can't open local folder", "Cannot stat folder \"".$local."\"");
Expand All @@ -672,14 +672,14 @@ function mput($local=".", $remote=NULL, $continious=false) {
else $t=$this->put($local."/".$el, $remote."/".$el);
if(!$t) {
$ret=FALSE;
if(!$continious) break;
if(!$continuous) break;
}
}
return $ret;

}

function mget($remote, $local=".", $continious=false) {
function mget($remote, $local=".", $continuous=false) {
$list=$this->rawlist($remote, "-lA");
if($list===false) {
$this->PushError("mget","can't read remote folder list", "Can't read remote folder \"".$remote."\" contents");
Expand All @@ -699,16 +699,16 @@ function mget($remote, $local=".", $continious=false) {
$ret=true;
foreach($list as $el) {
if($el["type"]=="d") {
if(!$this->mget($remote."/".$el["name"], $local."/".$el["name"], $continious)) {
if(!$this->mget($remote."/".$el["name"], $local."/".$el["name"], $continuous)) {
$this->PushError("mget", "can't copy folder", "Can't copy remote folder \"".$remote."/".$el["name"]."\" to local \"".$local."/".$el["name"]."\"");
$ret=false;
if(!$continious) break;
if(!$continuous) break;
}
} else {
if(!$this->get($remote."/".$el["name"], $local."/".$el["name"])) {
$this->PushError("mget", "can't copy file", "Can't copy remote file \"".$remote."/".$el["name"]."\" to local \"".$local."/".$el["name"]."\"");
$ret=false;
if(!$continious) break;
if(!$continuous) break;
}
}
@chmod($local."/".$el["name"], $el["perms"]);
Expand All @@ -718,7 +718,7 @@ function mget($remote, $local=".", $continious=false) {
return $ret;
}

function mdel($remote, $continious=false) {
function mdel($remote, $continuous=false) {
$list=$this->rawlist($remote, "-la");
if($list===false) {
$this->PushError("mdel","can't read remote folder list", "Can't read remote folder \"".$remote."\" contents");
Expand All @@ -736,15 +736,15 @@ function mdel($remote, $continious=false) {
continue;

if($el["type"]=="d") {
if(!$this->mdel($remote."/".$el["name"], $continious)) {
if(!$this->mdel($remote."/".$el["name"], $continuous)) {
$ret=false;
if(!$continious) break;
if(!$continuous) break;
}
} else {
if (!$this->delete($remote."/".$el["name"])) {
$this->PushError("mdel", "can't delete file", "Can't delete remote file \"".$remote."/".$el["name"]."\"");
$ret=false;
if(!$continious) break;
if(!$continuous) break;
}
}
}
Expand Down