Backup and playlist render dummy methods fixed.
This commit is contained in:
parent
588de8d2ac
commit
2c7630c800
1 changed files with 79 additions and 30 deletions
|
@ -803,9 +803,10 @@ class GreenBox extends BasicStor{
|
||||||
*/
|
*/
|
||||||
function renderPlaylistToFileOpen($sessid, $plid)
|
function renderPlaylistToFileOpen($sessid, $plid)
|
||||||
{
|
{
|
||||||
return PEAR::raiseError(
|
$token = '123456789abcdeff';
|
||||||
"GreenBox::renderPlaylistToFileOpen: not implemented"
|
$fakeFile = "{$this->accessDir}/$token.ogg";
|
||||||
);
|
file_put_contents($fakeFile, "fake renderred file");
|
||||||
|
return array('token'=>$token);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -818,8 +819,15 @@ class GreenBox extends BasicStor{
|
||||||
*/
|
*/
|
||||||
function renderPlaylistToFileCheck($token)
|
function renderPlaylistToFileCheck($token)
|
||||||
{
|
{
|
||||||
|
$fakeFile = "{$this->accessDir}/$token.ogg";
|
||||||
|
if($token != '123456789abcdeff' || !file_exists($fakeFile)){
|
||||||
return PEAR::raiseError(
|
return PEAR::raiseError(
|
||||||
"GreenBox::renderPlaylistToFileCheck: not implemented"
|
"GreenBox::renderPlaylistToFileCheck: invalid token ($token)"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return array(
|
||||||
|
'status'=> 'success',
|
||||||
|
'tmpfile' => $fakeFile,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -831,10 +839,15 @@ class GreenBox extends BasicStor{
|
||||||
*/
|
*/
|
||||||
function renderPlaylistToFileClose($token)
|
function renderPlaylistToFileClose($token)
|
||||||
{
|
{
|
||||||
|
if($token != '123456789abcdeff'){
|
||||||
return PEAR::raiseError(
|
return PEAR::raiseError(
|
||||||
"GreenBox::renderPlaylistToFileClose: not implemented"
|
"GreenBox::renderPlaylistToFileClose: invalid token"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
$fakeFile = "{$this->accessDir}/$token.ogg";
|
||||||
|
unlink($fakeFile);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -846,9 +859,10 @@ class GreenBox extends BasicStor{
|
||||||
*/
|
*/
|
||||||
function renderPlaylistToStorageOpen($sessid, $plid)
|
function renderPlaylistToStorageOpen($sessid, $plid)
|
||||||
{
|
{
|
||||||
return PEAR::raiseError(
|
$token = '123456789abcdeff';
|
||||||
"GreenBox::renderPlaylistToStorageOpen: not implemented"
|
$fakeFile = "{$this->accessDir}/$token.ogg";
|
||||||
);
|
file_put_contents($fakeFile, "fake renderred file");
|
||||||
|
return array('token'=>$token);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -861,8 +875,16 @@ class GreenBox extends BasicStor{
|
||||||
*/
|
*/
|
||||||
function renderPlaylistToStorageCheck($token)
|
function renderPlaylistToStorageCheck($token)
|
||||||
{
|
{
|
||||||
|
$fakeFile = "{$this->accessDir}/$token.ogg";
|
||||||
|
if($token != '123456789abcdeff' || !file_exists($fakeFile)){
|
||||||
return PEAR::raiseError(
|
return PEAR::raiseError(
|
||||||
"GreenBox::renderPlaylistToStorageCheck: not implemented"
|
"GreenBox::renderPlaylistToStorageCheck: invalid token ($token)"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
unlink($fakeFile);
|
||||||
|
return array(
|
||||||
|
'status'=> 'success',
|
||||||
|
'gunid' => '0000000000010001',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -876,9 +898,10 @@ class GreenBox extends BasicStor{
|
||||||
*/
|
*/
|
||||||
function renderPlaylistToRSSOpen($sessid, $plid)
|
function renderPlaylistToRSSOpen($sessid, $plid)
|
||||||
{
|
{
|
||||||
return PEAR::raiseError(
|
$token = '123456789abcdeff';
|
||||||
"GreenBox::renderPlaylistToRSSOpen: not implemented"
|
$fakeFile = "{$this->accessDir}/$token.rss";
|
||||||
);
|
file_put_contents($fakeFile, "fake renderred file");
|
||||||
|
return array('token'=>$token);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -891,8 +914,15 @@ class GreenBox extends BasicStor{
|
||||||
*/
|
*/
|
||||||
function renderPlaylistToRSSCheck($token)
|
function renderPlaylistToRSSCheck($token)
|
||||||
{
|
{
|
||||||
|
$fakeFile = "{$this->accessDir}/$token.rss";
|
||||||
|
if($token != '123456789abcdeff' || !file_exists($fakeFile)){
|
||||||
return PEAR::raiseError(
|
return PEAR::raiseError(
|
||||||
"GreenBox::renderPlaylistToRSSCheck: not implemented"
|
"LocStor::renderPlaylistToRSSCheck: invalid token ($token)"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return array(
|
||||||
|
'status'=> 'success',
|
||||||
|
'tmpfile' => $fakeFile,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -904,10 +934,15 @@ class GreenBox extends BasicStor{
|
||||||
*/
|
*/
|
||||||
function renderPlaylistToRSSClose($token)
|
function renderPlaylistToRSSClose($token)
|
||||||
{
|
{
|
||||||
|
if($token != '123456789abcdeff'){
|
||||||
return PEAR::raiseError(
|
return PEAR::raiseError(
|
||||||
"GreenBox::renderPlaylistToRSSClose: not implemented"
|
"GreenBox::renderPlaylistToRSSClose: invalid token"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
$fakeFile = "{$this->accessDir}/$token.rss";
|
||||||
|
unlink($fakeFile);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*================================================= storage admin methods */
|
/*================================================= storage admin methods */
|
||||||
|
@ -919,11 +954,12 @@ class GreenBox extends BasicStor{
|
||||||
* @param criteria : struct - see search criteria
|
* @param criteria : struct - see search criteria
|
||||||
* @return token : string - backup token
|
* @return token : string - backup token
|
||||||
*/
|
*/
|
||||||
function createBackupOpen($sessid, $criteria)
|
function createBackupOpen($sessid, $criteria='')
|
||||||
{
|
{
|
||||||
return PEAR::raiseError(
|
$token = '123456789abcdeff';
|
||||||
"GreenBox::createBackupOpen: not implemented"
|
$fakeFile = "{$this->accessDir}/$token.tar";
|
||||||
);
|
file_put_contents($fakeFile, "fake archive file");
|
||||||
|
return array('token'=>$token);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -937,8 +973,16 @@ class GreenBox extends BasicStor{
|
||||||
*/
|
*/
|
||||||
function createBackupCheck($token)
|
function createBackupCheck($token)
|
||||||
{
|
{
|
||||||
|
$fakeFile = "{$this->accessDir}/$token.tar";
|
||||||
|
if($token != '123456789abcdeff' || !file_exists($fakeFile)){
|
||||||
return PEAR::raiseError(
|
return PEAR::raiseError(
|
||||||
"GreenBox::createBackupCheck: not implemented"
|
"LocStor::createBackupCheck: invalid token ($token)"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return array(
|
||||||
|
'status'=> 'success',
|
||||||
|
'tmpfile' => $fakeFile,
|
||||||
|
'metafile' => '',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -950,10 +994,15 @@ class GreenBox extends BasicStor{
|
||||||
*/
|
*/
|
||||||
function createBackupClose($token)
|
function createBackupClose($token)
|
||||||
{
|
{
|
||||||
|
if($token != '123456789abcdeff'){
|
||||||
return PEAR::raiseError(
|
return PEAR::raiseError(
|
||||||
"GreenBox::createBackupClose: not implemented"
|
"LocStor::createBackupClose: invalid token"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
$fakeFile = "{$this->accessDir}/$token.tar";
|
||||||
|
unlink($fakeFile);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
/* ============================================== methods for preferences */
|
/* ============================================== methods for preferences */
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue