}
/**
- * Adds an anchor.
+ * Sets the URL anchor.
*
* @param string $anchor An anchor to add.
*
* @return Horde_Url This (modified) object, to allow chaining.
*/
- public function addAnchor($anchor)
+ public function setAnchor($anchor)
{
$this->anchor = $anchor;
return $this;
$url->addAnchor('boo');
$this->assertEquals('test?foo=1&bar=2&baz=3&fez#boo', (string)$url);
- $url->addAnchor('bee');
+ $url->setAnchor('bee');
$this->assertEquals('test?foo=1&bar=2&baz=3&fez#bee', (string)$url);
}
case 'url':
$anchor = $vars->anchor_string;
if (!empty($anchor)) {
- $url->addAnchor($anchor);
+ $url->setAnchor($anchor);
} else {
return _addAnchor($url, 'param', $vars, $url_anchor);
}
Horde_Registry::appInit('kronolith');
if (Kronolith::showAjaxView()) {
- header('Location: ' . Horde::applicationUrl('', true)->addAnchor('calendar:internal'));
+ header('Location: ' . Horde::applicationUrl('', true)->setAnchor('calendar:internal'));
exit;
}
}
if (Kronolith::showAjaxView()) {
- header('Location: ' . Horde::applicationUrl('', true)->addAnchor('calendar:internal|' . $calendar_id));
+ header('Location: ' . Horde::applicationUrl('', true)->setAnchor('calendar:internal|' . $calendar_id));
exit;
}
$vars = Horde_Variables::getDefaultVariables();
if (Kronolith::showAjaxView()) {
- header('Location: ' . Horde::applicationUrl('', true)->addAnchor('calendar:internal|' . $vars->get('c')));
+ header('Location: ' . Horde::applicationUrl('', true)->setAnchor('calendar:internal|' . $vars->get('c')));
exit;
}
$url = $vars->get('url');
if (Kronolith::showAjaxView()) {
- header('Location: ' . Horde::applicationUrl('', true)->addAnchor('calendar:remote|' . rawurlencode($url)));
+ header('Location: ' . Horde::applicationUrl('', true)->setAnchor('calendar:remote|' . rawurlencode($url)));
exit;
}
$url = $vars->get('url');
if (Kronolith::showAjaxView()) {
- header('Location: ' . Horde::applicationUrl('', true)->addAnchor('calendar:remote|' . rawurlencode($url)));
+ header('Location: ' . Horde::applicationUrl('', true)->setAnchor('calendar:remote|' . rawurlencode($url)));
exit;
}
$url = $vars->get('url');
if (Kronolith::showAjaxView()) {
- header('Location: ' . Horde::applicationUrl('', true)->addAnchor('calendar:remote|' . rawurlencode($url)));
+ header('Location: ' . Horde::applicationUrl('', true)->setAnchor('calendar:remote|' . rawurlencode($url)));
exit;
}
Horde_Registry::appInit('kronolith');
if (Kronolith::showAjaxView()) {
- header('Location: ' . Horde::applicationUrl('', true)->addAnchor('day:' . Kronolith::currentDate()->dateString()));
+ header('Location: ' . Horde::applicationUrl('', true)->setAnchor('day:' . Kronolith::currentDate()->dateString()));
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())));
+ 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_Registry::appInit('kronolith');
if (Kronolith::showAjaxView()) {
- header('Location: ' . Horde::applicationUrl('', true)->addAnchor('month:' . Kronolith::currentDate()->dateString()));
+ header('Location: ' . Horde::applicationUrl('', true)->setAnchor('month:' . Kronolith::currentDate()->dateString()));
exit;
}
Horde_Registry::appInit('kronolith');
if (Kronolith::showAjaxView()) {
- header('Location: ' . Horde::applicationUrl('', true)->addAnchor('event'));
+ header('Location: ' . Horde::applicationUrl('', true)->setAnchor('event'));
exit;
}
Horde_Registry::appInit('kronolith');
if (Kronolith::showAjaxView()) {
- header('Location: ' . Horde::applicationUrl('', true)->addAnchor('week:' . Kronolith::currentDate()->dateString()));
+ header('Location: ' . Horde::applicationUrl('', true)->setAnchor('week:' . Kronolith::currentDate()->dateString()));
exit;
}
Horde_Registry::appInit('kronolith');
if (Kronolith::showAjaxView()) {
- header('Location: ' . Horde::applicationUrl('', true)->addAnchor('week:' . Kronolith::currentDate()->dateString()));
+ header('Location: ' . Horde::applicationUrl('', true)->setAnchor('week:' . Kronolith::currentDate()->dateString()));
exit;
}
Horde_Registry::appInit('kronolith');
if (Kronolith::showAjaxView()) {
- header('Location: ' . Horde::applicationUrl('', true)->addAnchor('year:' . Kronolith::currentDate()->dateString()));
+ header('Location: ' . Horde::applicationUrl('', true)->setAnchor('year:' . Kronolith::currentDate()->dateString()));
exit;
}