The revertEditedPlaylist method moved to LocStor.
This commit is contained in:
parent
f75834dc22
commit
2d9bb23bbe
2 changed files with 29 additions and 15 deletions
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
|
|
||||||
Author : $Author: tomas $
|
Author : $Author: tomas $
|
||||||
Version : $Revision: 1.65 $
|
Version : $Revision: 1.66 $
|
||||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/GreenBox.php,v $
|
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/GreenBox.php,v $
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
------------------------------------------------------------------------------*/
|
||||||
|
@ -35,7 +35,7 @@ require_once "BasicStor.php";
|
||||||
* LiveSupport file storage module
|
* LiveSupport file storage module
|
||||||
*
|
*
|
||||||
* @author $Author: tomas $
|
* @author $Author: tomas $
|
||||||
* @version $Revision: 1.65 $
|
* @version $Revision: 1.66 $
|
||||||
* @see BasicStor
|
* @see BasicStor
|
||||||
*/
|
*/
|
||||||
class GreenBox extends BasicStor{
|
class GreenBox extends BasicStor{
|
||||||
|
@ -611,19 +611,11 @@ class GreenBox extends BasicStor{
|
||||||
* @param sessid string, session ID
|
* @param sessid string, session ID
|
||||||
* @return string gunid of playlist
|
* @return string gunid of playlist
|
||||||
*/
|
*/
|
||||||
function revertEditedPlaylist($token, $sessid)
|
function revertEditedPlaylist($token, $sessid='')
|
||||||
{
|
{
|
||||||
$gunid = $this->bsCloseDownload($token, 'metadata');
|
require_once"LocStor.php";
|
||||||
if(PEAR::isError($gunid)) return $gunid;
|
$lc =& new LocStor($this->dbc, $this->config);
|
||||||
$ac =& StoredFile::recallByGunid($this, $gunid);
|
return $lc->revertEditedPlaylist($token, $sessid);
|
||||||
if(PEAR::isError($ac)){ return $ac; }
|
|
||||||
$id = $ac->getId();
|
|
||||||
$mdata = $ac->getMetaData();
|
|
||||||
if(PEAR::isError($mdata)){ return $mdata; }
|
|
||||||
$res = $ac->replaceMetaData($mdata, 'string');
|
|
||||||
if(PEAR::isError($res)){ return $res; }
|
|
||||||
$this->_setEditFlag($gunid, FALSE, $sessid);
|
|
||||||
return $gunid;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
|
|
||||||
Author : $Author: tomas $
|
Author : $Author: tomas $
|
||||||
Version : $Revision: 1.39 $
|
Version : $Revision: 1.40 $
|
||||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/LocStor.php,v $
|
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/LocStor.php,v $
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
------------------------------------------------------------------------------*/
|
||||||
|
@ -562,6 +562,28 @@ class LocStor extends BasicStor{
|
||||||
return $playlistId;
|
return $playlistId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* RollBack playlist changes to the locked state
|
||||||
|
*
|
||||||
|
* @param token string, playlist access token
|
||||||
|
* @param sessid string, session ID
|
||||||
|
* @return string gunid of playlist
|
||||||
|
*/
|
||||||
|
function revertEditedPlaylist($playlistToken, $sessid='')
|
||||||
|
{
|
||||||
|
$gunid = $this->bsCloseDownload($playlistToken, 'metadata');
|
||||||
|
if(PEAR::isError($gunid)) return $gunid;
|
||||||
|
$ac =& StoredFile::recallByGunid($this, $gunid);
|
||||||
|
if(PEAR::isError($ac)){ return $ac; }
|
||||||
|
$id = $ac->getId();
|
||||||
|
$mdata = $ac->getMetaData();
|
||||||
|
if(PEAR::isError($mdata)){ return $mdata; }
|
||||||
|
$res = $ac->replaceMetaData($mdata, 'string');
|
||||||
|
if(PEAR::isError($res)){ return $res; }
|
||||||
|
$this->_setEditFlag($gunid, FALSE, $sessid);
|
||||||
|
return $gunid;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete a Playlist metafile.
|
* Delete a Playlist metafile.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue