if ($prefs->getValue('compose_confirm')) {
$notification->push(_("Message redirected successfully."), 'horde.success');
}
- header('Location: ' . $imp_ui->mailboxReturnUrl(false));
+ $imp_ui->mailboxReturnUrl()->redirect();
}
exit;
} catch (Horde_Exception $e) {
$notification->push($result, 'horde.success');
if ($prefs->getValue('close_draft')) {
$imp_compose->destroy('save_draft');
- header('Location: ' . $imp_ui->mailboxReturnUrl(false));
- exit;
+ $imp_ui->mailboxReturnUrl()->redirect();
}
}
}
if ($prefs->getValue('compose_confirm') && $sent) {
$notification->push(_("Message sent successfully."), 'horde.success');
}
- header('Location: ' . $imp_ui->mailboxReturnUrl(false));
+ $imp_ui->mailboxReturnUrl()->redirect();
}
exit;
if ($isPopup) {
echo Horde::wrapInlineScript(array('window.close();'));
} else {
- header('Location: ' . $imp_ui->mailboxReturnUrl(false));
+ $imp_ui->mailboxReturnUrl()->redirect();
}
exit;
/* Redirect back to the mailbox if folder use is not allowed. */
if (empty($conf['user']['allow_folders'])) {
$notification->push(_("Folder use is not enabled."), 'horde.error');
- header('Location: ' . Horde::applicationUrl('mailbox-mimp.php', true));
- exit;
+ Horde::applicationUrl('mailbox-mimp.php', true)->redirect();
}
/* Decide whether or not to show all the unsubscribed folders */
/* Redirect back to the mailbox if folder use is not allowed. */
if (!$conf['user']['allow_folders']) {
$notification->push(_("Folder use is not enabled."), 'horde.error');
- header('Location: ' . Horde::applicationUrl('mailbox.php', true));
- exit;
+ Horde::applicationUrl('mailbox.php', true)->redirect();
}
/* Decide whether or not to show all the unsubscribed folders */
}
if ($redirect && ($GLOBALS['registry']->initialApp == 'imp')) {
- header('Location: ' . IMP_Auth::getInitialPage(true)->setRaw(true));
- exit;
+ IMP_Auth::getInitialPage(true)->redirect();
}
}
*
* @return string The mailbox return URL.
*/
- public function mailboxReturnUrl($url)
+ public function mailboxReturnUrl($url = null)
{
if (!$url) {
- $url = Horde::applicationUrl('mailbox.php')->setRaw(true);
+ $url = Horde::applicationUrl('mailbox.php');
}
foreach (array('start', 'page', 'mailbox', 'thismailbox') as $key) {
try {
$redirect = Horde::callHook('mbox_redirect', array(IMP::$mailbox), 'imp');
if (!empty($redirect)) {
- $redirect = Horde::applicationUrl($redirect, true);
- header('Location: ' . $redirect);
- exit;
+ Horde::applicationUrl($redirect, true)->redirect();
}
} catch (Horde_Exception_HookNotSet $e) {}
Horde::popupJs(Horde::applicationUrl('compose.php'), array('novoid' => true, 'params' => array_merge(array('popup' => 1), $options)))
), 'dom');
} else {
- header('Location: ' . Horde::applicationUrl('compose.php', true)->add($options));
- exit;
+ Horde::applicationUrl('compose.php', true)->add($options)->redirect();
}
}
break;
break;
case 'view_messages':
- $redirect = IMP::generateIMPUrl('thread.php', IMP::$mailbox, null, null, false)->setRaw(true)->add(array('mode' => 'msgview', 'msglist' => strval($indices)));
- header('Location: ' . $redirect);
- exit;
+ IMP::generateIMPUrl('thread.php', IMP::$mailbox, null, null, false)->add(array('mode' => 'msgview', 'msglist' => strval($indices)))->redirect();
}
/* Token to use in requests */
/* Make sure we have a valid index. */
$imp_mailbox = $injector->getInstance('IMP_Mailbox')->getOb(IMP::$mailbox, new IMP_Indices(IMP::$thismailbox, IMP::$uid));
if (!$imp_mailbox->isValidIndex(false)) {
- header('Location: ' . IMP::generateIMPUrl('mailbox-mimp.php', IMP::$mailbox)->setRaw(true)->add('a', 'm'));
- exit;
+ IMP::generateIMPUrl('mailbox-mimp.php', IMP::$mailbox)->add('a', 'm')->redirect();
}
$readonly = $injector->getInstance('IMP_Imap')->getOb()->isReadOnly(IMP::$mailbox);
* case. */
if (!$imp_mailbox->isValidIndex() ||
($msg_delete && $prefs->getValue('mailbox_return'))) {
- header('Location: ' . IMP::generateIMPUrl('mailbox-mimp.php', IMP::$mailbox)->setRaw(true)->add('s', $msg_index));
- exit;
+ IMP::generateIMPUrl('mailbox-mimp.php', IMP::$mailbox)->add('s', $msg_index)->redirect();
}
/* Now that we are done processing the messages, get the index and
Horde_Imap_Client::FETCH_HEADERTEXT => array(array('parse' => true, 'peek' => $readonly))
), array('ids' => array($uid)));
} catch (Horde_Imap_Client_Exception $e) {
- header('Location: ' . IMP::generateIMPUrl('mailbox-mimp.php', $mailbox_name)->setRaw(true)->add('a', 'm'));
- exit;
+ IMP::generateIMPUrl('mailbox-mimp.php', $mailbox_name)->add('a', 'm')->redirect();
}
$envelope = $fetch_ret[$uid]['envelope'];
try {
$imp_contents = $injector->getInstance('IMP_Contents')->getOb(new IMP_Indices($imp_mailbox));
} catch (IMP_Exception $e) {
- header('Location: ' . IMP::generateIMPUrl('mailbox-mimp.php', $mailbox_name)->setRaw(true)->add('a', 'm'));
- exit;
+ IMP::generateIMPUrl('mailbox-mimp.php', $mailbox_name)->add('a', 'm')->redirect();
}
/* Get the starting index for the current message and the message count. */
$id = $imp_ui_search->processBasicSearch($search_mailbox, Horde_Util::getFormData('search_criteria'), Horde_Util::getFormData('search_criteria_text'), Horde_Util::getFormData('search_criteria_not'), Horde_Util::getFormData('search_flags'));
/* Redirect to the mailbox screen. */
- header('Location: ' . Horde::applicationUrl('mailbox.php', true)->setRaw(true)->add('mailbox', $imp_search->createSearchID($id)));
- exit;
+ Horde::applicationUrl('mailbox.php', true)->add('mailbox', $imp_search->createSearchID($id))->redirect();
}
$f_fields = $s_fields = array();
print '<html><head>' .
Horde::wrapInlineScript(array('window.parent.DimpBase.go(' . Horde_Serialize::serialize('folder:' . $id, Horde_Serialize::JSON, $charset) . ')')) .
'</head></html>';
- } else {
- header('Location: ' . Horde::applicationUrl('mailbox.php', true)->setRaw(true)->add('mailbox', $id));
+ exit;
}
- exit;
+
+ Horde::applicationUrl('mailbox.php', true)->add('mailbox', $id)->redirect();
}
/* Generate master folder list. */
if ($imp_search->isVFolder($edit_query)) {
if (!$imp_search->isEditableVFolder($edit_query)) {
$notification->push(_("Special Virtual Folders cannot be edited."), 'horde.error');
- header('Location: ' . Horde::applicationUrl('mailbox.php', true));
- exit;
+ Horde::applicationUrl('mailbox.php', true)->redirect();
}
$t->set('edit_query_vfolder', htmlspecialchars($edit_query));
}
Horde_Registry::appInit('kronolith');
if (Kronolith::showAjaxView()) {
- header('Location: ' . Horde::applicationUrl('', true));
- exit;
+ Horde::applicationUrl('', true)->redirect();
}
if (!Horde_Util::getFormData('cancel')) {
}
// Make sure URL is unique.
-header('Location: ' . $url->unique());
+$url->unique()->redirect();
Horde_Registry::appInit('kronolith');
if (Kronolith::showAjaxView()) {
- header('Location: ' . Horde::applicationUrl('', true));
- exit;
+ Horde::applicationUrl('', true)->redirect();
}
// Get the current attendees array from the session cache.
}
// Make sure URL is unique.
- header('Location: ' . $url->unique());
- exit;
+ $url->unique()->redirect();
case 'clear':
// Remove all the attendees and resources.
Horde_Registry::appInit('kronolith');
if (Kronolith::showAjaxView()) {
- header('Location: ' . Horde::applicationUrl('', true)->setAnchor('calendar:internal'));
- exit;
+ Horde::applicationUrl('', true)->setAnchor('calendar:internal')->redirect();
}
require_once KRONOLITH_BASE . '/lib/Forms/CreateCalendar.php';
// Exit if this isn't an authenticated user or if the user can't
// create new calendars (default share is locked).
if (!$GLOBALS['registry']->getAuth() || $prefs->isLocked('default_share')) {
- header('Location: ' . Horde::applicationUrl($prefs->getValue('defaultview') . '.php', true));
- exit;
+ Horde::applicationUrl($prefs->getValue('defaultview') . '.php', true)->redirect();
}
$vars = Horde_Variables::getDefaultVariables();
} catch (Exception $e) {
$notification->push($e, 'horde.error');
}
- header('Location: ' . Horde::applicationUrl('calendars/', true));
- exit;
+ Horde::applicationUrl('calendars/', true)->redirect();
}
$title = $form->getTitle();
// Exit if this isn't an authenticated user.
if (!$GLOBALS['registry']->getAuth()) {
- header('Location: ' . Horde::applicationUrl($prefs->getValue('defaultview') . '.php', true));
- exit;
+ Horde::applicationUrl($prefs->getValue('defaultview') . '.php', true)->redirect();
}
$vars = Horde_Variables::getDefaultVariables();
$calendar_id = $vars->get('c');
if ($calendar_id == $GLOBALS['registry']->getAuth()) {
$notification->push(_("This calendar cannot be deleted."), 'horde.warning');
- header('Location: ' . Horde::applicationUrl('calendars/', true));
- exit;
+ Horde::applicationUrl('calendars/', true)->redirect();
}
if (Kronolith::showAjaxView()) {
- header('Location: ' . Horde::applicationUrl('', true)->setAnchor('calendar:internal|' . $calendar_id));
- exit;
+ Horde::applicationUrl('', true)->setAnchor('calendar:internal|' . $calendar_id)->redirect();
}
try {
$calendar = $kronolith_shares->getShare($calendar_id);
} catch (Exception $e) {
$notification->push($e, 'horde.error');
- header('Location: ' . Horde::applicationUrl('calendars/', true));
- exit;
+ Horde::applicationUrl('calendars/', true)->redirect();
}
if ($calendar->get('owner') != $GLOBALS['registry']->getAuth() &&
(!is_null($calendar->get('owner')) || !$registry->isAdmin())) {
$notification->push(_("You are not allowed to delete this calendar."), 'horde.error');
- header('Location: ' . Horde::applicationUrl('calendars/', true));
- exit;
+ Horde::applicationUrl('calendars/', true)->redirect();
}
$form = new Kronolith_DeleteCalendarForm($vars, $calendar);
} catch (Exception $e) {
$notification->push($e, 'horde.error');
}
- header('Location: ' . Horde::applicationUrl('calendars/', true));
- exit;
+ Horde::applicationUrl('calendars/', true)->redirect();
}
$title = $form->getTitle();
$vars = Horde_Variables::getDefaultVariables();
if (Kronolith::showAjaxView()) {
- header('Location: ' . Horde::applicationUrl('', true)->setAnchor('calendar:internal|' . $vars->get('c')));
- exit;
+ Horde::applicationUrl('', true)->setAnchor('calendar:internal|' . $vars->get('c'))->redirect();
}
require_once KRONOLITH_BASE . '/lib/Forms/EditCalendar.php';
// Exit if this isn't an authenticated user.
if (!$GLOBALS['registry']->getAuth()) {
- header('Location: ' . Horde::applicationUrl($prefs->getValue('defaultview') . '.php', true));
- exit;
+ Horde::applicationUrl($prefs->getValue('defaultview') . '.php', true)->redirect();
}
try {
$calendar = $kronolith_shares->getShare($vars->get('c'));
} catch (Exception $e) {
$notification->push($e, 'horde.error');
- header('Location: ' . Horde::applicationUrl('calendars/', true));
- exit;
+ Horde::applicationUrl('calendars/', true)->redirect();
}
if ($calendar->get('owner') != $GLOBALS['registry']->getAuth() &&
(!is_null($calendar->get('owner')) || !$registry->isAdmin())) {
$notification->push(_("You are not allowed to change this calendar."), 'horde.error');
- header('Location: ' . Horde::applicationUrl('calendars/', true));
- exit;
+ Horde::applicationUrl('calendars/', true)->redirect();
}
$form = new Kronolith_EditCalendarForm($vars, $calendar);
} catch (Exception $e) {
$notification->push($e, 'horde.error');
}
- header('Location: ' . Horde::applicationUrl('calendars/', true));
- exit;
+ Horde::applicationUrl('calendars/', true)->redirect();
}
$vars->set('name', $calendar->get('name'));
Horde_Registry::appInit('kronolith');
if (Kronolith::showAjaxView()) {
- header('Location: ' . Horde::applicationUrl('', true));
- exit;
+ Horde::applicationUrl('', true)->redirect();
}
// Exit if this isn't an authenticated user.
if (!$GLOBALS['registry']->getAuth()) {
- header('Location: ' . Horde::applicationUrl($prefs->getValue('defaultview') . '.php'));
- exit;
+ Horde::applicationUrl($prefs->getValue('defaultview') . '.php')->redirect();
}
$edit_url_base = Horde::applicationUrl('calendars/edit.php');
$url = $vars->get('url');
if (Kronolith::showAjaxView()) {
- header('Location: ' . Horde::applicationUrl('', true)->setAnchor('calendar:remote|' . rawurlencode($url)));
- exit;
+ Horde::applicationUrl('', true)->setAnchor('calendar:remote|' . rawurlencode($url))->redirect();
}
require_once KRONOLITH_BASE . '/lib/Forms/EditRemoteCalendar.php';
// Exit if this isn't an authenticated user or if the user can't
// subscribe to remote calendars (remote_cals is locked).
if (!$GLOBALS['registry']->getAuth() || $prefs->isLocked('remote_cals')) {
- header('Location: ' . Horde::applicationUrl($prefs->getValue('defaultview') . '.php', true));
- exit;
+ Horde::applicationUrl($prefs->getValue('defaultview') . '.php', true)->redirect();
}
$remote_calendar = null;
}
if (is_null($remote_calendar)) {
$notification->push(_("The remote calendar was not found."), 'horde.error');
- header('Location: ' . Horde::applicationUrl('calendars/', true));
- exit;
+ Horde::applicationUrl('calendars/', true)->redirect();
}
$form = new Kronolith_EditRemoteCalendarForm($vars, $remote_calendar);
} catch (Exception $e) {
$notification->push($e, 'horde.error');
}
- header('Location: ' . Horde::applicationUrl('calendars/', true));
- exit;
+ Horde::applicationUrl('calendars/', true)->redirect();
}
$key = $registry->getAuthCredential('password');
$url = $vars->get('url');
if (Kronolith::showAjaxView()) {
- header('Location: ' . Horde::applicationUrl('', true)->setAnchor('calendar:remote|' . rawurlencode($url)));
- exit;
+ Horde::applicationUrl('', true)->setAnchor('calendar:remote|' . rawurlencode($url))->redirect();
}
require_once KRONOLITH_BASE . '/lib/Forms/SubscribeRemoteCalendar.php';
// Exit if this isn't an authenticated user or if the user can't
// subscribe to remote calendars (remote_cals is locked).
if (!$GLOBALS['registry']->getAuth() || $prefs->isLocked('remote_cals')) {
- header('Location: ' . Horde::applicationUrl($prefs->getValue('defaultview') . '.php', true));
- exit;
+ Horde::applicationUrl($prefs->getValue('defaultview') . '.php', true)->redirect();
}
$form = new Kronolith_SubscribeRemoteCalendarForm($vars);
} catch (Exception $e) {
$notification->push($e, 'horde.error');
}
- header('Location: ' . Horde::applicationUrl('calendars/', true));
- exit;
+ Horde::applicationUrl('calendars/', true)->redirect();
}
$title = $form->getTitle();
$url = $vars->get('url');
if (Kronolith::showAjaxView()) {
- header('Location: ' . Horde::applicationUrl('', true)->setAnchor('calendar:remote|' . rawurlencode($url)));
- exit;
+ Horde::applicationUrl('', true)->setAnchor('calendar:remote|' . rawurlencode($url))->redirect();
}
require_once KRONOLITH_BASE . '/lib/Forms/UnsubscribeRemoteCalendar.php';
// Exit if this isn't an authenticated user or if the user can't
// subscribe to remote calendars (remote_cals is locked).
if (!$GLOBALS['registry']->getAuth() || $prefs->isLocked('remote_cals')) {
- header('Location: ' . Horde::applicationUrl($prefs->getValue('defaultview') . '.php', true));
- exit;
+ Horde::applicationUrl($prefs->getValue('defaultview') . '.php', true)->redirect();
}
$remote_calendar = null;
}
if (is_null($remote_calendar)) {
$notification->push(_("The remote calendar was not found."), 'horde.error');
- header('Location: ' . Horde::applicationUrl('calendars/', true));
- exit;
+ Horde::applicationUrl('calendars/', true)->redirect();
}
$form = new Kronolith_UnsubscribeRemoteCalendarForm($vars, $remote_calendar);
} catch (Exception $e) {
$notification->push($e, 'horde.error');
}
- header('Location: ' . Horde::applicationUrl('calendars/', true));
- exit;
+ Horde::applicationUrl('calendars/', true)->redirect();
}
$vars->set('url', $calendar['url']);
Horde_Registry::appInit('kronolith');
if (Kronolith::showAjaxView()) {
- header('Location: ' . Horde::applicationUrl('', true));
- exit;
+ Horde::applicationUrl('', true)->redirect();
}
if (!$GLOBALS['registry']->getAuth()) {
Horde_Registry::appInit('kronolith');
if (Kronolith::showAjaxView()) {
- header('Location: ' . Horde::applicationUrl('', true));
- exit;
+ Horde::applicationUrl('', true)->redirect();
}
if (!$conf['menu']['import_export']) {
Horde_Registry::appInit('kronolith');
if (Kronolith::showAjaxView()) {
- header('Location: ' . Horde::applicationUrl('', true)->setAnchor('day:' . Kronolith::currentDate()->dateString()));
- exit;
+ Horde::applicationUrl('', true)->setAnchor('day:' . Kronolith::currentDate()->dateString())->redirect();
}
$view = Kronolith::getView('Day');
Horde_Registry::appInit('kronolith');
if (Kronolith::showAjaxView()) {
- header('Location: ' . Horde::applicationUrl('', true));
- exit;
+ Horde::applicationUrl('', true)->redirect();
}
if (Kronolith_Resource::isResourceCalendar($c = Horde_Util::getFormData('calendar'))) {
if (($url = Horde_Util::getFormData('url')) === null) {
$url = Horde::applicationUrl($prefs->getValue('defaultview') . '.php', true);
}
- header('Location: ' . $url);
- exit;
+ (new Horde_Url($url))->redirect();
}
if ($driver != 'Resource') {
$share = $kronolith_shares->getShare($event->calendar);
}
// Make sure URL is unique.
-header('Location: ' . $url->unique());
+$url->unique()->redirect();
Horde_Registry::appInit('kronolith');
if (Kronolith::showAjaxView()) {
- header('Location: ' . Horde::applicationUrl('', true));
- exit;
+ Horde::applicationUrl('', true)->redirect();
}
$kronolith_driver = Kronolith::getDriver();
}
// Make sure URL is unique.
-header('Location: ' . $url->unique());
+$url->unique()->redirect();
$view = Kronolith::getView($viewName);
if (is_string($view->event)) {
$notification->push($view->event, 'horde.error');
- header('Location: ' . Horde::applicationUrl($prefs->getValue('defaultview') . '.php', true));
- exit;
+ Horde::applicationUrl($prefs->getValue('defaultview') . '.php', true)->redirect();
}
if (Kronolith::showAjaxView()) {
- header('Location: ' . Horde::applicationUrl('', true)->setAnchor('event:' . $view->event->calendarType . '|' . $view->event->calendar . ':' . $view->event->id . ':' . Horde_Util::getFormData('datetime', Kronolith::currentDate()->dateString())));
- exit;
+ Horde::applicationUrl('', true)->setAnchor('event:' . $view->event->calendarType . '|' . $view->event->calendar . ':' . $view->event->id . ':' . Horde_Util::getFormData('datetime', Kronolith::currentDate()->dateString()))->redirect();
}
switch ($viewName) {
if (!$view->event->recurs() &&
!($prefs->getValue('confirm_delete') ||
Horde_Util::getFormData('confirm'))) {
- header('Location: ' . Horde::applicationUrl('delete.php?' . $_SERVER['QUERY_STRING'], true));
- exit;
+ Horde::applicationUrl('delete.php?' . $_SERVER['QUERY_STRING'], true)->redirect();
}
break;
} else {
$url = Horde::applicationUrl($prefs->getValue('defaultview') . '.php', true);
}
- header('Location: ' . $url->unique());
- exit;
+ $url->unique()->redirect();
}
break;
}
Horde_Registry::appInit('kronolith');
if (Kronolith::showAjaxView()) {
- header('Location: ' . Horde::applicationUrl('', true)->setAnchor('month:' . Kronolith::currentDate()->dateString()));
- exit;
+ Horde::applicationUrl('', true)->setAnchor('month:' . Kronolith::currentDate()->dateString())->redirect();
}
$view = Kronolith::getView('Month');
Horde_Registry::appInit('kronolith');
if (Kronolith::showAjaxView()) {
- header('Location: ' . Horde::applicationUrl('', true)->setAnchor('event'));
- exit;
+ Horde::applicationUrl('', true)->setAnchor('event')->redirect();
}
/* Check permissions. */
$message = @htmlspecialchars(sprintf(_("You are not allowed to create more than %d events."), $perms->hasAppPermission('max_events')), ENT_COMPAT, $GLOBALS['registry']->getCharset());
}
$notification->push($message, 'horde.error', array('content.raw'));
- header('Location: ' . $url);
- exit;
+ $url->redirect();
}
$calendar_id = Horde_Util::getFormData('calendar', Kronolith::getDefaultCalendar(Horde_Perms::EDIT));
if (!$calendar_id) {
- header('Location: ' . $url);
+ $url->redirect();
}
$event = Kronolith::getDriver()->getEvent();
Horde_Registry::appInit('kronolith');
if (Kronolith::showAjaxView()) {
- header('Location: ' . Horde::applicationUrl('', true));
- exit;
+ Horde::applicationUrl('', true)->redirect();
}
// Exit if the user shouldn't be able to change share permissions.
Horde_Registry::appInit('kronolith');
if (Kronolith::showAjaxView()) {
- header('Location: ' . Horde::applicationUrl('', true));
- exit;
+ Horde::applicationUrl('', true)->redirect();
}
// Exit if this isn't an authenticated, administrative user
if (!$registry->isAdmin()) {
- header('Location: ' . Horde::applicationUrl($prefs->getValue('defaultview') . '.php', true));
- exit;
+ Horde::applicationUrl($prefs->getValue('defaultview') . '.php', true)->redirect();
}
require_once KRONOLITH_BASE . '/lib/Forms/CreateResource.php';
$notification->push($e, 'horde.error');
}
- header('Location: ' . Horde::applicationUrl('resources/', true));
+ Horde::applicationUrl('resources/', true)->redirect();
exit;
}
Horde_Registry::appInit('kronolith');
if (Kronolith::showAjaxView()) {
- header('Location: ' . Horde::applicationUrl('', true));
- exit;
+ Horde::applicationUrl('', true)->redirect();
}
require_once KRONOLITH_BASE . '/lib/Forms/DeleteResource.php';
// Exit if this isn't an authenticated administrative user.
if (!$registry->isAdmin()) {
- header('Location: ' . Horde::applicationUrl($prefs->getValue('defaultview') . '.php', true));
- exit;
+ Horde::applicationUrl($prefs->getValue('defaultview') . '.php', true)->redirect();
}
$vars = Horde_Variables::getDefaultVariables();
$resource = Kronolith::getDriver('Resource')->getResource($vars->get('c'));
if (!$resource->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::DELETE)) {
$notification->push(_("You are not allowed to delete this resource."), 'horde.error');
- header('Location: ' . Horde::applicationUrl('resources/', true));
- exit;
+ Horde::applicationUrl('resources/', true)->redirect();
}
} catch (Exception $e) {
$notification->push($e, 'horde.error');
- header('Location: ' . Horde::applicationUrl('resources/', true));
- exit;
+ Horde::applicationUrl('resources/', true)->redirect();
}
$form = new Kronolith_DeleteResourceForm($vars, $resource);
$notification->push($e, 'horde.error');
}
- header('Location: ' . Horde::applicationUrl('resources/', true));
- exit;
+ Horde::applicationUrl('resources/', true)->redirect();
}
$title = $form->getTitle();
Horde_Registry::appInit('kronolith');
if (Kronolith::showAjaxView()) {
- header('Location: ' . Horde::applicationUrl('', true));
- exit;
+ Horde::applicationUrl('', true)->redirect();
}
require_once KRONOLITH_BASE . '/lib/Forms/EditResource.php';
// Exit if this isn't an authenticated administrative user.
if (!$registry->isAdmin()) {
- header('Location: ' . Horde::applicationUrl($prefs->getValue('defaultview') . '.php', true));
- exit;
+ Horde::applicationUrl($prefs->getValue('defaultview') . '.php', true)->redirect();
}
$vars = Horde_Variables::getDefaultVariables();
$resource = Kronolith::getDriver('Resource')->getResource($vars->get('c'));
if (!$resource->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT)) {
$notification->push(_("You are not allowed to change this resource."), 'horde.error');
- header('Location: ' . Horde::applicationUrl('resources/', true));
- exit;
+ Horde::applicationUrl('resources/', true)->redirect();
}
} catch (Exception $e) {
$notification->push($e, 'horde.error');
- header('Location: ' . Horde::applicationUrl('resources/', true));
- exit;
+ Horde::applicationUrl('resources/', true)->redirect();
}
$form = new Kronolith_EditResourceForm($vars, $resource);
$notification->push($e, 'horde.error');
}
- header('Location: ' . Horde::applicationUrl('resources/', true));
- exit;
+ Horde::applicationUrl('resources/', true)->redirect();
}
$vars->set('name', $resource->get('name'));
// Exit if this isn't an authenticated, administrative user
if (!$registry->isAdmin()) {
- header('Location: ' . Horde::applicationUrl($prefs->getValue('defaultview') . '.php', true));
- exit;
+ Horde::applicationUrl($prefs->getValue('defaultview') . '.php', true)->redirect();
}
$vars = Horde_Variables::getDefaultVariables();
$notification->push($e, 'horde.error');
}
- header('Location: ' . Horde::applicationUrl('resources/groups/', true));
- exit;
+ Horde::applicationUrl('resources/groups/', true)->redirect();
}
$title = $form->getTitle();
// Exit if this isn't an authenticated administrative user.
if (!$registry->isAdmin()) {
- header('Location: ' . Horde::applicationUrl($prefs->getValue('defaultview') . '.php', true));
- exit;
+ Horde::applicationUrl($prefs->getValue('defaultview') . '.php', true)->redirect();
}
$vars = Horde_Variables::getDefaultVariables();
$resource = Kronolith::getDriver('Resource')->getResource($vars->get('c'));
if (!$resource->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::DELETE)) {
$notification->push(_("You are not allowed to delete this resource group."), 'horde.error');
- header('Location: ' . Horde::applicationUrl('resources/groups/', true));
- exit;
+ Horde::applicationUrl('resources/groups/', true)->redirect();
}
} catch (Exception $e) {
$notification->push($e, 'horde.error');
- header('Location: ' . Horde::applicationUrl('resources/groups/', true));
- exit;
+ Horde::applicationUrl('resources/groups/', true)->redirect();
}
$form = new Kronolith_DeleteResourceGroupForm($vars, $resource);
$notification->push($e, 'horde.error');
}
- header('Location: ' . Horde::applicationUrl('resources/groups/', true));
- exit;
+ Horde::applicationUrl('resources/groups/', true)->redirect();
}
$title = $form->getTitle();
// Exit if this isn't an authenticated administrative user.
if (!$registry->isAdmin()) {
- header('Location: ' . Horde::applicationUrl($prefs->getValue('defaultview') . '.php', true));
- exit;
+ Horde::applicationUrl($prefs->getValue('defaultview') . '.php', true)->redirect();
}
$vars = Horde_Variables::getDefaultVariables();
$group = Kronolith::getDriver('Resource')->getResource($vars->get('c'));
if (!$group->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT)) {
$notification->push(_("You are not allowed to change this resource."), 'horde.error');
- header('Location: ' . Horde::applicationUrl('resources/groups/', true));
- exit;
+ Horde::applicationUrl('resources/groups/', true)->redirect();
}
} catch (Exception $e) {
$notification->push($e, 'horde.error');
- header('Location: ' . Horde::applicationUrl('resources/groups/', true));
- exit;
+ Horde::applicationUrl('resources/groups/', true)->redirect();
}
$form = new Kronolith_EditResourceGroupForm($vars, $group);
$notification->push($e, 'horde.error');
}
- header('Location: ' . Horde::applicationUrl('resources/groups/', true));
- exit;
+ Horde::applicationUrl('resources/groups/', true)->redirect();
}
$vars->set('name', $group->get('name'));
// Exit if this isn't an authenticated user.
if (!$GLOBALS['registry']->getAuth()) {
- header('Location: ' . Horde::applicationUrl($prefs->getValue('defaultview') . '.php'));
- exit;
+ Horde::applicationUrl($prefs->getValue('defaultview') . '.php')->redirect();
}
$edit_url_base = Horde::applicationUrl('resources/groups/edit.php');
$edit_img = Horde::img('edit.png', _("Edit"));
Horde_Registry::appInit('kronolith');
if (Kronolith::showAjaxView()) {
- header('Location: ' . Horde::applicationUrl('', true));
- exit;
+ Horde::applicationUrl('', true)->redirect();
}
$title = _("Edit resources");
// Exit if this isn't an authenticated user.
if (!$GLOBALS['registry']->getAuth()) {
- header('Location: ' . Horde::applicationUrl($prefs->getValue('defaultview') . '.php'));
- exit;
+ Horde::applicationUrl($prefs->getValue('defaultview') . '.php')->redirect();
}
$edit_url_base = Horde::applicationUrl('resources/edit.php');
$edit_img = Horde::img('edit.png', _("Edit"));
Horde_Registry::appInit('kronolith');
if (Kronolith::showAjaxView()) {
- header('Location: ' . Horde::applicationUrl('', true));
- exit;
+ Horde::applicationUrl('', true)->redirect();
}
/* Get search parameters. */
Horde_Registry::appInit('kronolith');
if (Kronolith::showAjaxView()) {
- header('Location: ' . Horde::applicationUrl('', true));
- exit;
+ Horde::applicationUrl('', true)->redirect();
}
$view = Kronolith::getView(Horde_Util::getFormData('view'));
Horde_Registry::appInit('kronolith');
if (Kronolith::showAjaxView()) {
- header('Location: ' . Horde::applicationUrl('', true)->setAnchor('week:' . Kronolith::currentDate()->dateString()));
- exit;
+ Horde::applicationUrl('', true)->setAnchor('week:' . Kronolith::currentDate()->dateString())->redirect();
}
$view = Kronolith::getView('Week');
Horde_Registry::appInit('kronolith');
if (Kronolith::showAjaxView()) {
- header('Location: ' . Horde::applicationUrl('', true)->setAnchor('week:' . Kronolith::currentDate()->dateString()));
+ Horde::applicationUrl('', true)->setAnchor('week:' . Kronolith::currentDate()->dateString())->redirect();
exit;
}
Horde_Registry::appInit('kronolith');
if (Kronolith::showAjaxView()) {
- header('Location: ' . Horde::applicationUrl('', true)->setAnchor('year:' . Kronolith::currentDate()->dateString()));
+ Horde::applicationUrl('', true)->setAnchor('year:' . Kronolith::currentDate()->dateString())->redirect();
exit;
}