Fixed formatting

This commit is contained in:
paul 2007-02-13 12:11:39 +00:00
parent f41791c944
commit e04e8b244d
1 changed files with 9 additions and 11 deletions

View File

@ -133,25 +133,23 @@ class Backup
$this->sessid = $sessid;
$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);
if (PEAR::isError($srch)) {
return $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)) {
$this->setFilenames();
#echo '<XMP>this->filenames:'; print_r($this->filenames); echo '</XMP>';
$this->setEnviroment(true);
# write a status file
// write a status file
file_put_contents($this->statusFile, 'working');
# save the metafile to tmpdir
// save the metafile to tmpdir
$hostname = trim(`hostname`);
$ctime = time();
$ctime_f = date("Ymd-H:i:s");
@ -165,10 +163,10 @@ class Backup
"/><!-- $ctime_f -->\n"
);
# copy all file to tmpdir
// copy all file to tmpdir
$this->copyAllFiles();
# do everything
// do everything
$this->doIt();
return array('token'=>$this->token);
@ -298,7 +296,7 @@ class Backup
$this->addLogItem("-I- ".date("Ymd-H:i:s")." setFilenames\n");
}
if (is_array($this->ids)) {
foreach ($this->ids as $i=>$item) {
foreach ($this->ids as $i => $item) {
$gunid = $item['gunid'];
// get a stored file object of this gunid
$sf = StoredFile::RecallByGunid($gunid);
@ -310,8 +308,8 @@ class Backup
$this->addLogItem("-E- ".date("Ymd-H:i:s")." setFilenames - authorize gunid:$gunid\n");
return PEAR::raiseError('Backup::setFilenames : Authorize ... error.');
}
// if the file is a playlist then it have only meta file
if (strtolower($sf->md->format)!='playlist') {
// if the file is a playlist then it has only a meta file
if (strtolower($sf->md->format) != 'playlist') {
$this->filenames[] = array(
'filename' => $sf->getRealFileName(),
'format' => $sf->md->format