mirror of
https://github.com/php/php-src.git
synced 2025-01-21 03:03:41 +08:00
* Converting tabs to spaces
This commit is contained in:
parent
254456a4a6
commit
ba7d6efe7b
@ -76,21 +76,23 @@ class PEAR_Command_Mirror extends PEAR_Command_Common
|
||||
*/
|
||||
function doDownloadAll($command, $options, $params)
|
||||
{
|
||||
$this->config->set("php_dir", ".");
|
||||
$remote = &new PEAR_Remote($this->config);
|
||||
$remoteInfo = $remote->call("package.listAll");
|
||||
if(PEAR::isError($remoteInfo)) {
|
||||
return $remoteInfo;
|
||||
}
|
||||
$cmd = &PEAR_Command::factory("download", $this->config);
|
||||
if(PEAR::isError($cmd)) {
|
||||
return $cmd;
|
||||
}
|
||||
foreach($remoteInfo as $pkgn=>$pkg) {
|
||||
// error handling not neccesary, because
|
||||
// already done by the download command
|
||||
$cmd->run("download", array(), array($pkgn));
|
||||
}
|
||||
$this->config->set("php_dir", ".");
|
||||
$remote = &new PEAR_Remote($this->config);
|
||||
$remoteInfo = $remote->call("package.listAll");
|
||||
if (PEAR::isError($remoteInfo)) {
|
||||
return $remoteInfo;
|
||||
}
|
||||
$cmd = &PEAR_Command::factory("download", $this->config);
|
||||
if (PEAR::isError($cmd)) {
|
||||
return $cmd;
|
||||
}
|
||||
foreach ($remoteInfo as $pkgn => $pkg) {
|
||||
/**
|
||||
* Error handling not neccesary, because already done by
|
||||
* the download command
|
||||
*/
|
||||
$cmd->run("download", array(), array($pkgn));
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user