setAnchor() makes more sense actually.
authorJan Schneider <jan@horde.org>
Wed, 28 Jul 2010 16:41:51 +0000 (18:41 +0200)
committerJan Schneider <jan@horde.org>
Wed, 28 Jul 2010 16:42:16 +0000 (18:42 +0200)
16 files changed:
framework/Url/lib/Horde/Url.php
framework/Url/test/Horde/Url/AddTest.php
horde/login.php
kronolith/calendars/create.php
kronolith/calendars/delete.php
kronolith/calendars/edit.php
kronolith/calendars/remote_edit.php
kronolith/calendars/remote_subscribe.php
kronolith/calendars/remote_unsubscribe.php
kronolith/day.php
kronolith/event.php
kronolith/month.php
kronolith/new.php
kronolith/week.php
kronolith/workweek.php
kronolith/year.php

index a844531..4551d74 100644 (file)
@@ -184,13 +184,13 @@ class Horde_Url
     }
 
     /**
-     * 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;
index e9d208b..c2e673d 100644 (file)
@@ -23,7 +23,7 @@ class Horde_Url_AddTest extends PHPUnit_Framework_TestCase
 
         $url->addAnchor('boo');
         $this->assertEquals('test?foo=1&amp;bar=2&amp;baz=3&amp;fez#boo', (string)$url);
-        $url->addAnchor('bee');
+        $url->setAnchor('bee');
         $this->assertEquals('test?foo=1&amp;bar=2&amp;baz=3&amp;fez#bee', (string)$url);
     }
 
index 4fc95db..185b1bd 100644 (file)
@@ -36,7 +36,7 @@ function _addAnchor($url, $type, $vars, $url_anchor = null)
     case 'url':
         $anchor = $vars->anchor_string;
         if (!empty($anchor)) {
-            $url->addAnchor($anchor);
+            $url->setAnchor($anchor);
         } else {
             return _addAnchor($url, 'param', $vars, $url_anchor);
         }
index 4255fc2..c2695ea 100644 (file)
@@ -12,7 +12,7 @@ require_once dirname(__FILE__) . '/../lib/Application.php';
 Horde_Registry::appInit('kronolith');
 
 if (Kronolith::showAjaxView()) {
-    header('Location: ' . Horde::applicationUrl('', true)->addAnchor('calendar:internal'));
+    header('Location: ' . Horde::applicationUrl('', true)->setAnchor('calendar:internal'));
     exit;
 }
 
index 4756347..70ab501 100644 (file)
@@ -28,7 +28,7 @@ if ($calendar_id == $GLOBALS['registry']->getAuth()) {
 }
 
 if (Kronolith::showAjaxView()) {
-    header('Location: ' . Horde::applicationUrl('', true)->addAnchor('calendar:internal|' . $calendar_id));
+    header('Location: ' . Horde::applicationUrl('', true)->setAnchor('calendar:internal|' . $calendar_id));
     exit;
 }
 
index 5b3252f..e42b695 100644 (file)
@@ -14,7 +14,7 @@ Horde_Registry::appInit('kronolith');
 $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;
 }
 
index fdedbb9..d5d43f3 100644 (file)
@@ -15,7 +15,7 @@ $vars = Horde_Variables::getDefaultVariables();
 $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;
 }
 
index b16bd52..749871b 100644 (file)
@@ -15,7 +15,7 @@ $vars = Horde_Variables::getDefaultVariables();
 $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;
 }
 
index fe52eff..36abebe 100644 (file)
@@ -15,7 +15,7 @@ $vars = Horde_Variables::getDefaultVariables();
 $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;
 }
 
index a74b14c..af56303 100644 (file)
@@ -13,7 +13,7 @@ require_once dirname(__FILE__) . '/lib/Application.php';
 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;
 }
 
index 675bf0d..9b93c4c 100644 (file)
@@ -21,7 +21,7 @@ if (is_string($view->event)) {
 }
 
 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;
 }
 
index 7957617..1082ec8 100644 (file)
@@ -12,7 +12,7 @@ require_once dirname(__FILE__) . '/lib/Application.php';
 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;
 }
 
index 7c14dce..ce97761 100644 (file)
@@ -12,7 +12,7 @@ require_once dirname(__FILE__) . '/lib/Application.php';
 Horde_Registry::appInit('kronolith');
 
 if (Kronolith::showAjaxView()) {
-    header('Location: ' . Horde::applicationUrl('', true)->addAnchor('event'));
+    header('Location: ' . Horde::applicationUrl('', true)->setAnchor('event'));
     exit;
 }
 
index 11d460c..24d55f9 100644 (file)
@@ -13,7 +13,7 @@ require_once dirname(__FILE__) . '/lib/Application.php';
 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;
 }
 
index cfcf4f0..c091ce1 100644 (file)
@@ -13,7 +13,7 @@ require_once dirname(__FILE__) . '/lib/Application.php';
 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;
 }
 
index a729de8..68f4eca 100644 (file)
@@ -13,7 +13,7 @@ require_once dirname(__FILE__) . '/lib/Application.php';
 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;
 }