Fix for bug #2003 - CREATE NEW PLAYLIST broken
This commit is contained in:
parent
82fcd9faed
commit
001e50bf08
3 changed files with 23 additions and 12 deletions
|
@ -253,9 +253,10 @@ switch ($_REQUEST['act']) {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "PL.create":
|
case "PL.create":
|
||||||
if (($ui_tmpid = $uiHandler->PLAYLIST->create($_REQUEST['id'])) !== FALSE) {
|
$ids = (isset($_REQUEST['id']) ? $_REQUEST['id'] : null);
|
||||||
if ($_REQUEST['id']) {
|
if (($ui_tmpid = $uiHandler->PLAYLIST->create($ids)) !== FALSE) {
|
||||||
$uiHandler->SCRATCHPAD->addItem($_REQUEST['id']);
|
if ($ids) {
|
||||||
|
$uiHandler->SCRATCHPAD->addItem($ids);
|
||||||
}
|
}
|
||||||
$uiHandler->SCRATCHPAD->addItem($ui_tmpid);
|
$uiHandler->SCRATCHPAD->addItem($ui_tmpid);
|
||||||
}
|
}
|
||||||
|
@ -457,8 +458,12 @@ if ($uiHandler->alertMsg) {
|
||||||
//}
|
//}
|
||||||
ob_end_clean();
|
ob_end_clean();
|
||||||
if (isset($_REQUEST['target'])) {
|
if (isset($_REQUEST['target'])) {
|
||||||
|
if ($_REQUEST['target'] == "reload") {
|
||||||
header('Location: ui_browser.php?act='.$_REQUEST['target']);
|
header('Location: ui_browser.php?act='.$_REQUEST['target']);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
}
|
||||||
|
} else {
|
||||||
header("Location: ".$uiHandler->redirUrl);
|
header("Location: ".$uiHandler->redirUrl);
|
||||||
}
|
}
|
||||||
exit;
|
exit;
|
||||||
|
|
|
@ -290,7 +290,15 @@ class uiPlaylist
|
||||||
} // fn removeItem
|
} // 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
|
// create PL
|
||||||
// activate
|
// activate
|
||||||
|
@ -319,8 +327,6 @@ class uiPlaylist
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#$this->redirUrl = UI_BRWOSER.'?popup=_2PL.simpleManagement';<br>
|
|
||||||
|
|
||||||
return $plid;
|
return $plid;
|
||||||
} // fn create
|
} // fn create
|
||||||
|
|
||||||
|
@ -641,7 +647,7 @@ class uiPlaylist
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($mData as $key => $val) {
|
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 (PEAR::isError($r)) {
|
||||||
if (UI_VERBOSE === TRUE) {
|
if (UI_VERBOSE === TRUE) {
|
||||||
print_r($r);
|
print_r($r);
|
||||||
|
|
|
@ -451,7 +451,7 @@ class MetaData {
|
||||||
$container='metadata')
|
$container='metadata')
|
||||||
{
|
{
|
||||||
// resolve actual element:
|
// resolve actual element:
|
||||||
$rows = $this->getMetadataValue($category, $lang);
|
$rows = $this->getMetadataValueWithAttrs($category, $lang);
|
||||||
$aktual = NULL;
|
$aktual = NULL;
|
||||||
if (count($rows) > 1) {
|
if (count($rows) > 1) {
|
||||||
if (is_null($mid)) {
|
if (is_null($mid)) {
|
||||||
|
@ -500,7 +500,7 @@ class MetaData {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// resolve container:
|
// resolve container:
|
||||||
$contArr = $this->getMetadataValue($container, NULL, NULL, '_blank');
|
$contArr = $this->getMetadataValueWithAttrs($container, NULL, NULL, '_blank');
|
||||||
if (PEAR::isError($contArr)) {
|
if (PEAR::isError($contArr)) {
|
||||||
return $contArr;
|
return $contArr;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue