Use Horde_Url, fix double encoding.
authorJan Schneider <jan@horde.org>
Fri, 15 Oct 2010 11:00:09 +0000 (13:00 +0200)
committerJan Schneider <jan@horde.org>
Fri, 15 Oct 2010 11:00:09 +0000 (13:00 +0200)
wicked/lib/Page.php

index be925d0..cc8c421 100644 (file)
@@ -413,13 +413,9 @@ class Wicked_Page {
 
         global $wicked, $conf;
 
-        $view_url = Horde_Util::addParameter(Wicked::url('%s', false, -1), 'referrer', $this->pageName(), false);
-        /* Attach the session parameter manually, because we don't want the
-         * parameters to be encoded, but don't want full URLs either. */
-        if (empty($GLOBALS['conf']['session']['use_only_cookies']) &&
-            !isset($_COOKIE[session_name()])) {
-            $view_url = Horde_Util::addParameter($view_url, session_name(), session_id(), false);
-        }
+        $view_url = Wicked::url('%s')
+            ->setRaw(true)
+            ->add('referrer', $this->pageName());
         $view_url = str_replace(array(urlencode('%s'), urlencode('/')), array('%s', '%' . urlencode('/')), $view_url);
 
         /* Make sure we have a valid wiki format */