Changes for:

http://bugs.campware.org/view.php?id=546
This commit is contained in:
tomas 2005-01-15 13:50:51 +00:00
parent 5a749c7977
commit 5776b42b12
3 changed files with 45 additions and 11 deletions

View File

@ -23,7 +23,7 @@
Author : $Author: tomas $
Version : $Revision: 1.17 $
Version : $Revision: 1.18 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/LocStor.php,v $
------------------------------------------------------------------------------*/
@ -397,11 +397,26 @@ class LocStor extends GreenBox{
include"../tests/sampleData.php";
$res = array();
foreach($sampleData as $k=>$it){
list($media, $meta) = $it;
# $r = $this->putFile($rootHD, "file".($k+1), $media, $meta, $s);
$r = $this->bsPutFile(
$rootHD, basename($media), $media, $meta, '', 'audioclip'
);
switch($it['type']){
case"audioclip":
$media = $it['media'];
$xml = $it['xml'];
if(isset($it['gunid'])) $gunid = $it['gunid'];
else $gunid = '';
$r = $this->bsPutFile(
$rootHD, basename($media),
$media, $xml, $gunid, 'audioclip'
);
break;
case"playlist":
$xml = $it['xml'];
if(isset($it['gunid'])) $gunid = $it['gunid'];
else $gunid = '';
$r = $this->bsPutFile(
$rootHD, basename($xml), '', $xml, $gunid, 'playlist'
);
break;
}
if(PEAR::isError($r)){ return $r; }
$res[] = $this->_gunidFromId($r);
}

View File

@ -1,7 +1,25 @@
<?
$sampleData = array(
array('../tests/ex1.mp3', '../tests/mdata1.xml'),
array('../tests/ex2.ogg', '../tests/mdata2.xml'),
array('../tests/ex3.wav', '../tests/mdata3.xml')
array(
'type' => 'audioclip',
'media' => '../tests/ex1.mp3',
'xml' => '../tests/mdata1.xml',
'gunid' => '123456789abcdef1'
),
array(
'type' => 'audioclip',
'media' => '../tests/ex2.ogg',
'xml' => '../tests/mdata2.xml',
'gunid' => '123456789abcdef2'
),
array(
'type' => 'audioclip',
'media' => '../tests/ex3.wav',
'xml' => '../tests/mdata3.xml'
),
array(
'type' => 'playlist',
'xml' => '../tests/plist1.xml'
)
);
?>

View File

@ -23,7 +23,7 @@
Author : $Author: tomas $
Version : $Revision: 1.4 $
Version : $Revision: 1.5 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/xmlrpc/XR_LocStor.php,v $
------------------------------------------------------------------------------*/
@ -1188,7 +1188,8 @@ class XR_LocStor extends LocStor{
*
* On success, returns a XML-RPC struct with single field:
* <ul>
* <li> gunids : array - array with gunids of inserted files </li>
* <li> gunids : array -
* array with gunids/playlisIds of inserted files </li>
* </ul>
*
* On errors, returns an XML-RPC error response.