Fixed parameters passed to the various recallByGunid() functions- they no longer require the GreenBox parameter. Some functions had been switched, and some had not, which lead to some crashes.
This commit is contained in:
parent
425212bfb8
commit
b23c11c0b8
|
@ -1122,7 +1122,7 @@ class BasicStor {
|
|||
}
|
||||
$gunids = array();
|
||||
foreach ($plids as $plid) {
|
||||
$pl = Playlist::recallByGunid($this, $plid);
|
||||
$pl = Playlist::recallByGunid($plid);
|
||||
if (PEAR::isError($pl)) {
|
||||
return $pl;
|
||||
}
|
||||
|
@ -1163,7 +1163,7 @@ class BasicStor {
|
|||
switch ($it['type']) {
|
||||
case "playlist":
|
||||
require_once("LsPlaylist.php");
|
||||
$ac = $r = LsPlaylist::recallByGunid($this, $it['gunid']);
|
||||
$ac = $r = LsPlaylist::recallByGunid($it['gunid']);
|
||||
switch ($type) {
|
||||
case "smil":
|
||||
$string = $r = $ac->outputToSmil();
|
||||
|
|
|
@ -675,7 +675,7 @@ class GreenBox extends BasicStor {
|
|||
$fadeIn=NULL, $fadeOut=NULL, $length=NULL, $pause=NULL)
|
||||
{
|
||||
require_once"Playlist.php";
|
||||
$pl = Playlist::recallByToken($this, $token);
|
||||
$pl = Playlist::recallByToken($token);
|
||||
if (PEAR::isError($pl)) {
|
||||
return $pl;
|
||||
}
|
||||
|
@ -716,7 +716,7 @@ class GreenBox extends BasicStor {
|
|||
public function delAudioClipFromPlaylist($token, $plElGunid, $sessid)
|
||||
{
|
||||
require_once("Playlist.php");
|
||||
$pl = Playlist::recallByToken($this, $token);
|
||||
$pl = Playlist::recallByToken($token);
|
||||
if (PEAR::isError($pl)) {
|
||||
return $pl;
|
||||
}
|
||||
|
@ -751,7 +751,7 @@ class GreenBox extends BasicStor {
|
|||
public function changeFadeInfo($token, $plElGunid, $fadeIn, $fadeOut, $sessid)
|
||||
{
|
||||
require_once("Playlist.php");
|
||||
$pl = Playlist::recallByToken($this, $token);
|
||||
$pl = Playlist::recallByToken($token);
|
||||
if (PEAR::isError($pl)) {
|
||||
return $pl;
|
||||
}
|
||||
|
@ -787,7 +787,7 @@ class GreenBox extends BasicStor {
|
|||
public function moveAudioClipInPlaylist($token, $plElGunid, $newPos, $sessid)
|
||||
{
|
||||
require_once("Playlist.php");
|
||||
$pl = Playlist::recallByToken($this, $token);
|
||||
$pl = Playlist::recallByToken($token);
|
||||
if (PEAR::isError($pl)) {
|
||||
return $pl;
|
||||
}
|
||||
|
@ -866,8 +866,8 @@ class GreenBox extends BasicStor {
|
|||
public function displayPlaylistClipAtOffset($sessid, $plid, $offset, $distance=0,
|
||||
$lang=NULL, $deflang=NULL)
|
||||
{
|
||||
require_once "Playlist.php";
|
||||
$pl = Playlist::recallByGunid($this, $plid);
|
||||
require_once("Playlist.php");
|
||||
$pl = Playlist::recallByGunid($plid);
|
||||
if (PEAR::isError($pl)) {
|
||||
return $pl;
|
||||
}
|
||||
|
|
|
@ -24,16 +24,15 @@ class LsPlaylist extends Playlist
|
|||
* Create instance of LsPlaylist object and recall existing file
|
||||
* by gunid.
|
||||
*
|
||||
* @param Greenbox $gb
|
||||
* @param string $gunid
|
||||
* global unique id
|
||||
* @param string $className
|
||||
* optional classname to recall
|
||||
* @return LsPlaylist
|
||||
*/
|
||||
public static function &recallByGunid(&$gb, $gunid, $className='LsPlaylist')
|
||||
public static function &recallByGunid($gunid, $className='LsPlaylist')
|
||||
{
|
||||
return parent::recallByGunid($gb, $gunid, $className);
|
||||
return parent::recallByGunid($gunid, $className);
|
||||
}
|
||||
|
||||
|
||||
|
@ -41,16 +40,15 @@ class LsPlaylist extends Playlist
|
|||
* Create instance of LsPlaylist object and recall existing file
|
||||
* by access token.
|
||||
*
|
||||
* @param GreenBox $gb
|
||||
* @param string $token
|
||||
* access token
|
||||
* @param string $className
|
||||
* optional classname to recall
|
||||
* @return LsPlaylist
|
||||
*/
|
||||
public static function &recallByToken(&$gb, $token, $className='LsPlaylist')
|
||||
public static function &recallByToken($token, $className='LsPlaylist')
|
||||
{
|
||||
return parent::recallByToken($gb, $token, $className);
|
||||
return parent::recallByToken($token, $className);
|
||||
}
|
||||
|
||||
|
||||
|
@ -300,10 +298,10 @@ class LsPlaylistElement {
|
|||
if (!is_null($r)) {
|
||||
$acOrPl = $r;
|
||||
}
|
||||
break;
|
||||
break;
|
||||
case "playlist":
|
||||
$gunid = $ac['attrs']['id'];
|
||||
$pl2 = LsPlaylist::recallByGunid($pl->gb, $gunid);
|
||||
$pl2 = LsPlaylist::recallByGunid($gunid);
|
||||
if (PEAR::isError($pl2)) {
|
||||
return $pl2;
|
||||
}
|
||||
|
@ -314,8 +312,8 @@ class LsPlaylistElement {
|
|||
if (!is_null($r)) {
|
||||
$acOrPl = $r;
|
||||
}
|
||||
break;
|
||||
case"fadeInfo":
|
||||
break;
|
||||
case "fadeInfo":
|
||||
$r = LsPlaylistFadeInfo::outputToSmil($pl, $ac, $ind2);
|
||||
if (PEAR::isError($r)) {
|
||||
return $r;
|
||||
|
@ -323,7 +321,7 @@ class LsPlaylistElement {
|
|||
if (!is_null($r)) {
|
||||
$finfo = $r;
|
||||
}
|
||||
break;
|
||||
break;
|
||||
default:
|
||||
return PEAR::raiseError(
|
||||
"LsPlaylistElement::outputToSmil:".
|
||||
|
@ -376,7 +374,7 @@ class LsPlaylistElement {
|
|||
break;
|
||||
case "playlist":
|
||||
$gunid = $ac['attrs']['id'];
|
||||
$pl2 = LsPlaylist::recallByGunid($pl->gb, $gunid);
|
||||
$pl2 = LsPlaylist::recallByGunid($gunid);
|
||||
if (PEAR::isError($pl2)) {
|
||||
return $pl2;
|
||||
}
|
||||
|
@ -420,7 +418,7 @@ class LsPlaylistElement {
|
|||
break;
|
||||
case "playlist":
|
||||
$gunid = $ac['attrs']['id'];
|
||||
$pl2 = LsPlaylist::recallByGunid($pl->gb, $gunid);
|
||||
$pl2 = LsPlaylist::recallByGunid($gunid);
|
||||
if (PEAR::isError($pl2)) {
|
||||
return $pl2;
|
||||
}
|
||||
|
|
|
@ -21,8 +21,6 @@ class Playlist extends StoredFile {
|
|||
* Create instance of Playlist object and recall existing file
|
||||
* by gunid.<br/>
|
||||
*
|
||||
* @param GreenBox $gb
|
||||
* reference to GreenBox object
|
||||
* @param string $gunid
|
||||
* global unique id
|
||||
* @param string $className
|
||||
|
@ -30,9 +28,9 @@ class Playlist extends StoredFile {
|
|||
* @return Playlist
|
||||
* instance of Playlist object
|
||||
*/
|
||||
public static function &recallByGunid(&$gb, $gunid, $className='Playlist')
|
||||
public static function &recallByGunid($gunid, $className='Playlist')
|
||||
{
|
||||
return parent::recallByGunid($gb, $gunid, $className);
|
||||
return parent::recallByGunid($gunid, $className);
|
||||
}
|
||||
|
||||
|
||||
|
@ -40,8 +38,6 @@ class Playlist extends StoredFile {
|
|||
* Create instance of Playlist object and recall existing file
|
||||
* by access token.<br/>
|
||||
*
|
||||
* @param GreenBox $gb
|
||||
* reference to GreenBox object
|
||||
* @param string $token
|
||||
* access token
|
||||
* @param string $className
|
||||
|
@ -49,9 +45,9 @@ class Playlist extends StoredFile {
|
|||
* @return Playlist
|
||||
* instance of Playlist object
|
||||
*/
|
||||
public static function &recallByToken(&$gb, $token, $className='Playlist')
|
||||
public static function &recallByToken($token, $className='Playlist')
|
||||
{
|
||||
return parent::recallByToken($gb, $token, $className);
|
||||
return parent::recallByToken($token, $className);
|
||||
}
|
||||
|
||||
|
||||
|
@ -940,16 +936,16 @@ class Playlist extends StoredFile {
|
|||
// cycle over playlistElements inside playlist:
|
||||
foreach ($arr['children'] as $i => $plEl) {
|
||||
switch ($plEl['elementname']) {
|
||||
case"playlistElement": // process playlistElement
|
||||
$plElObj = new PlaylistElement($this, $plEl);
|
||||
$plInfo = $plElObj->analyze();
|
||||
$plArr['els'][] = $plInfo;
|
||||
break;
|
||||
default:
|
||||
case "playlistElement": // process playlistElement
|
||||
$plElObj = new PlaylistElement($this, $plEl);
|
||||
$plInfo = $plElObj->analyze();
|
||||
$plArr['els'][] = $plInfo;
|
||||
break;
|
||||
default:
|
||||
}
|
||||
}
|
||||
$res = array('gunid'=>NULL, 'elapsed'=>NULL,
|
||||
'remaining'=>NULL, 'duration'=>NULL);
|
||||
$res = array('gunid'=>NULL, 'elapsed'=>NULL,
|
||||
'remaining'=>NULL, 'duration'=>NULL);
|
||||
$dd = 0;
|
||||
$found = FALSE;
|
||||
foreach ($plArr['els'] as $el) {
|
||||
|
@ -960,7 +956,7 @@ class Playlist extends StoredFile {
|
|||
if ($found) { // we've found offset
|
||||
switch ($el['type']) {
|
||||
case "playlist":
|
||||
$pl = Playlist::recallByGunid($this->gb, $acGunid);
|
||||
$pl = Playlist::recallByGunid($acGunid);
|
||||
if (PEAR::isError($pl)) {
|
||||
return $pl;
|
||||
}
|
||||
|
@ -1037,7 +1033,7 @@ class Playlist extends StoredFile {
|
|||
extract($el); // acLen, elOffset, acGunid, fadeIn, fadeOut, playlist
|
||||
switch ($el['type']) {
|
||||
case "playlist":
|
||||
$pl = Playlist::recallByGunid($this->gb, $acGunid);
|
||||
$pl = Playlist::recallByGunid($acGunid);
|
||||
if (PEAR::isError($pl)) {
|
||||
return $pl;
|
||||
}
|
||||
|
@ -1109,7 +1105,7 @@ class Playlist extends StoredFile {
|
|||
if ($this->gunid == $insGunid) {
|
||||
return TRUE;
|
||||
}
|
||||
$pl = Playlist::recallByGunid($this->gb, $insGunid);
|
||||
$pl = Playlist::recallByGunid($insGunid);
|
||||
if (PEAR::isError($pl)) {
|
||||
return $pl;
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ class Renderer
|
|||
{
|
||||
global $CC_CONFIG;
|
||||
// recall playlist:
|
||||
$pl = LsPlaylist::recallByGunid($gb, $plid);
|
||||
$pl = LsPlaylist::recallByGunid($plid);
|
||||
if (PEAR::isError($pl)) {
|
||||
return $pl;
|
||||
}
|
||||
|
|
|
@ -325,7 +325,7 @@ class Transport
|
|||
case "playlist":
|
||||
$plid = $gunid;
|
||||
require_once("Playlist.php");
|
||||
$pl = Playlist::recallByGunid($this->gb, $plid);
|
||||
$pl = Playlist::recallByGunid($plid);
|
||||
if (PEAR::isError($pl)) {
|
||||
return $pl;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue