Fixed some formatting to comply with style guidelines.

This commit is contained in:
paul 2006-10-25 20:43:20 +00:00
parent 3d03ae059d
commit ce24055515
1 changed files with 268 additions and 259 deletions

View File

@ -1,5 +1,5 @@
<?php <?php
require dirname(__FILE__).'/../ui_handler_init.php'; require(dirname(__FILE__).'/../ui_handler_init.php');
switch ($_REQUEST['act']) { switch ($_REQUEST['act']) {
@ -23,11 +23,11 @@ switch($_REQUEST['act']){
$uiHandler->logout(TRUE); $uiHandler->logout(TRUE);
break; break;
## file/webstream handling ## file/webstream handling
case "addFileData": case "addFileData":
if (($ui_tmpid = $uiHandler->uploadFile(array_merge($_REQUEST, $_FILES), $ui_fmask["file"])) !== FALSE) if (($ui_tmpid = $uiHandler->uploadFile(array_merge($_REQUEST, $_FILES), $ui_fmask["file"])) !== FALSE) {
$uiHandler->SCRATCHPAD->addItem($ui_tmpid); $uiHandler->SCRATCHPAD->addItem($ui_tmpid);
}
break; break;
case "addWebstreamData": case "addWebstreamData":
@ -240,26 +240,29 @@ switch($_REQUEST['act']){
break; break;
case "PL.activate": case "PL.activate":
if ($uiHandler->PLAYLIST->activate($_REQUEST['id']) === TRUE) if ($uiHandler->PLAYLIST->activate($_REQUEST['id']) === TRUE) {
$uiHandler->SCRATCHPAD->addItem($_REQUEST['id']); $uiHandler->SCRATCHPAD->addItem($_REQUEST['id']);
}
$uiHandler->PLAYLIST->setRedirect(); $uiHandler->PLAYLIST->setRedirect();
break; break;
case "PL.create": case "PL.create":
if (($ui_tmpid = $uiHandler->PLAYLIST->create($_REQUEST['id'])) !== FALSE) { if (($ui_tmpid = $uiHandler->PLAYLIST->create($_REQUEST['id'])) !== FALSE) {
if ($_REQUEST['id']) $uiHandler->SCRATCHPAD->addItem($_REQUEST['id']); if ($_REQUEST['id']) {
$uiHandler->SCRATCHPAD->addItem($_REQUEST['id']);
}
$uiHandler->SCRATCHPAD->addItem($ui_tmpid); $uiHandler->SCRATCHPAD->addItem($ui_tmpid);
} }
$uiHandler->PLAYLIST->setRedirect('_2PL.editMetaData'); $uiHandler->PLAYLIST->setRedirect('_2PL.editMetaData');
break; break;
case "PL.addItem": case "PL.addItem":
if ($uiHandler->PLAYLIST->addItem($_REQUEST['id'], $_REQUEST['playlength']) !== FALSE) if ($uiHandler->PLAYLIST->addItem($_REQUEST['id'], $_REQUEST['playlength']) !== FALSE) {
$uiHandler->SCRATCHPAD->addItem($_REQUEST['id']); $uiHandler->SCRATCHPAD->addItem($_REQUEST['id']);
}
$uiHandler->PLAYLIST->setReload(); $uiHandler->PLAYLIST->setReload();
break; break;
case "PL.setItemPlaylength": case "PL.setItemPlaylength":
$uiHandler->PLAYLIST->setItemPlaylength($_REQUEST['elemId'], $_REQUEST['playlength']); $uiHandler->PLAYLIST->setItemPlaylength($_REQUEST['elemId'], $_REQUEST['playlength']);
$uiHandler->PLAYLIST->setReload(); $uiHandler->PLAYLIST->setReload();
@ -276,14 +279,16 @@ switch($_REQUEST['act']){
break; break;
case "PL.save": case "PL.save":
if (($ui_tmpid = $uiHandler->PLAYLIST->save()) !== FALSE) if (($ui_tmpid = $uiHandler->PLAYLIST->save()) !== FALSE) {
$uiHandler->SCRATCHPAD->addItem($ui_tmpid); $uiHandler->SCRATCHPAD->addItem($ui_tmpid);
}
$uiHandler->PLAYLIST->setReload(); $uiHandler->PLAYLIST->setReload();
break; break;
case "PL.revert": case "PL.revert":
if (($ui_tmpid = $uiHandler->PLAYLIST->revert()) !== FALSE) if (($ui_tmpid = $uiHandler->PLAYLIST->revert()) !== FALSE) {
$uiHandler->SCRATCHPAD->addItem($ui_tmpid); $uiHandler->SCRATCHPAD->addItem($ui_tmpid);
}
$uiHandler->PLAYLIST->setReload(); $uiHandler->PLAYLIST->setReload();
break; break;
@ -324,8 +329,9 @@ switch($_REQUEST['act']){
break; break;
case "PL.deleteActive": case "PL.deleteActive":
if (($ui_tmpid = $uiHandler->PLAYLIST->deleteActive()) !== FALSE) if (($ui_tmpid = $uiHandler->PLAYLIST->deleteActive()) !== FALSE) {
$uiHandler->SCRATCHPAD->removeItems($ui_tmpid); $uiHandler->SCRATCHPAD->removeItems($ui_tmpid);
}
$uiHandler->PLAYLIST->setReload(); $uiHandler->PLAYLIST->setReload();
break; break;
@ -419,17 +425,20 @@ switch($_REQUEST['act']){
case NULL: case NULL:
if ($uiHandler->userid) { if ($uiHandler->userid) {
$uiHandler->_retMsg('The uploaded filer is bigger than allowed in system settings. See "Help", chapter "Troubleshooting" for more information.'); $uiHandler->_retMsg('The uploaded file 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'; if ($_REQUEST['is_popup']) {
$uiHandler->redirUrl = UI_BROWSER.'?popup[]=_reload_parent&popup[]=_close';
}
break; break;
default: default:
$uiHandler->_retMsg(tra('Unknown method: $1', $_REQUEST['act'])); $uiHandler->_retMsg(tra('Unknown method: $1', $_REQUEST['act']));
$uiHandler->redirUrl = UI_BROWSER; $uiHandler->redirUrl = UI_BROWSER;
if ($_REQUEST['is_popup']) $uiHandler->redirUrl = UI_BROWSER.'?popup[]=_reload_parent&popup[]=_close'; if ($_REQUEST['is_popup']) {
$uiHandler->redirUrl = UI_BROWSER.'?popup[]=_reload_parent&popup[]=_close';
}
break; break;
} }