From 28ab6904994da62b9a1933cc4b8bc48b7ed27f27 Mon Sep 17 00:00:00 2001 From: tomas Date: Tue, 4 Jan 2005 03:02:06 +0000 Subject: [PATCH] solution of http://bugs.campware.org/view.php?id=523 and minor changes --- livesupport/modules/storageServer/var/BasicStor.php | 10 +++++----- livesupport/modules/storageServer/var/LocStor.php | 6 +++--- .../modules/storageServer/var/xmlrpc/xrLocStor.php | 3 ++- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/livesupport/modules/storageServer/var/BasicStor.php b/livesupport/modules/storageServer/var/BasicStor.php index 521f3c031..958492a07 100644 --- a/livesupport/modules/storageServer/var/BasicStor.php +++ b/livesupport/modules/storageServer/var/BasicStor.php @@ -23,7 +23,7 @@ Author : $Author: tomas $ - Version : $Revision: 1.8 $ + Version : $Revision: 1.9 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/BasicStor.php,v $ ------------------------------------------------------------------------------*/ @@ -48,7 +48,7 @@ require_once "Transport.php"; * Core of LiveSupport file storage module * * @author $Author: tomas $ - * @version $Revision: 1.8 $ + * @version $Revision: 1.9 $ * @see Alib */ class BasicStor extends Alib{ @@ -362,7 +362,7 @@ class BasicStor extends Alib{ $fname = "{$this->accessDir}/$token"; touch($fname); // is it needed? $url = $this->getUrlPart()."xmlrpc/put.php?token=$token"; - return array('url'=>$url, 'token'=>$token); + return array('url'=>$url, 'token'=>$token, 'gunid'=>$gunid); } /** @@ -667,8 +667,8 @@ class BasicStor extends Alib{ $o[] = $t2hd = $this->getObjId('test2', $this->storId); $o[] = $this->bsCreateFolder($t2hd, 'test2_folder1'); - $o[] = $this->bsPutFile($t1hd, 'file1.mp3', "$exdir/ex1.mp3", ''); - $o[] = $this->bsPutFile($t1d12, 'file2.wav', "$exdir/ex2.wav", ''); + $o[] = $this->bsPutFile($t1hd, 'file1.mp3', "$exdir/ex1.mp3", '', NULL, 'audioclip'); + $o[] = $this->bsPutFile($t1d12, 'file2.wav', "$exdir/ex2.wav", '', NULL, 'audioclip'); /* */ $this->tdata['storage'] = $o; diff --git a/livesupport/modules/storageServer/var/LocStor.php b/livesupport/modules/storageServer/var/LocStor.php index fd9220f2e..3dae01997 100644 --- a/livesupport/modules/storageServer/var/LocStor.php +++ b/livesupport/modules/storageServer/var/LocStor.php @@ -23,7 +23,7 @@ Author : $Author: tomas $ - Version : $Revision: 1.14 $ + Version : $Revision: 1.15 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/LocStor.php,v $ ------------------------------------------------------------------------------*/ @@ -106,7 +106,7 @@ class LocStor extends GreenBox{ $ac =& StoredFile::recallByToken(&$this, $token); if(PEAR::isError($ac)){ return $ac; } $fname = $this->bsClosePut($token); - if(PEAR::isError($fname)){ return $fname; } + if(PEAR::isError($fname)){ $ac->delete(); return $fname; } $res = $ac->replaceRawMediaData($fname); if(PEAR::isError($res)){ return $res; } if(file_exists($fname)) @unlink($fname); @@ -394,7 +394,7 @@ class LocStor extends GreenBox{ if(PEAR::isError($res)) return $res; $res = $ac->setMime('application/smil'); if(PEAR::isError($res)) return $res; - return $playlistId; + return $ac->gunid; } /** diff --git a/livesupport/modules/storageServer/var/xmlrpc/xrLocStor.php b/livesupport/modules/storageServer/var/xmlrpc/xrLocStor.php index de75d6e1d..1b960d7ee 100644 --- a/livesupport/modules/storageServer/var/xmlrpc/xrLocStor.php +++ b/livesupport/modules/storageServer/var/xmlrpc/xrLocStor.php @@ -23,7 +23,7 @@ Author : $Author: tomas $ - Version : $Revision: 1.11 $ + Version : $Revision: 1.12 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/xmlrpc/xrLocStor.php,v $ ------------------------------------------------------------------------------*/ @@ -233,6 +233,7 @@ class XR_LocStor extends LocStor{ * * * On errors, returns an XML-RPC error response.