Moved all file-related functions from BasicStor into StoredFile class.
Got rid of all the stuff related to GUNID hex-to-int conversion. Commented out lots of functions that are either not in use or will no longer work. Pypo: made things more generic and pluggable, added documentation. Added the PHP scripts to serve the right info back to pypo.
This commit is contained in:
parent
35dc3fd01f
commit
8a58df3093
32 changed files with 2233 additions and 2000 deletions
|
@ -26,16 +26,9 @@ function admDumpFolder(&$bs, $fid, $ind='')
|
|||
// echo $name->getMessage();
|
||||
// exit;
|
||||
// }
|
||||
$type = BasicStor::GetObjType($fid);
|
||||
if (PEAR::isError($type)) {
|
||||
echo $type->getMessage();
|
||||
exit;
|
||||
}
|
||||
$gunid = BasicStor::GunidFromId($fid);
|
||||
if (PEAR::isError($gunid)) {
|
||||
echo $gunid->getMessage();
|
||||
exit;
|
||||
}
|
||||
$media = StoredFile::Recall($fid);
|
||||
$type = $media->getType();
|
||||
$gunid = $media->getGunid();
|
||||
$pars = array();
|
||||
if ($gunid) {
|
||||
$pars['id']="$gunid";
|
||||
|
|
|
@ -209,9 +209,9 @@ function camp_import_audio_file($p_filepath, $p_importMode = null, $p_testOnly =
|
|||
"filepath" => $p_filepath,
|
||||
"md5" => $md5sum,
|
||||
);
|
||||
$storedFile = $greenbox->bsPutFile($values, $doCopyFiles);
|
||||
$storedFile = StoredFile::Insert($values, $doCopyFiles);
|
||||
if (PEAR::isError($storedFile)) {
|
||||
import_err($storedFile, "Error in bsPutFile()");
|
||||
import_err($storedFile, "Error in StoredFile::Insert()");
|
||||
echo var_export($metadata)."\n";
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -70,7 +70,7 @@ function ls_restore_restoreObject($obj, /*$parid,*/ $reallyInsert=TRUE){
|
|||
"gunid" => $obj['gunid'],
|
||||
"filetype" => strtolower($obj['type'])
|
||||
);
|
||||
$r = $bs->bsPutFile($values);
|
||||
$r = StoredFile::Insert($values);
|
||||
ls_restore_checkErr($r, __LINE__);
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue