parent
5a749c7977
commit
5776b42b12
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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'
|
||||
)
|
||||
);
|
||||
?>
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue