Did some function renaming for public/private issues. Changed playlistIsAvailable() to not check if the playlist exists on disk (I think we can assume that it does if something is asking about it), it only checks if it is being edited now. This change was made for optimization purposes.
This commit is contained in:
parent
716b1d3a8c
commit
1a0cc368f0
|
@ -258,7 +258,7 @@ class LocStor extends BasicStor {
|
||||||
if (PEAR::isError($ex)) {
|
if (PEAR::isError($ex)) {
|
||||||
return $ex;
|
return $ex;
|
||||||
}
|
}
|
||||||
$id = $this->_idFromGunid($gunid);
|
$id = $this->idFromGunid($gunid);
|
||||||
if (is_null($id) || !$ex) {
|
if (is_null($id) || !$ex) {
|
||||||
return PEAR::raiseError(
|
return PEAR::raiseError(
|
||||||
"LocStor::downloadRawAudioDataOpen: gunid not found ($gunid)",
|
"LocStor::downloadRawAudioDataOpen: gunid not found ($gunid)",
|
||||||
|
@ -301,7 +301,7 @@ class LocStor extends BasicStor {
|
||||||
{
|
{
|
||||||
// $res = $this->existsAudioClip($sessid, $gunid);
|
// $res = $this->existsAudioClip($sessid, $gunid);
|
||||||
// if(PEAR::isError($res)) return $res;
|
// if(PEAR::isError($res)) return $res;
|
||||||
$id = $this->_idFromGunid($gunid);
|
$id = $this->idFromGunid($gunid);
|
||||||
if (is_null($id)) {
|
if (is_null($id)) {
|
||||||
return PEAR::raiseError(
|
return PEAR::raiseError(
|
||||||
"LocStor::downloadMetadataOpen: gunid not found ($gunid)"
|
"LocStor::downloadMetadataOpen: gunid not found ($gunid)"
|
||||||
|
@ -501,7 +501,7 @@ class LocStor extends BasicStor {
|
||||||
*/
|
*/
|
||||||
function existsFile($sessid, $gunid, $ftype=NULL)
|
function existsFile($sessid, $gunid, $ftype=NULL)
|
||||||
{
|
{
|
||||||
$id = $this->_idFromGunid($gunid);
|
$id = $this->idFromGunid($gunid);
|
||||||
if (is_null($id)) {
|
if (is_null($id)) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -649,7 +649,7 @@ class LocStor extends BasicStor {
|
||||||
'LocStor::editPlaylist: playlist not exists'
|
'LocStor::editPlaylist: playlist not exists'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if ($this->_isEdited($playlistId) !== FALSE) {
|
if ($this->isEdited($playlistId) !== FALSE) {
|
||||||
return PEAR::raiseError(
|
return PEAR::raiseError(
|
||||||
'LocStor::editPlaylist: playlist already edited'
|
'LocStor::editPlaylist: playlist already edited'
|
||||||
);
|
);
|
||||||
|
@ -823,7 +823,7 @@ class LocStor extends BasicStor {
|
||||||
GBERR_NOTF
|
GBERR_NOTF
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
$id = $this->_idFromGunid($playlistId);
|
$id = $this->idFromGunid($playlistId);
|
||||||
if (($res = $this->_authorize('read', $id, $sessid)) !== TRUE) {
|
if (($res = $this->_authorize('read', $id, $sessid)) !== TRUE) {
|
||||||
return $res;
|
return $res;
|
||||||
}
|
}
|
||||||
|
@ -961,7 +961,7 @@ class LocStor extends BasicStor {
|
||||||
if (PEAR::isError($r)) {
|
if (PEAR::isError($r)) {
|
||||||
return $r;
|
return $r;
|
||||||
}
|
}
|
||||||
return $this->_gunidFromId($res);
|
return $this->gunidFromId($res);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -995,16 +995,16 @@ class LocStor extends BasicStor {
|
||||||
*/
|
*/
|
||||||
function playlistIsAvailable($sessid, $playlistId, $getUid=FALSE)
|
function playlistIsAvailable($sessid, $playlistId, $getUid=FALSE)
|
||||||
{
|
{
|
||||||
$ex = $this->existsPlaylist($sessid, $playlistId);
|
// $ex = $this->existsPlaylist($sessid, $playlistId);
|
||||||
if (PEAR::isError($ex)) {
|
// if (PEAR::isError($ex)) {
|
||||||
return $ex;
|
// return $ex;
|
||||||
}
|
// }
|
||||||
if (!$ex) {
|
// if (!$ex) {
|
||||||
return PEAR::raiseError(
|
// return PEAR::raiseError(
|
||||||
'LocStor::playlistIsAvailable: playlist not exists'
|
// 'LocStor::playlistIsAvailable: playlist not exists'
|
||||||
);
|
// );
|
||||||
}
|
// }
|
||||||
$ie = $this->_isEdited($playlistId);
|
$ie = $this->isEdited($playlistId);
|
||||||
if ($ie === FALSE) {
|
if ($ie === FALSE) {
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -1386,8 +1386,7 @@ class LocStor extends BasicStor {
|
||||||
*/
|
*/
|
||||||
function getVersion()
|
function getVersion()
|
||||||
{
|
{
|
||||||
//return $this->config['version'];
|
return CAMPCASTER_VERSION;
|
||||||
return LS_VERSION;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} // class LocStor
|
} // class LocStor
|
||||||
|
|
Loading…
Reference in New Issue