diff --git a/livesupport/modules/storageServer/var/xmlrpc/XR_LocStor.php b/livesupport/modules/storageServer/var/xmlrpc/XR_LocStor.php index f7e0e41fc..62160ad17 100644 --- a/livesupport/modules/storageServer/var/xmlrpc/XR_LocStor.php +++ b/livesupport/modules/storageServer/var/xmlrpc/XR_LocStor.php @@ -23,7 +23,7 @@ Author : $Author: tomas $ - Version : $Revision: 1.21 $ + Version : $Revision: 1.22 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/xmlrpc/XR_LocStor.php,v $ ------------------------------------------------------------------------------*/ @@ -849,6 +849,53 @@ class XR_LocStor extends LocStor{ return new XML_RPC_Response(XML_RPC_encode(array('plid'=>$res))); } + /** + * RollBack playlist changes to the locked state + * + * The XML-RPC name of this method is "locstor.revertEditedPlaylist". + * + * The input parameters are an XML-RPC struct with the following + * fields: + * + * + * On success, returns a XML-RPC struct with single field: + * + * + * On errors, returns an XML-RPC error response. + * The possible error codes and error message are: + * + * + * @param input XMLRPC struct + * @return XMLRPC struct + * @see LocStor::revertEditedPlaylist + */ + function xr_revertEditedPlaylist($input) + { + list($ok, $r) = $this->_xr_getPars($input); + if(!$ok) return $r; + $res = $this->revertEditedPlaylist( + $r['token'], $r['sessid']); + if(PEAR::isError($res)){ + return new XML_RPC_Response(0, 805, + "xr_revertEditedPlaylist: ".$res->getMessage(). + " ".$res->getUserInfo() + ); + } + return new XML_RPC_Response(XML_RPC_encode(array('plid'=>$res))); + } + /** * Delete a Playlist metafile - DISABLED now! * diff --git a/livesupport/modules/storageServer/var/xmlrpc/xrLocStor.php b/livesupport/modules/storageServer/var/xmlrpc/xrLocStor.php index 4373f68ae..41b9291f3 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.25 $ + Version : $Revision: 1.26 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/xmlrpc/xrLocStor.php,v $ ------------------------------------------------------------------------------*/ @@ -111,6 +111,7 @@ $methods = array( 'createPlaylist' => 'Create a new Playlist metafile.', 'editPlaylist' => 'Open a Playlist metafile for editing.', 'savePlaylist' => 'Save a Playlist metafile.', + 'revertEditedPlaylist' => 'RollBack playlist changes to the locked state.', 'deletePlaylist' => 'Delete a Playlist metafile.', 'accessPlaylist' => 'Open readable URL to a Playlist metafile.', 'releasePlaylist' => 'Release readable URL from accessPlaylist.', diff --git a/livesupport/modules/storageServer/var/xmlrpc/xr_cli_test.php b/livesupport/modules/storageServer/var/xmlrpc/xr_cli_test.php index 2b05f6427..9a11a2b4f 100644 --- a/livesupport/modules/storageServer/var/xmlrpc/xr_cli_test.php +++ b/livesupport/modules/storageServer/var/xmlrpc/xr_cli_test.php @@ -23,7 +23,7 @@ Author : $Author: tomas $ - Version : $Revision: 1.9 $ + Version : $Revision: 1.10 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/xmlrpc/xr_cli_test.php,v $ ------------------------------------------------------------------------------*/ @@ -117,6 +117,8 @@ $infos = array( 'p'=>array('sessid', 'plid'), 'r'=>array('url', 'token')), "savePlaylist" => array('m'=>"locstor.savePlaylist", 'p'=>array('sessid', 'token', 'newPlaylist'), 'r'=>'plid'), + "revertEditedPlaylist" => array('m'=>"locstor.revertEditedPlaylist", + 'p'=>array('sessid', 'token'), 'r'=>'plid'), "deletePlaylist" => array('m'=>"locstor.deletePlaylist", 'p'=>array('sessid', 'plid'), 'r'=>'status'), "accessPlaylist" => array('m'=>"locstor.accessPlaylist",