From 4bc481a41de31772f2d106e24737d4444dc69e5a Mon Sep 17 00:00:00 2001 From: Jan Schneider Date: Sun, 14 Feb 2010 19:35:45 +0100 Subject: [PATCH] MFB: 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 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/wicked/lib/Page.php b/wicked/lib/Page.php index 79e0bd3ca..d1850c2ce 100644 --- a/wicked/lib/Page.php +++ b/wicked/lib/Page.php @@ -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 */ -- 2.11.0