minor fix

This commit is contained in:
tomash 2006-11-30 02:21:58 +00:00
parent f7bdf20b6e
commit 6c751954ee
1 changed files with 4 additions and 4 deletions

View File

@ -102,20 +102,20 @@ class Playlist extends StoredFile {
public function &create(&$gb, $plid, $fname=NULL, $parid=NULL) public function &create(&$gb, $plid, $fname=NULL, $parid=NULL)
{ {
$tmpFname = uniqid(''); $tmpFname = uniqid('');
$oid = $this->addObj($tmpFname , 'playlist', $parid); $oid = $gb->addObj($tmpFname , 'playlist', $parid);
if (PEAR::isError($oid)) { if (PEAR::isError($oid)) {
return $oid; return $oid;
} }
$pl =& Playlist::insert($this, $oid, '', '', $pl =& Playlist::insert($gb, $oid, '', '',
dirname(__FILE__).'/emptyPlaylist.xml', dirname(__FILE__).'/emptyPlaylist.xml',
'file', $plid 'file', $plid
); );
if (PEAR::isError($pl)) { if (PEAR::isError($pl)) {
$res = $this->removeObj($oid); $res = $gb->removeObj($oid);
return $pl; return $pl;
} }
$fname = ($fname == '' || is_null($fname) ? "newFile.xml" : $fname ); $fname = ($fname == '' || is_null($fname) ? "newFile.xml" : $fname );
$res = $this->bsRenameFile($oid, $fname); $res = $gb->bsRenameFile($oid, $fname);
if (PEAR::isError($res)) { if (PEAR::isError($res)) {
return $res; return $res;
} }