require_once dirname(__FILE__) . '/lib/Application.php';
Horde_Registry::appInit('kronolith');
+if (Kronolith::showAjaxView()) {
+ header('Location: ' . Horde::applicationUrl('', true));
+ exit;
+}
+
if (!Horde_Util::getFormData('cancel')) {
$targetcalendar = Horde_Util::getFormData('targetcalendar');
if (strpos($targetcalendar, ':')) {
require_once dirname(__FILE__) . '/lib/Application.php';
Horde_Registry::appInit('kronolith');
+if (Kronolith::showAjaxView()) {
+ header('Location: ' . Horde::applicationUrl('', true));
+ exit;
+}
+
// Get the current attendees array from the session cache.
$attendees = (isset($_SESSION['kronolith']['attendees']) &&
is_array($_SESSION['kronolith']['attendees']))
require_once dirname(__FILE__) . '/../lib/Application.php';
Horde_Registry::appInit('kronolith');
+if (Kronolith::showAjaxView()) {
+ header('Location: ' . Horde::applicationUrl('', true)->addAnchor('calendar:internal'));
+ exit;
+}
+
require_once KRONOLITH_BASE . '/lib/Forms/CreateCalendar.php';
// Exit if this isn't an authenticated user or if the user can't
header('Location: ' . Horde::applicationUrl('calendars/', true));
exit;
}
+
+if (Kronolith::showAjaxView()) {
+ header('Location: ' . Horde::applicationUrl('', true)->addAnchor('calendar:internal|' . $calendar_id));
+ exit;
+}
+
try {
$calendar = $kronolith_shares->getShare($calendar_id);
} catch (Exception $e) {
require_once dirname(__FILE__) . '/../lib/Application.php';
Horde_Registry::appInit('kronolith');
+$vars = Horde_Variables::getDefaultVariables();
+
+if (Kronolith::showAjaxView()) {
+ header('Location: ' . Horde::applicationUrl('', true)->addAnchor('calendar:internal|' . $vars->get('c')));
+ exit;
+}
+
require_once KRONOLITH_BASE . '/lib/Forms/EditCalendar.php';
// Exit if this isn't an authenticated user.
exit;
}
-$vars = Horde_Variables::getDefaultVariables();
try {
$calendar = $kronolith_shares->getShare($vars->get('c'));
} catch (Exception $e) {
require_once dirname(__FILE__) . '/../lib/Application.php';
Horde_Registry::appInit('kronolith');
+if (Kronolith::showAjaxView()) {
+ header('Location: ' . Horde::applicationUrl('', true));
+ exit;
+}
+
// Exit if this isn't an authenticated user.
if (!$GLOBALS['registry']->getAuth()) {
header('Location: ' . Horde::applicationUrl($prefs->getValue('defaultview') . '.php'));
require_once dirname(__FILE__) . '/../lib/Application.php';
Horde_Registry::appInit('kronolith');
+$vars = Horde_Variables::getDefaultVariables();
+$url = $vars->get('url');
+
+if (Kronolith::showAjaxView()) {
+ header('Location: ' . Horde::applicationUrl('', true)->addAnchor('calendar:remote|' . rawurlencode($url)));
+ exit;
+}
+
require_once KRONOLITH_BASE . '/lib/Forms/EditRemoteCalendar.php';
// Exit if this isn't an authenticated user or if the user can't
exit;
}
-$vars = Horde_Variables::getDefaultVariables();
-$url = $vars->get('url');
-
$remote_calendar = null;
$remote_calendars = unserialize($GLOBALS['prefs']->getValue('remote_cals'));
foreach ($remote_calendars as $key => $calendar) {
require_once dirname(__FILE__) . '/../lib/Application.php';
Horde_Registry::appInit('kronolith');
+$vars = Horde_Variables::getDefaultVariables();
+$url = $vars->get('url');
+
+if (Kronolith::showAjaxView()) {
+ header('Location: ' . Horde::applicationUrl('', true)->addAnchor('calendar:remote|' . rawurlencode($url)));
+ exit;
+}
+
require_once KRONOLITH_BASE . '/lib/Forms/SubscribeRemoteCalendar.php';
// Exit if this isn't an authenticated user or if the user can't
exit;
}
-$vars = Horde_Variables::getDefaultVariables();
$form = new Kronolith_SubscribeRemoteCalendarForm($vars);
// Execute if the form is valid.
if ($form->validate($vars)) {
try {
$form->execute();
- $notification->push(sprintf(_("You have been subscribed to \"%s\" (%s)."), $vars->get('name'), $vars->get('url')), 'horde.success');
+ $notification->push(sprintf(_("You have been subscribed to \"%s\" (%s)."), $vars->get('name'), $url), 'horde.success');
} catch (Exception $e) {
$notification->push($e, 'horde.error');
}
require_once dirname(__FILE__) . '/../lib/Application.php';
Horde_Registry::appInit('kronolith');
+$vars = Horde_Variables::getDefaultVariables();
+$url = $vars->get('url');
+
+if (Kronolith::showAjaxView()) {
+ header('Location: ' . Horde::applicationUrl('', true)->addAnchor('calendar:remote|' . rawurlencode($url)));
+ exit;
+}
+
require_once KRONOLITH_BASE . '/lib/Forms/UnsubscribeRemoteCalendar.php';
// Exit if this isn't an authenticated user or if the user can't
exit;
}
-$vars = Horde_Variables::getDefaultVariables();
$remote_calendar = null;
$remote_calendars = unserialize($GLOBALS['prefs']->getValue('remote_cals'));
foreach ($remote_calendars as $key => $calendar) {
- if ($calendar['url'] == $vars->get('url')) {
+ if ($calendar['url'] == $url) {
$remote_calendar = $calendar;
break;
}
require_once dirname(__FILE__) . '/lib/Application.php';
Horde_Registry::appInit('kronolith');
+if (Kronolith::showAjaxView()) {
+ header('Location: ' . Horde::applicationUrl('', true));
+ exit;
+}
+
if (!$GLOBALS['registry']->getAuth()) {
echo Horde::wrapInlineScript(array('window.close();'));
exit;
require_once dirname(__FILE__) . '/lib/Application.php';
Horde_Registry::appInit('kronolith');
+if (Kronolith::showAjaxView()) {
+ header('Location: ' . Horde::applicationUrl('', true));
+ exit;
+}
+
if (!$conf['menu']['import_export']) {
require KRONOLITH_BASE . '/index.php';
exit;
require_once dirname(__FILE__) . '/lib/Application.php';
Horde_Registry::appInit('kronolith');
+if (Kronolith::showAjaxView()) {
+ header('Location: ' . Horde::applicationUrl('', true)->addAnchor('day:' . Kronolith::currentDate()->dateString()));
+ exit;
+}
+
$view = Kronolith::getView('Day');
$title = $view->getTime($prefs->getValue('date_format'));
require_once dirname(__FILE__) . '/lib/Application.php';
Horde_Registry::appInit('kronolith');
+if (Kronolith::showAjaxView()) {
+ header('Location: ' . Horde::applicationUrl('', true));
+ exit;
+}
+
if (Kronolith_Resource::isResourceCalendar($c = Horde_Util::getFormData('calendar'))) {
$driver = 'Resource';
} else {
require_once dirname(__FILE__) . '/lib/Application.php';
Horde_Registry::appInit('kronolith');
+if (Kronolith::showAjaxView()) {
+ header('Location: ' . Horde::applicationUrl('', true));
+ exit;
+}
+
$kronolith_driver = Kronolith::getDriver();
if ($exception = Horde_Util::getFormData('del_exception')) {
exit;
}
+if (Kronolith::showAjaxView()) {
+ header('Location: ' . Horde::applicationUrl('', true)->addAnchor('event:' . $view->event->calendarType . '|' . $view->event->calendar . ':' . $view->event->id . ':' . Horde_Util::getFormData('datetime', Kronolith::currentDate()->dateString())));
+ exit;
+}
+
switch ($viewName) {
case 'DeleteEvent':
/* Shortcut when we're deleting events and don't want confirmation. */
require_once dirname(__FILE__) . '/lib/Application.php';
Horde_Registry::appInit('kronolith');
+if (Kronolith::showAjaxView()) {
+ header('Location: ' . Horde::applicationUrl('', true)->addAnchor('month:' . Kronolith::currentDate()->dateString()));
+ exit;
+}
+
$view = Kronolith::getView('Month');
$title = $view->date->strftime('%B %Y');
require_once dirname(__FILE__) . '/lib/Application.php';
Horde_Registry::appInit('kronolith');
+if (Kronolith::showAjaxView()) {
+ header('Location: ' . Horde::applicationUrl('', true)->addAnchor('event'));
+ exit;
+}
+
/* Check permissions. */
$url = Horde::applicationUrl($prefs->getValue('defaultview') . '.php', true)
->add(array('month' => Horde_Util::getFormData('month'),
require_once dirname(__FILE__) . '/lib/Application.php';
Horde_Registry::appInit('kronolith');
+if (Kronolith::showAjaxView()) {
+ header('Location: ' . Horde::applicationUrl('', true));
+ exit;
+}
+
// Exit if the user shouldn't be able to change share permissions.
if (!empty($conf['share']['no_sharing'])) {
throw new Horde_Exception('Permission denied.');
require_once dirname(__FILE__) . '/../lib/Application.php';
Horde_Registry::appInit('kronolith');
+if (Kronolith::showAjaxView()) {
+ header('Location: ' . Horde::applicationUrl('', true));
+ exit;
+}
+
// Exit if this isn't an authenticated, administrative user
if (!$registry->isAdmin()) {
header('Location: ' . Horde::applicationUrl($prefs->getValue('defaultview') . '.php', true));
require_once dirname(__FILE__) . '/../lib/Application.php';
Horde_Registry::appInit('kronolith');
+if (Kronolith::showAjaxView()) {
+ header('Location: ' . Horde::applicationUrl('', true));
+ exit;
+}
+
require_once KRONOLITH_BASE . '/lib/Forms/DeleteResource.php';
// Exit if this isn't an authenticated administrative user.
require_once dirname(__FILE__) . '/../lib/Application.php';
Horde_Registry::appInit('kronolith');
+if (Kronolith::showAjaxView()) {
+ header('Location: ' . Horde::applicationUrl('', true));
+ exit;
+}
+
require_once KRONOLITH_BASE . '/lib/Forms/EditResource.php';
// Exit if this isn't an authenticated administrative user.
require_once dirname(__FILE__) . '/../lib/Application.php';
Horde_Registry::appInit('kronolith');
+if (Kronolith::showAjaxView()) {
+ header('Location: ' . Horde::applicationUrl('', true));
+ exit;
+}
+
$title = _("Edit resources");
require KRONOLITH_TEMPLATES . '/common-header.inc';
require_once dirname(__FILE__) . '/lib/Application.php';
Horde_Registry::appInit('kronolith');
+if (Kronolith::showAjaxView()) {
+ header('Location: ' . Horde::applicationUrl('', true));
+ exit;
+}
+
/* Get search parameters. */
$search_mode = Horde_Util::getFormData('search_mode', 'basic');
$search_calendar = explode('|', Horde_Util::getFormData('calendar', '|__any'), 2);
require_once dirname(__FILE__) . '/lib/Application.php';
Horde_Registry::appInit('kronolith');
+if (Kronolith::showAjaxView()) {
+ header('Location: ' . Horde::applicationUrl('', true));
+ exit;
+}
+
$view = Kronolith::getView(Horde_Util::getFormData('view'));
if ($view) {
Kronolith::tabs(strtolower(str_replace('kronolith_view_', '', Horde_String::lower(get_class($view)))));
require_once dirname(__FILE__) . '/lib/Application.php';
Horde_Registry::appInit('kronolith');
+if (Kronolith::showAjaxView()) {
+ header('Location: ' . Horde::applicationUrl('', true)->addAnchor('week:' . Kronolith::currentDate()->dateString()));
+ exit;
+}
+
$view = Kronolith::getView('Week');
$title = sprintf(_("Week %d"), $view->week);
require_once dirname(__FILE__) . '/lib/Application.php';
Horde_Registry::appInit('kronolith');
+if (Kronolith::showAjaxView()) {
+ header('Location: ' . Horde::applicationUrl('', true)->addAnchor('week:' . Kronolith::currentDate()->dateString()));
+ exit;
+}
+
$view = Kronolith::getView('WorkWeek');
$title = sprintf(_("Week %d"), $view->week);
require_once dirname(__FILE__) . '/lib/Application.php';
Horde_Registry::appInit('kronolith');
+if (Kronolith::showAjaxView()) {
+ header('Location: ' . Horde::applicationUrl('', true)->addAnchor('year:' . Kronolith::currentDate()->dateString()));
+ exit;
+}
+
$view = Kronolith::getView('Year');
$title = $view->year;