Fix for bug #2003 - CREATE NEW PLAYLIST broken
This commit is contained in:
parent
82fcd9faed
commit
001e50bf08
|
@ -253,9 +253,10 @@ switch ($_REQUEST['act']) {
|
|||
break;
|
||||
|
||||
case "PL.create":
|
||||
if (($ui_tmpid = $uiHandler->PLAYLIST->create($_REQUEST['id'])) !== FALSE) {
|
||||
if ($_REQUEST['id']) {
|
||||
$uiHandler->SCRATCHPAD->addItem($_REQUEST['id']);
|
||||
$ids = (isset($_REQUEST['id']) ? $_REQUEST['id'] : null);
|
||||
if (($ui_tmpid = $uiHandler->PLAYLIST->create($ids)) !== FALSE) {
|
||||
if ($ids) {
|
||||
$uiHandler->SCRATCHPAD->addItem($ids);
|
||||
}
|
||||
$uiHandler->SCRATCHPAD->addItem($ui_tmpid);
|
||||
}
|
||||
|
@ -457,7 +458,11 @@ if ($uiHandler->alertMsg) {
|
|||
//}
|
||||
ob_end_clean();
|
||||
if (isset($_REQUEST['target'])) {
|
||||
header('Location: ui_browser.php?act='.$_REQUEST['target']);
|
||||
if ($_REQUEST['target'] == "reload") {
|
||||
header('Location: ui_browser.php?act='.$_REQUEST['target']);
|
||||
} else {
|
||||
|
||||
}
|
||||
} else {
|
||||
header("Location: ".$uiHandler->redirUrl);
|
||||
}
|
||||
|
|
|
@ -290,7 +290,15 @@ class uiPlaylist
|
|||
} // fn removeItem
|
||||
|
||||
|
||||
public function create($ids)
|
||||
/**
|
||||
* Create a playlist.
|
||||
*
|
||||
* @param array $ids
|
||||
* Optional list of media files to be added to the playlist
|
||||
* after it is created.
|
||||
* @return FALSE|int
|
||||
*/
|
||||
public function create($ids = null)
|
||||
{
|
||||
// create PL
|
||||
// activate
|
||||
|
@ -308,7 +316,7 @@ class uiPlaylist
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
$this->Base->setMetadataValue($plid, UI_MDATA_KEY_CREATOR, $this->Base->login);
|
||||
$this->Base->setMetadataValue($plid, UI_MDATA_KEY_CREATOR, $this->Base->login);
|
||||
$this->Base->setMetadataValue($plid, UI_MDATA_KEY_DESCRIPTION, tra('created at $1', $datetime));
|
||||
|
||||
if ($this->activate($plid)===FALSE) {
|
||||
|
@ -319,8 +327,6 @@ class uiPlaylist
|
|||
return FALSE;
|
||||
}
|
||||
}
|
||||
#$this->redirUrl = UI_BRWOSER.'?popup=_2PL.simpleManagement';<br>
|
||||
|
||||
return $plid;
|
||||
} // fn create
|
||||
|
||||
|
@ -641,7 +647,7 @@ class uiPlaylist
|
|||
}
|
||||
|
||||
foreach ($mData as $key => $val) {
|
||||
$r = $this->Base->gb->setMDataValue($id, $key, $this->Base->sessid, $val, $curr_langid);
|
||||
$r = $this->Base->gb->setMetadataValue($id, $key, $this->Base->sessid, $val, $curr_langid);
|
||||
if (PEAR::isError($r)) {
|
||||
if (UI_VERBOSE === TRUE) {
|
||||
print_r($r);
|
||||
|
|
|
@ -451,7 +451,7 @@ class MetaData {
|
|||
$container='metadata')
|
||||
{
|
||||
// resolve actual element:
|
||||
$rows = $this->getMetadataValue($category, $lang);
|
||||
$rows = $this->getMetadataValueWithAttrs($category, $lang);
|
||||
$aktual = NULL;
|
||||
if (count($rows) > 1) {
|
||||
if (is_null($mid)) {
|
||||
|
@ -480,7 +480,7 @@ class MetaData {
|
|||
}
|
||||
if (!is_null($lang)
|
||||
&& isset($aktual['attrs']['xml:lang'])
|
||||
&& $aktual['attrs']['xml:lang'] != $lang) {
|
||||
&& $aktual['attrs']['xml:lang'] != $lang) {
|
||||
$lg = $this->getMetadataEl('xml:lang', $aktual['mid']);
|
||||
if (PEAR::isError($lg)) {
|
||||
return $lg;
|
||||
|
@ -500,7 +500,7 @@ class MetaData {
|
|||
}
|
||||
} else {
|
||||
// resolve container:
|
||||
$contArr = $this->getMetadataValue($container, NULL, NULL, '_blank');
|
||||
$contArr = $this->getMetadataValueWithAttrs($container, NULL, NULL, '_blank');
|
||||
if (PEAR::isError($contArr)) {
|
||||
return $contArr;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue