- extra line outside php tag in Backup.php removed
 - catching exception from Backup::openBackup added
This commit is contained in:
tomash 2006-04-14 13:02:05 +00:00
parent 5c5deefb7e
commit 97a0144a66
2 changed files with 16 additions and 3 deletions

View file

@ -114,6 +114,7 @@ class Backup {
# save the metafile to tmpdir
$hostname = trim(`hostname`);
$ctime = time();
$ctime_f = date("Ymd-H:i:s");
file_put_contents("{$this->tmpDirMeta}/storage.xml",
"<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n".
"<storage\n".
@ -121,7 +122,7 @@ class Backup {
" version=\"1.0\"\n".
" ctime=\"$ctime\"\n".
" hostname=\"$hostname\"\n".
"/>\n"
"/><!-- $ctime_f -->\n"
);
# copy all file to tmpdir
@ -403,5 +404,4 @@ class Backup {
return true;
}
}
?>
?>

View file

@ -362,6 +362,13 @@ class LocStor extends BasicStor{
}
return $res;
}
function localSearch($criteria, $sessid='')
{
$limit = intval(isset($criteria['limit']) ? $criteria['limit'] : 0);
$offset = intval(isset($criteria['offset']) ? $criteria['offset'] : 0);
return $this->bsLocalSearch($criteria, $limit, $offset);
}
/**
* Return values of specified metadata category
@ -942,6 +949,12 @@ class LocStor extends BasicStor{
require_once "Backup.php";
$bu = $r = new Backup($this);
if (PEAR::isError($r)) return $r;
$r = $bu->openBackup($sessid,$criteria);
if ($r === FALSE){
return PEAR::raiseError(
"LocStor::createBackupOpen: false returned from Backup"
);
}
return $bu->openBackup($sessid,$criteria);
}