Get rid of unneeded data copying ( = = someFunction()).
This commit is contained in:
parent
0de001046f
commit
040683b700
|
@ -264,11 +264,11 @@ class Restore {
|
||||||
$tree = XmlParser::parse($file);
|
$tree = XmlParser::parse($file);
|
||||||
$mediaFileLP = str_replace('.xml','',$file);
|
$mediaFileLP = str_replace('.xml','',$file);
|
||||||
$mediaFileLP = ($type=='audioClip' && is_file($mediaFileLP))?$mediaFileLP:'';
|
$mediaFileLP = ($type=='audioClip' && is_file($mediaFileLP))?$mediaFileLP:'';
|
||||||
$ex = $r = $this->gb->existsFile($this->sessid,$gunid);
|
$ex = $this->gb->existsFile($this->sessid,$gunid);
|
||||||
if (PEAR::isError($r)) {
|
if (PEAR::isError($ex)) {
|
||||||
$this->addLogItem("-E- ".date("Ymd-H:i:s").
|
$this->addLogItem("-E- ".date("Ymd-H:i:s").
|
||||||
" addFileToStorage - existsFile($gunid) ".
|
" addFileToStorage - existsFile($gunid) ".
|
||||||
"(".$r->getMessage()."/".$r->getUserInfo().")\n"
|
"(".$ex->getMessage()."/".$ex->getUserInfo().")\n"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (!PEAR::isError($ex) && $ex) { // file is exists in storage server
|
if (!PEAR::isError($ex) && $ex) { // file is exists in storage server
|
||||||
|
@ -325,13 +325,13 @@ class Restore {
|
||||||
return $put;
|
return $put;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$ac = $r = StoredFile::recallByGunid($this->gb, $gunid);
|
$ac = StoredFile::recallByGunid($this->gb, $gunid);
|
||||||
if (PEAR::isError($r)) {
|
if (PEAR::isError($ac)) {
|
||||||
return $r;
|
return $ac;
|
||||||
}
|
}
|
||||||
$res = $r = $ac->setState('ready');
|
$res = $ac->setState('ready');
|
||||||
if (PEAR::isError($r)) {
|
if (PEAR::isError($res)) {
|
||||||
return $r;
|
return $res;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue