Fixed formatting
This commit is contained in:
parent
f41791c944
commit
e04e8b244d
1 changed files with 9 additions and 11 deletions
|
@ -133,25 +133,23 @@ class Backup
|
||||||
$this->sessid = $sessid;
|
$this->sessid = $sessid;
|
||||||
$this->criteria = $criteria;
|
$this->criteria = $criteria;
|
||||||
|
|
||||||
# get ids (and real filenames) which files match with criteria
|
// get ids (and real filenames) which files match with criteria
|
||||||
$srch = $this->gb->localSearch($this->criteria,$this->sessid);
|
$srch = $this->gb->localSearch($this->criteria,$this->sessid);
|
||||||
if (PEAR::isError($srch)) {
|
if (PEAR::isError($srch)) {
|
||||||
return $srch;
|
return $srch;
|
||||||
}
|
}
|
||||||
$this->setIDs($srch);
|
$this->setIDs($srch);
|
||||||
#echo '<XMP>this->ids:'; print_r($this->ids); echo '</XMP>';
|
|
||||||
|
|
||||||
# get real filenames
|
// get real filenames
|
||||||
if (is_array($this->ids)) {
|
if (is_array($this->ids)) {
|
||||||
$this->setFilenames();
|
$this->setFilenames();
|
||||||
#echo '<XMP>this->filenames:'; print_r($this->filenames); echo '</XMP>';
|
|
||||||
|
|
||||||
$this->setEnviroment(true);
|
$this->setEnviroment(true);
|
||||||
|
|
||||||
# write a status file
|
// write a status file
|
||||||
file_put_contents($this->statusFile, 'working');
|
file_put_contents($this->statusFile, 'working');
|
||||||
|
|
||||||
# save the metafile to tmpdir
|
// save the metafile to tmpdir
|
||||||
$hostname = trim(`hostname`);
|
$hostname = trim(`hostname`);
|
||||||
$ctime = time();
|
$ctime = time();
|
||||||
$ctime_f = date("Ymd-H:i:s");
|
$ctime_f = date("Ymd-H:i:s");
|
||||||
|
@ -165,10 +163,10 @@ class Backup
|
||||||
"/><!-- $ctime_f -->\n"
|
"/><!-- $ctime_f -->\n"
|
||||||
);
|
);
|
||||||
|
|
||||||
# copy all file to tmpdir
|
// copy all file to tmpdir
|
||||||
$this->copyAllFiles();
|
$this->copyAllFiles();
|
||||||
|
|
||||||
# do everything
|
// do everything
|
||||||
$this->doIt();
|
$this->doIt();
|
||||||
|
|
||||||
return array('token'=>$this->token);
|
return array('token'=>$this->token);
|
||||||
|
@ -310,7 +308,7 @@ class Backup
|
||||||
$this->addLogItem("-E- ".date("Ymd-H:i:s")." setFilenames - authorize gunid:$gunid\n");
|
$this->addLogItem("-E- ".date("Ymd-H:i:s")." setFilenames - authorize gunid:$gunid\n");
|
||||||
return PEAR::raiseError('Backup::setFilenames : Authorize ... error.');
|
return PEAR::raiseError('Backup::setFilenames : Authorize ... error.');
|
||||||
}
|
}
|
||||||
// if the file is a playlist then it have only meta file
|
// if the file is a playlist then it has only a meta file
|
||||||
if (strtolower($sf->md->format) != 'playlist') {
|
if (strtolower($sf->md->format) != 'playlist') {
|
||||||
$this->filenames[] = array(
|
$this->filenames[] = array(
|
||||||
'filename' => $sf->getRealFileName(),
|
'filename' => $sf->getRealFileName(),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue