minor changes

This commit is contained in:
tomas 2005-01-20 01:54:18 +00:00
parent c500ab2254
commit 47ec93ad47
2 changed files with 10 additions and 7 deletions

View File

@ -23,7 +23,7 @@
Author : $Author: tomas $ Author : $Author: tomas $
Version : $Revision: 1.23 $ Version : $Revision: 1.24 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/LocStor.php,v $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/LocStor.php,v $
------------------------------------------------------------------------------*/ ------------------------------------------------------------------------------*/
@ -46,6 +46,7 @@ class LocStor extends BasicStor{
* @param fname string, human readable menmonic file name * @param fname string, human readable menmonic file name
* with extension corresponding to filetype * with extension corresponding to filetype
* @param chsum string, md5 checksum of media file * @param chsum string, md5 checksum of media file
* @param ftype string audioclip | playlist
* @return struct {url:writable URL for HTTP PUT, token:access token * @return struct {url:writable URL for HTTP PUT, token:access token
*/ */
function storeAudioClipOpen( function storeAudioClipOpen(
@ -212,8 +213,8 @@ class LocStor extends BasicStor{
*/ */
function downloadMetadataOpen($sessid, $gunid) function downloadMetadataOpen($sessid, $gunid)
{ {
# $res = $this->existsAudioClip($sessid, $gunid); // $res = $this->existsAudioClip($sessid, $gunid);
# if(PEAR::isError($res)) return $res; // if(PEAR::isError($res)) return $res;
$id = $this->_idFromGunid($gunid); $id = $this->_idFromGunid($gunid);
if(is_null($id)){ if(is_null($id)){
return PEAR::raiseError( return PEAR::raiseError(
@ -271,6 +272,8 @@ class LocStor extends BasicStor{
* (may be empty or ommited only with less then 2 items in * (may be empty or ommited only with less then 2 items in
* "conditions" field) * "conditions" field)
* </li> * </li>
* <li>limit : int - limit for result arrays (0 means unlimited)</li>
* <li>offset : int - starting point (0 means without offset)</li>
* <li>conditions - array of hashes with structure: * <li>conditions - array of hashes with structure:
* <ul> * <ul>
* <li>cat - string, metadata category name</li> * <li>cat - string, metadata category name</li>

View File

@ -23,7 +23,7 @@
Author : $Author: tomas $ Author : $Author: tomas $
Version : $Revision: 1.4 $ Version : $Revision: 1.5 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/Transport.php,v $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/Transport.php,v $
------------------------------------------------------------------------------*/ ------------------------------------------------------------------------------*/
@ -388,7 +388,7 @@ class Transport{
'archive.storeAudioClipClose', 'archive.storeAudioClipClose',
array('sessid'=>$asessid, 'token'=>$row['pdtoken']) array('sessid'=>$asessid, 'token'=>$row['pdtoken'])
); );
# if(PEAR::isError($res)) return $res; // if(PEAR::isError($res)) return $res;
if(PEAR::isError($res)){ if(PEAR::isError($res)){
switch($res->getCode()){ switch($res->getCode()){
case GBERR_PUT: case GBERR_PUT:
@ -400,7 +400,6 @@ class Transport{
break; break;
return FALSE; return FALSE;
default: default:
# echo $res->getCode()."\n"; exit;
return $res; return $res;
} }
} }
@ -460,7 +459,7 @@ class Transport{
if(PEAR::isError($uid)) return $uid; if(PEAR::isError($uid)) return $uid;
if(is_null($uid)){ if(is_null($uid)){
return PEAR::raiseError("Transport::downloadFromArchive: ". return PEAR::raiseError("Transport::downloadFromArchive: ".
"invalid session id",GBERR_SESS); "invalid session id", GBERR_SESS);
} }
$parid = $this->gb->_getHomeDirId($sessid); $parid = $this->gb->_getHomeDirId($sessid);
if(PEAR::isError($parid)) return $parid; if(PEAR::isError($parid)) return $parid;
@ -873,6 +872,7 @@ class Transport{
* logging wrapper for PEAR error object * logging wrapper for PEAR error object
* *
* @param eo PEAR error object * @param eo PEAR error object
* @param row array returned from getRow
*/ */
function trLogPear($eo, $row=NULL) function trLogPear($eo, $row=NULL)
{ {