The locstor.playlistIsAvailable method returns additional ownerid and ownerlogin
fields in the result. (#1293)
This commit is contained in:
parent
da017f9200
commit
8427aae7ac
2 changed files with 13 additions and 5 deletions
|
@ -23,7 +23,7 @@
|
|||
|
||||
|
||||
Author : $Author: tomas $
|
||||
Version : $Revision: 1.22 $
|
||||
Version : $Revision: 1.23 $
|
||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/xmlrpc/XR_LocStor.php,v $
|
||||
|
||||
------------------------------------------------------------------------------*/
|
||||
|
@ -1102,6 +1102,8 @@ class XR_LocStor extends LocStor{
|
|||
* On success, returns a XML-RPC struct with single field:
|
||||
* <ul>
|
||||
* <li> available : boolean</li>
|
||||
* <li> ownerid : int - local user id</li>
|
||||
* <li> ownerlogin : string - local username</li>
|
||||
* </ul>
|
||||
*
|
||||
* On errors, returns an XML-RPC error response.
|
||||
|
@ -1122,14 +1124,20 @@ class XR_LocStor extends LocStor{
|
|||
{
|
||||
list($ok, $r) = $this->_xr_getPars($input);
|
||||
if(!$ok) return $r;
|
||||
$res = $this->playlistIsAvailable($r['sessid'], $r['plid']);
|
||||
$res = $this->playlistIsAvailable($r['sessid'], $r['plid'], TRUE);
|
||||
$ownerId = ($res === TRUE ? NULL : $res);
|
||||
$ownerLogin = (is_null($ownerId) ? NULL : $this->getSubjName($ownerId));
|
||||
if(PEAR::isError($res)){
|
||||
return new XML_RPC_Response(0, 805,
|
||||
"xr_playlistIsAvailable: ".$res->getMessage().
|
||||
" ".$res->getUserInfo()
|
||||
);
|
||||
}
|
||||
return new XML_RPC_Response(XML_RPC_encode(array('available'=>$res)));
|
||||
return new XML_RPC_Response(XML_RPC_encode(array(
|
||||
'available' => ($res === TRUE),
|
||||
'ownerid' => $ownerId,
|
||||
'ownerlogin' => $ownerLogin,
|
||||
)));
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------- info methods */
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
|
||||
Author : $Author: tomas $
|
||||
Version : $Revision: 1.10 $
|
||||
Version : $Revision: 1.11 $
|
||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/xmlrpc/xr_cli_test.php,v $
|
||||
|
||||
------------------------------------------------------------------------------*/
|
||||
|
@ -128,7 +128,7 @@ $infos = array(
|
|||
"existsPlaylist" => array('m'=>"locstor.existsPlaylist",
|
||||
'p'=>array('sessid', 'plid'), 'r'=>'exists'),
|
||||
"playlistIsAvailable" => array('m'=>"locstor.playlistIsAvailable",
|
||||
'p'=>array('sessid', 'plid'), 'r'=>'available'),
|
||||
'p'=>array('sessid', 'plid'), 'r'=>array('available', 'ownerid', 'ownerlogin')),
|
||||
|
||||
"loadPref" => array('m'=>"locstor.loadPref",
|
||||
'p'=>array('sessid', 'key'), 'r'=>'value'),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue