From f30283d544b2f4ce33983e74b426c903bdf6234a Mon Sep 17 00:00:00 2001 From: sebastian Date: Wed, 22 Feb 2006 16:46:57 +0000 Subject: [PATCH] fixes #1409, #1486, #1620 --- .../htmlUI/var/formmask/generic.inc.php | 47 +++ .../modules/htmlUI/var/html/ui_browser.php | 13 +- .../modules/htmlUI/var/html/ui_handler.php | 20 +- .../var/templates/library/actionhandler.tpl | 34 +- .../src/modules/htmlUI/var/templates/menu.tpl | 2 +- .../var/templates/playlist/actionhandler.tpl | 12 +- .../htmlUI/var/templates/playlist/editor.tpl | 2 +- ...{listen2AudioClip.tpl => listen2Audio.tpl} | 0 .../htmlUI/var/templates/popup/testStream.tpl | 4 +- .../templates/scratchpad/actionhandler.tpl | 39 +- .../var/templates/script/contextmenu.js.tpl | 334 +++++++++--------- .../modules/htmlUI/var/ui_browser.class.php | 21 +- .../src/modules/htmlUI/var/ui_conf.php | 9 +- .../modules/htmlUI/var/ui_playlist.class.php | 77 ++-- 14 files changed, 374 insertions(+), 240 deletions(-) rename livesupport/src/modules/htmlUI/var/templates/popup/{listen2AudioClip.tpl => listen2Audio.tpl} (100%) diff --git a/livesupport/src/modules/htmlUI/var/formmask/generic.inc.php b/livesupport/src/modules/htmlUI/var/formmask/generic.inc.php index 644dc2cb6..3571624f0 100644 --- a/livesupport/src/modules/htmlUI/var/formmask/generic.inc.php +++ b/livesupport/src/modules/htmlUI/var/formmask/generic.inc.php @@ -642,6 +642,53 @@ $ui_fmask = array( ) ) ), + 'PL.setItemPlaylength' => array( + 'act' => array( + 'element' => 'act', + 'type' => 'hidden', + ), + 'id' => array( + 'element' => 'id', + 'type' => 'hidden' + ), + 'elemId' => array( + 'element' => 'elemId', + 'type' => 'hidden' + ), + 'duration' => array( + 'element' => 'duration', + 'type' => 'hidden' + ), + 'playlength' => array( + 'element' => 'playlength', + 'type' => 'date', + 'label' => 'Playlength', + 'options' => array('format' => 'His'), + ), + array( + 'element' => 'cancel', + 'type' => 'button', + 'label' => 'Cancel', + 'attributes'=> array('onClick' => 'window.close()'), + 'groupit' => TRUE + ), + array( + 'element' => 'reset', + 'type' => 'reset', + 'label' => 'Reset', + 'groupit' => TRUE + ), + array( + 'element' => 'submitter', + 'type' => 'button', + 'label' => 'Submit', + 'attributes'=> array('onClick' => 'PL_checkItemPlaylength()'), + 'groupit' => TRUE + ), + array( + 'group' => array('cancel', 'reset', 'submitter') + ) + ), 'schedule' => array( array( 'element' => 'act', diff --git a/livesupport/src/modules/htmlUI/var/html/ui_browser.php b/livesupport/src/modules/htmlUI/var/html/ui_browser.php index 43aef98f9..2b3dbb804 100644 --- a/livesupport/src/modules/htmlUI/var/html/ui_browser.php +++ b/livesupport/src/modules/htmlUI/var/html/ui_browser.php @@ -100,7 +100,12 @@ if (is_array($_REQUEST['popup'])){ case "PL.arrangeItems": $Smarty->display('popup/PLAYLIST.arrangeItems.tpl'); break; - + + case "PL.setItemPlaylengthForm": + $Smarty->assign('dynform', $uiBrowser->PLAYLIST->setItemPlaylengthForm($_REQUEST['id'], $_REQUEST['elemId'], $ui_fmask['PL.setItemPlaylength'])); + $Smarty->display('popup/PLAYLIST.setItemPlaylength.tpl'); + break; + case "SCHEDULER.addItem": $Smarty->display('popup/SCHEDULER.addItem.tpl'); break; @@ -119,9 +124,9 @@ if (is_array($_REQUEST['popup'])){ $Smarty->display('popup/testStream.tpl'); break; - case "listen2AudioClip": - $Smarty->assign('data', $uiBrowser->listen2AudioClip($_REQUEST['id'])); - $Smarty->display('popup/listen2AudioClip.tpl'); + case "listen2Audio": + $Smarty->assign('data', $uiBrowser->listen2Audio($_REQUEST['id'])); + $Smarty->display('popup/listen2Audio.tpl'); break; case "help": diff --git a/livesupport/src/modules/htmlUI/var/html/ui_handler.php b/livesupport/src/modules/htmlUI/var/html/ui_handler.php index d27b7fbb1..d1080a7e6 100644 --- a/livesupport/src/modules/htmlUI/var/html/ui_handler.php +++ b/livesupport/src/modules/htmlUI/var/html/ui_handler.php @@ -180,10 +180,16 @@ switch($_REQUEST['act']){ break; case "PL.addItem": - if ($uiHandler->PLAYLIST->addItem($_REQUEST['id']) !== FALSE) + if ($uiHandler->PLAYLIST->addItem($_REQUEST['id'], $_REQUEST['playlength']) !== FALSE) $uiHandler->SCRATCHPAD->addItem($_REQUEST['id']); $uiHandler->PLAYLIST->setReload(); break; + + + case "PL.setItemPlaylength": + $uiHandler->PLAYLIST->setItemPlaylength($_REQUEST['elemId'], $_REQUEST['playlength']); + $uiHandler->PLAYLIST->setReload(); + break; case "PL.removeItem": $uiHandler->PLAYLIST->removeItem($_REQUEST['id']); @@ -279,14 +285,20 @@ switch($_REQUEST['act']){ die(); break; - default: + case NULL: if ($uiHandler->userid) { $uiHandler->_retMsg('The uploaded filer is bigger than allowed in system settings. See "Help", chapter "Troubleshooting" for more information.'); } - $uiHandler->redirUrl = UI_BROWSER; - + $uiHandler->redirUrl = UI_BROWSER; if ($_REQUEST['is_popup']) $uiHandler->redirUrl = UI_BROWSER.'?popup[]=_reload_parent&popup[]=_close'; + break; + + default: + $uiHandler->_retMsg(tra('Unknown method: $1', $_REQUEST['act'])); + $uiHandler->redirUrl = UI_BROWSER; + if ($_REQUEST['is_popup']) $uiHandler->redirUrl = UI_BROWSER.'?popup[]=_reload_parent&popup[]=_close'; + break; } if ($uiHandler->alertMsg) { diff --git a/livesupport/src/modules/htmlUI/var/templates/library/actionhandler.tpl b/livesupport/src/modules/htmlUI/var/templates/library/actionhandler.tpl index 559f41bd2..7534f2e6e 100644 --- a/livesupport/src/modules/htmlUI/var/templates/library/actionhandler.tpl +++ b/livesupport/src/modules/htmlUI/var/templates/library/actionhandler.tpl @@ -1,25 +1,30 @@ onClick="return contextmenu('{$i.id}' , 'SP.addItem' - + {if $i.type|lower == 'audioclip'} - , 'listen', '{$i.gunid}', '##audioclip##' + , 'listen', '{$i.gunid}' + {if $_PL_activeId} , 'PL.addItem' {else} - , 'PL.create', '{$i.title|truncate:20|escape:'html'}' + , 'PL.create' {/if} - , 'edit', '##audioclip##' - , 'delete', '##audioclip##' + + , 'edit' + , 'delete' {/if} {if $i.type|lower == 'webstream'} + , 'listen', '{$i.gunid}' + {if $_PL_activeId} - , 'PL.addItem' + , 'PL.addStream' {else} - , 'PL.create', '{$i.title|truncate:20}' + , 'PL.create' {/if} - , 'edit', '##webstream##' - , 'delete', '##webstream##' + + , 'edit' + , 'delete' {/if} {if $i.type|lower == 'playlist'} @@ -27,12 +32,15 @@ onClick="return contextmenu('{$i.id}' {if $_PL_activeId == $i.id} , 'PL.release' {else} - , 'SCHEDULER.addPL', 'PL.addItem', 'delete' + , 'SCHEDULER.addPL' + , 'PL.addItem' + , 'delete' {/if} {else} - , 'SCHEDULER.addPL', 'PL.activate' - , 'PL.create', '{$i.title|truncate:20}' - , 'delete', '##playlist##' + , 'SCHEDULER.addPL' + , 'PL.activate' + , 'PL.create' + , 'delete' {/if} {/if} )" diff --git a/livesupport/src/modules/htmlUI/var/templates/menu.tpl b/livesupport/src/modules/htmlUI/var/templates/menu.tpl index 2f458d3f0..c0ffa65b2 100644 --- a/livesupport/src/modules/htmlUI/var/templates/menu.tpl +++ b/livesupport/src/modules/htmlUI/var/templates/menu.tpl @@ -20,7 +20,7 @@ if (window.attachEvent) window.attachEvent("onload", sfHover);
  • ##Add Audio##
  • ##Media Library## diff --git a/livesupport/src/modules/htmlUI/var/templates/playlist/actionhandler.tpl b/livesupport/src/modules/htmlUI/var/templates/playlist/actionhandler.tpl index 38f695dcb..c50ad5527 100644 --- a/livesupport/src/modules/htmlUI/var/templates/playlist/actionhandler.tpl +++ b/livesupport/src/modules/htmlUI/var/templates/playlist/actionhandler.tpl @@ -1,7 +1,15 @@ style="cursor: pointer" onClick="return contextmenu('{$i.attrs.id}', - {if $i.type|lower == 'audioclip'} - 'listen', '{$i.gunid}', '{$i.type}', + + {if $i.type|lower == 'webstream'} + 'listen', '{$i.gunid}', + 'PL.changeItemPlaylength', {/if} + + {if $i.type|lower == 'audioclip'} + 'listen', '{$i.gunid}', + 'PL.changeItemPlaylength', + {/if} + 'PL.removeItem' )" diff --git a/livesupport/src/modules/htmlUI/var/templates/playlist/editor.tpl b/livesupport/src/modules/htmlUI/var/templates/playlist/editor.tpl index 03cdbbcc7..f319039ec 100644 --- a/livesupport/src/modules/htmlUI/var/templates/playlist/editor.tpl +++ b/livesupport/src/modules/htmlUI/var/templates/playlist/editor.tpl @@ -35,7 +35,7 @@ {$i.title} - {assign var="_duration" value=$i.duration}{niceTime in=$_duration} + {assign var="_duration" value=$i.playlength}{niceTime in=$_duration} {$i.creator} diff --git a/livesupport/src/modules/htmlUI/var/templates/popup/listen2AudioClip.tpl b/livesupport/src/modules/htmlUI/var/templates/popup/listen2Audio.tpl similarity index 100% rename from livesupport/src/modules/htmlUI/var/templates/popup/listen2AudioClip.tpl rename to livesupport/src/modules/htmlUI/var/templates/popup/listen2Audio.tpl diff --git a/livesupport/src/modules/htmlUI/var/templates/popup/testStream.tpl b/livesupport/src/modules/htmlUI/var/templates/popup/testStream.tpl index 29877f29b..820692ce6 100644 --- a/livesupport/src/modules/htmlUI/var/templates/popup/testStream.tpl +++ b/livesupport/src/modules/htmlUI/var/templates/popup/testStream.tpl @@ -15,8 +15,10 @@ {if $data.type.valid === true} {tra str='Stream is wanted type $1.' 1=$data.type.type} - {else} + {elseif $data.type.type} {tra str='Stream has wrong content type $1.' 1=$data.type.type} + {else} + ##No content type declared.## {/if} diff --git a/livesupport/src/modules/htmlUI/var/templates/scratchpad/actionhandler.tpl b/livesupport/src/modules/htmlUI/var/templates/scratchpad/actionhandler.tpl index 2858c9eda..784643e4c 100644 --- a/livesupport/src/modules/htmlUI/var/templates/scratchpad/actionhandler.tpl +++ b/livesupport/src/modules/htmlUI/var/templates/scratchpad/actionhandler.tpl @@ -1,25 +1,34 @@ onClick="return contextmenu('{$i.id}' , 'SP.removeItem' - + {if $i.type|lower == 'audioclip'} - , 'listen', '{$i.gunid}', '##audioclip##' + , 'listen', '{$i.gunid}' + {if $_PL_activeId} , 'PL.addItem' {else} - , 'PL.create', '{$i.title|truncate:20|escape:'html'}' + , 'PL.create' {/if} - , 'edit', '##audioclip##' - , 'delete', '##audioclip##' + + , 'edit' + , 'delete' {/if} {if $i.type|lower == 'webstream'} + , 'listen', '{$i.gunid}' + {if $_PL_activeId} - , 'PL.addItem' + {if $i.duration == '00:00:00.000000'} + , 'PL.addStream' + {else} + , 'PL.addItem' + {/if} {else} - , 'PL.create', '{$i.title|truncate:20}' + , 'PL.create' {/if} - , 'edit', '##webstream##' - , 'delete', '##webstream##' + + , 'edit' + , 'delete' {/if} {if $i.type|lower == 'playlist'} @@ -27,12 +36,16 @@ onClick="return contextmenu('{$i.id}' {if $_PL_activeId == $i.id} , 'PL.release' {elseif $PL->isAvailable($i.id) == true} - , 'SCHEDULER.addPL', 'PL.addItem', 'PL.activate', 'PL.delete' + , 'SCHEDULER.addPL' + , 'PL.addItem' + , 'PL.activate' + , 'PL.delete' {/if} {elseif $PL->isAvailable($i.id) == true} - , 'SCHEDULER.addPL', 'PL.activate' - , 'PL.create', '{$i.title|truncate:20}' - , 'delete', '##playlist##' + , 'SCHEDULER.addPL' + , 'PL.activate' + , 'PL.create' + , 'delete' {/if} {/if} )" \ No newline at end of file diff --git a/livesupport/src/modules/htmlUI/var/templates/script/contextmenu.js.tpl b/livesupport/src/modules/htmlUI/var/templates/script/contextmenu.js.tpl index cdfd9152b..a480dfdb8 100644 --- a/livesupport/src/modules/htmlUI/var/templates/script/contextmenu.js.tpl +++ b/livesupport/src/modules/htmlUI/var/templates/script/contextmenu.js.tpl @@ -1,175 +1,181 @@ {literal} diff --git a/livesupport/src/modules/htmlUI/var/ui_browser.class.php b/livesupport/src/modules/htmlUI/var/ui_browser.class.php index f14af8468..e789e0f00 100644 --- a/livesupport/src/modules/htmlUI/var/ui_browser.class.php +++ b/livesupport/src/modules/htmlUI/var/ui_browser.class.php @@ -432,21 +432,20 @@ class uiBrowser extends uiBase { ); } - function listen2AudioClip($clipid) + function listen2Audio($clipid) { - #$pls = "[playlist]\n". - #$pls .= "File1=http://{$_SERVER['SERVER_NAME']}".$this->config['accessRawAudioUrl']."?sessid={$this->sessid}&id=$clipid\n"; - #$pls .= "Title1=Mein Titel\n"; - #$pls .= "NumberOfEntries=1\nVersion=2"; - - #$m3u = "#EXTM3U\n"; - #$m3u .= "#EXTINF:111,Mein Titel\n"; - $m3u .= "http://{$_SERVER['SERVER_NAME']}".$this->config['accessRawAudioUrl']."?sessid={$this->sessid}&id=$clipid\n"; - + $id = $this->gb->_idFromGunid($clipid); + $type = $this->gb->getFileType($id); + + if (strtolower($type) === strtolower(UI_FILETYPE_AUDIOCLIP)) { + $m3u = "http://{$_SERVER['SERVER_NAME']}".$this->config['accessRawAudioUrl']."?sessid={$this->sessid}&id=$clipid\n"; + } else { + $m3u = $this->_getMDataValue($id, UI_MDATA_KEY_URL); + } touch(UI_TESTSTREAM_MU3_TMP); $handle = fopen(UI_TESTSTREAM_MU3_TMP, "w"); fwrite($handle, $m3u); - fclose($handle); + fclose($handle); } diff --git a/livesupport/src/modules/htmlUI/var/ui_conf.php b/livesupport/src/modules/htmlUI/var/ui_conf.php index 74d713d04..bb6884f73 100644 --- a/livesupport/src/modules/htmlUI/var/ui_conf.php +++ b/livesupport/src/modules/htmlUI/var/ui_conf.php @@ -2,7 +2,7 @@ ini_set('memory_limit', '64M'); ## Warning/Error level -define('UI_DEBUG', TRUE); +define('UI_DEBUG', FALSE); define('UI_VERBOSE', FALSE); define('UI_WARNING', TRUE); define('UI_ERROR', TRUE); @@ -111,7 +111,7 @@ define('UI_PL_ELEM_FADEOUT', 'fadeOut'); ## LS stuff -require_once '../../storageServer/var/conf.php'; +require_once '../../../storageServer/var/conf.php'; ## extent config $config = array_merge($config, array( @@ -122,7 +122,8 @@ $config = array_merge($config, ), 'stream_types' => array( 'application/ogg', - 'audio/mpeg' + 'audio/mpeg', + 'audio/x-mpegurl' ), 'languages' => array( 'ar_JO' => 'Arabic(JO)', @@ -144,7 +145,7 @@ require_once dirname(__FILE__).'/ui_scratchpad.class.php'; require_once dirname(__FILE__).'/ui_playlist.class.php'; require_once dirname(__FILE__).'/ui_search.class.php'; require_once dirname(__FILE__).'/ui_browse.class.php'; -require_once '../../storageServer/var/GreenBox.php'; +require_once '../../../storageServer/var/GreenBox.php'; require_once dirname(__FILE__).'/formmask/generic.inc.php'; require_once dirname(__FILE__).'/ui_calendar.class.php'; require_once dirname(__FILE__).'/ui_scheduler.class.php'; diff --git a/livesupport/src/modules/htmlUI/var/ui_playlist.class.php b/livesupport/src/modules/htmlUI/var/ui_playlist.class.php index c646142e6..915c60397 100644 --- a/livesupport/src/modules/htmlUI/var/ui_playlist.class.php +++ b/livesupport/src/modules/htmlUI/var/ui_playlist.class.php @@ -68,9 +68,9 @@ class uiPlaylist if (UI_WARNING) $this->Base->_retMsg('Playlist has been locked by "$1".', $this->Base->gb->getSubjName($userid)); return FALSE; } - $token = $this->Base->gb->lockPlaylistForEdit($plid, $this->Base->sessid); + $token = $this->Base->gb->lockPlaylistForEdit($plid, $this->Base->sessid); if (PEAR::isError($token)) { - #print_r($token); + if (UI_VERBOSE === TRUE) print_r($token); $this->Base->_retMsg('Unable to open playlist "$1".', $this->Base->_getMDataValue($plid, UI_MDATA_KEY_TITLE)); return FALSE; } @@ -94,7 +94,7 @@ class uiPlaylist } $plgunid = $this->Base->gb->releaseLockedPlaylist($this->token, $this->Base->sessid); if (PEAR::isError($plgunid)) { - #print_r($plgunid); + if (UI_VERBOSE === TRUE) print_r($plgunid); if (UI_WARNING) $this->Base->_retMsg('Unable to release playlist.'); return FALSE; } @@ -128,7 +128,7 @@ class uiPlaylist } $plgunid = $this->Base->gb->revertEditedPlaylist($this->token, $this->Base->sessid); if (PEAR::isError($plgunid)) { - # print_r($plgunid); + if (UI_VERBOSE === TRUE) print_r($plgunid); if (UI_WARNING) $this->Base->_retMsg('Unable to revert to locked state.'); return FALSE; } @@ -176,21 +176,27 @@ class uiPlaylist return FALSE; } - function addItem($elemIds) + function addItem($elemIds, $duration=null) { - $this->changed = TRUE; + $this->changed = TRUE; + $fadeIn = null; + $fadeOut = null; + $pause = null; if (!$elemIds) { if (UI_WARNING) $this->Base->_retMsg('No item(s) selected.'); return FALSE; } - if (!is_array($elemIds)) + if (!is_array($elemIds)) { $elemIds = array($elemIds); - - foreach ($elemIds as $elemId) { - $r = $this->Base->gb->addAudioClipToPlaylist($this->token, $elemId, $this->Base->sessid); + } + if (isset($duration)) { + $length = sprintf('%02d', $duration['H']).':'.sprintf('%02d', $duration['i']).':'.sprintf('%02d', $duration['s']).'.000000'; + } + foreach ($elemIds as $elemId) { + $r = $this->Base->gb->addAudioClipToPlaylist($this->token, $elemId, $this->Base->sessid, $fadeIn, $fadeOut, $length, $pause); if (PEAR::isError($r)) { - #print_r($r); + if (UI_VERBOSE === TRUE) print_r($r); $this->Base->_retMsg('Error while trying to add item to playlist.'); return FALSE; } @@ -258,13 +264,17 @@ class uiPlaylist unset($this->flat); $this->_plwalk($this->getPLArray($id)); - reset($this->flat); - $this->flat[key($this->flat)]['firstInList'] = true; - end($this->flat); - $this->flat[key($this->flat)]['lastInList'] = true; - reset($this->flat); + if (is_Array($this->flat)) { + reset($this->flat); + $this->flat[key($this->flat)]['firstInList'] = true; + end($this->flat); + $this->flat[key($this->flat)]['lastInList'] = true; + reset($this->flat); - return $this->flat; + return $this->flat; + } else { + return array(); + } } @@ -279,6 +289,7 @@ class uiPlaylist #$this->flat["$parent.$node"]['type'] = $sub['elementname']; $this->flat[$parent] = $this->Base->_getMetaInfo($this->Base->gb->_idFromGunid($sub['attrs']['id'])); $this->flat[$parent]['attrs'] = $attrs; + $this->flat[$parent]['playlength'] = $sub['attrs']['playlength']; } if ($sub['elementname']===UI_PL_ELEM_FADEINFO) { $this->flat[$parent][UI_PL_ELEM_FADEIN] = GreenBox::_plTimeToSecs($sub['attrs'][UI_PL_ELEM_FADEIN]); @@ -337,7 +348,7 @@ class uiPlaylist $r = $this->Base->gb->changeFadeInfo($this->token, $i, $val[UI_PL_ELEM_FADEIN], $val[UI_PL_ELEM_FADEOUT], $this->Base->sessid); #print_r($r); if (PEAR::isError($r)) { - if (UI_VERBOSE) print_r($r); + if (UI_VERBOSE === TRUE) print_r($r); $this->Base->_retMsg('Changing fade information failed.'); return FALSE; } @@ -348,7 +359,7 @@ class uiPlaylist $r = $this->Base->gb->changeFadeInfo($this->token, $v['attrs']['id'], $type==='pause'?$pause:$xfade, $type==='pause'?$pause:$xfade, $this->Base->sessid); #print_r($r); if (PEAR::isError($r)) { - if (UI_VERBOSE) print_r($r); + if (UI_VERBOSE === TRUE) print_r($r); $this->Base->_retMsg('Changing fade information failed.'); return FALSE; } @@ -364,7 +375,7 @@ class uiPlaylist $r = $this->Base->gb->moveAudioClipInPlaylist($this->token, $id, $pos, $this->Base->sessid); if (PEAR::isError($r)) { - if (UI_VERBOSE) print_r($r); + if (UI_VERBOSE === TRUE) print_r($r); $this->Base->_retMsg('Cannot move item.'); return FALSE; } @@ -382,7 +393,7 @@ class uiPlaylist $pos++; $r = $this->Base->gb->moveAudioClipInPlaylist($this->token, $id, $pos, $this->Base->sessid); if (PEAR::isError($r)) { - if (UI_VERBOSE) print_r($r); + if (UI_VERBOSE === TRUE) print_r($r); $this->Base->_retMsg('Cannot move item.'); return FALSE; } @@ -467,6 +478,28 @@ class uiPlaylist $form->accept($renderer); return $renderer->toArray(); } + + function setItemPlaylengthForm($id, $elemId, $mask) + { + if (isset($elemId)) { + $mask['act']['constant'] = 'PL.setItemPlaylength'; + $mask['elemId']['constant'] = $elemId; + $element = $this->getCurrElement($elemId); + $mask['playlength']['default'] = substr($element['playlength'], 0, 8); + $mask['duration']['constant'] = substr($element['duration'], 0, 8); + } else { + $mask['act']['constant'] = 'PL.addItem'; + $mask['id']['constant'] = $id; + $mask['playlength']['default'] = substr($this->Base->_getMDataValue($id, UI_MDATA_KEY_DURATION), 0, 8); + $mask['duration']['constant'] = $mask['playlength']['default']; + } + + $form = new HTML_QuickForm('PL_setItemPlaylengthForm', UI_STANDARD_FORM_METHOD, UI_HANDLER); + $this->Base->_parseArr2Form($form, $mask); + $renderer =& new HTML_QuickForm_Renderer_Array(true, true); + $form->accept($renderer); + return $renderer->toArray(); + } function metaDataForm($langid) @@ -531,7 +564,7 @@ class uiPlaylist foreach ($mData as $key=>$val) { $r = $this->Base->gb->setMDataValue($id, $key, $this->Base->sessid, $val, $curr_langid); if (PEAR::isError($r)) { - #print_r($r); + if (UI_VERBOSE === TRUE) print_r($r); $this->Base->_retMsg('Unable to set "$1" to value "$2".', $key, $val); } }