MFB:
authorJan Schneider <jan@horde.org>
Sun, 14 Feb 2010 18:35:45 +0000 (19:35 +0100)
committerJan Schneider <jan@horde.org>
Sun, 14 Feb 2010 22:24:06 +0000 (23:24 +0100)
  Take care of appending session parameter ourselves, because the parameter must
  not be encoded, but we still don't want the full url.

wicked/lib/Page.php

index 79e0bd3..d1850c2 100644 (file)
@@ -413,7 +413,13 @@ class Page {
 
         global $wicked, $conf;
 
-        $view_url = Horde_Util::addParameter(Wicked::url('%s'), 'referrer', $this->pageName(), false);
+        $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 = str_replace(array(urlencode('%s'), urlencode('/')), array('%s', '%' . urlencode('/')), $view_url);
 
         /* Make sure we have a valid wiki format */