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:
paul 2007-01-03 22:46:26 +00:00
parent 425212bfb8
commit b23c11c0b8
6 changed files with 36 additions and 42 deletions

View File

@ -1122,7 +1122,7 @@ class BasicStor {
} }
$gunids = array(); $gunids = array();
foreach ($plids as $plid) { foreach ($plids as $plid) {
$pl = Playlist::recallByGunid($this, $plid); $pl = Playlist::recallByGunid($plid);
if (PEAR::isError($pl)) { if (PEAR::isError($pl)) {
return $pl; return $pl;
} }
@ -1163,7 +1163,7 @@ class BasicStor {
switch ($it['type']) { switch ($it['type']) {
case "playlist": case "playlist":
require_once("LsPlaylist.php"); require_once("LsPlaylist.php");
$ac = $r = LsPlaylist::recallByGunid($this, $it['gunid']); $ac = $r = LsPlaylist::recallByGunid($it['gunid']);
switch ($type) { switch ($type) {
case "smil": case "smil":
$string = $r = $ac->outputToSmil(); $string = $r = $ac->outputToSmil();

View File

@ -675,7 +675,7 @@ class GreenBox extends BasicStor {
$fadeIn=NULL, $fadeOut=NULL, $length=NULL, $pause=NULL) $fadeIn=NULL, $fadeOut=NULL, $length=NULL, $pause=NULL)
{ {
require_once"Playlist.php"; require_once"Playlist.php";
$pl = Playlist::recallByToken($this, $token); $pl = Playlist::recallByToken($token);
if (PEAR::isError($pl)) { if (PEAR::isError($pl)) {
return $pl; return $pl;
} }
@ -716,7 +716,7 @@ class GreenBox extends BasicStor {
public function delAudioClipFromPlaylist($token, $plElGunid, $sessid) public function delAudioClipFromPlaylist($token, $plElGunid, $sessid)
{ {
require_once("Playlist.php"); require_once("Playlist.php");
$pl = Playlist::recallByToken($this, $token); $pl = Playlist::recallByToken($token);
if (PEAR::isError($pl)) { if (PEAR::isError($pl)) {
return $pl; return $pl;
} }
@ -751,7 +751,7 @@ class GreenBox extends BasicStor {
public function changeFadeInfo($token, $plElGunid, $fadeIn, $fadeOut, $sessid) public function changeFadeInfo($token, $plElGunid, $fadeIn, $fadeOut, $sessid)
{ {
require_once("Playlist.php"); require_once("Playlist.php");
$pl = Playlist::recallByToken($this, $token); $pl = Playlist::recallByToken($token);
if (PEAR::isError($pl)) { if (PEAR::isError($pl)) {
return $pl; return $pl;
} }
@ -787,7 +787,7 @@ class GreenBox extends BasicStor {
public function moveAudioClipInPlaylist($token, $plElGunid, $newPos, $sessid) public function moveAudioClipInPlaylist($token, $plElGunid, $newPos, $sessid)
{ {
require_once("Playlist.php"); require_once("Playlist.php");
$pl = Playlist::recallByToken($this, $token); $pl = Playlist::recallByToken($token);
if (PEAR::isError($pl)) { if (PEAR::isError($pl)) {
return $pl; return $pl;
} }
@ -866,8 +866,8 @@ class GreenBox extends BasicStor {
public function displayPlaylistClipAtOffset($sessid, $plid, $offset, $distance=0, public function displayPlaylistClipAtOffset($sessid, $plid, $offset, $distance=0,
$lang=NULL, $deflang=NULL) $lang=NULL, $deflang=NULL)
{ {
require_once "Playlist.php"; require_once("Playlist.php");
$pl = Playlist::recallByGunid($this, $plid); $pl = Playlist::recallByGunid($plid);
if (PEAR::isError($pl)) { if (PEAR::isError($pl)) {
return $pl; return $pl;
} }

View File

@ -24,16 +24,15 @@ class LsPlaylist extends Playlist
* Create instance of LsPlaylist object and recall existing file * Create instance of LsPlaylist object and recall existing file
* by gunid. * by gunid.
* *
* @param Greenbox $gb
* @param string $gunid * @param string $gunid
* global unique id * global unique id
* @param string $className * @param string $className
* optional classname to recall * optional classname to recall
* @return LsPlaylist * @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 * Create instance of LsPlaylist object and recall existing file
* by access token. * by access token.
* *
* @param GreenBox $gb
* @param string $token * @param string $token
* access token * access token
* @param string $className * @param string $className
* optional classname to recall * optional classname to recall
* @return LsPlaylist * @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);
} }
@ -303,7 +301,7 @@ class LsPlaylistElement {
break; break;
case "playlist": case "playlist":
$gunid = $ac['attrs']['id']; $gunid = $ac['attrs']['id'];
$pl2 = LsPlaylist::recallByGunid($pl->gb, $gunid); $pl2 = LsPlaylist::recallByGunid($gunid);
if (PEAR::isError($pl2)) { if (PEAR::isError($pl2)) {
return $pl2; return $pl2;
} }
@ -376,7 +374,7 @@ class LsPlaylistElement {
break; break;
case "playlist": case "playlist":
$gunid = $ac['attrs']['id']; $gunid = $ac['attrs']['id'];
$pl2 = LsPlaylist::recallByGunid($pl->gb, $gunid); $pl2 = LsPlaylist::recallByGunid($gunid);
if (PEAR::isError($pl2)) { if (PEAR::isError($pl2)) {
return $pl2; return $pl2;
} }
@ -420,7 +418,7 @@ class LsPlaylistElement {
break; break;
case "playlist": case "playlist":
$gunid = $ac['attrs']['id']; $gunid = $ac['attrs']['id'];
$pl2 = LsPlaylist::recallByGunid($pl->gb, $gunid); $pl2 = LsPlaylist::recallByGunid($gunid);
if (PEAR::isError($pl2)) { if (PEAR::isError($pl2)) {
return $pl2; return $pl2;
} }

View File

@ -21,8 +21,6 @@ class Playlist extends StoredFile {
* Create instance of Playlist object and recall existing file * Create instance of Playlist object and recall existing file
* by gunid.<br/> * by gunid.<br/>
* *
* @param GreenBox $gb
* reference to GreenBox object
* @param string $gunid * @param string $gunid
* global unique id * global unique id
* @param string $className * @param string $className
@ -30,9 +28,9 @@ class Playlist extends StoredFile {
* @return Playlist * @return Playlist
* instance of Playlist object * 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 * Create instance of Playlist object and recall existing file
* by access token.<br/> * by access token.<br/>
* *
* @param GreenBox $gb
* reference to GreenBox object
* @param string $token * @param string $token
* access token * access token
* @param string $className * @param string $className
@ -49,9 +45,9 @@ class Playlist extends StoredFile {
* @return Playlist * @return Playlist
* instance of Playlist object * 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);
} }
@ -960,7 +956,7 @@ class Playlist extends StoredFile {
if ($found) { // we've found offset if ($found) { // we've found offset
switch ($el['type']) { switch ($el['type']) {
case "playlist": case "playlist":
$pl = Playlist::recallByGunid($this->gb, $acGunid); $pl = Playlist::recallByGunid($acGunid);
if (PEAR::isError($pl)) { if (PEAR::isError($pl)) {
return $pl; return $pl;
} }
@ -1037,7 +1033,7 @@ class Playlist extends StoredFile {
extract($el); // acLen, elOffset, acGunid, fadeIn, fadeOut, playlist extract($el); // acLen, elOffset, acGunid, fadeIn, fadeOut, playlist
switch ($el['type']) { switch ($el['type']) {
case "playlist": case "playlist":
$pl = Playlist::recallByGunid($this->gb, $acGunid); $pl = Playlist::recallByGunid($acGunid);
if (PEAR::isError($pl)) { if (PEAR::isError($pl)) {
return $pl; return $pl;
} }
@ -1109,7 +1105,7 @@ class Playlist extends StoredFile {
if ($this->gunid == $insGunid) { if ($this->gunid == $insGunid) {
return TRUE; return TRUE;
} }
$pl = Playlist::recallByGunid($this->gb, $insGunid); $pl = Playlist::recallByGunid($insGunid);
if (PEAR::isError($pl)) { if (PEAR::isError($pl)) {
return $pl; return $pl;
} }

View File

@ -37,7 +37,7 @@ class Renderer
{ {
global $CC_CONFIG; global $CC_CONFIG;
// recall playlist: // recall playlist:
$pl = LsPlaylist::recallByGunid($gb, $plid); $pl = LsPlaylist::recallByGunid($plid);
if (PEAR::isError($pl)) { if (PEAR::isError($pl)) {
return $pl; return $pl;
} }

View File

@ -325,7 +325,7 @@ class Transport
case "playlist": case "playlist":
$plid = $gunid; $plid = $gunid;
require_once("Playlist.php"); require_once("Playlist.php");
$pl = Playlist::recallByGunid($this->gb, $plid); $pl = Playlist::recallByGunid($plid);
if (PEAR::isError($pl)) { if (PEAR::isError($pl)) {
return $pl; return $pl;
} }