summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-09-12 14:01:52 +0000
committerthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-09-12 14:01:52 +0000
commit585fb7a3b07597d59b627a468b32626c4e3cf72a (patch)
tree02e352c51ebdcfee217d9122344d3828a9077c5c
parente88e5740626836ff633a07868a4a0a23e64df54b (diff)
Fix rcmail::url(), don't use comm_path
git-svn-id: https://svn.roundcube.net/trunk@1771 208e9e7b-5314-0410-a742-e7e81cd9613c
-rw-r--r--roundcubemail/program/include/rcmail.php24
1 files changed, 13 insertions, 11 deletions
diff --git a/roundcubemail/program/include/rcmail.php b/roundcubemail/program/include/rcmail.php
index c10f83559..e7a0db826 100644
--- a/roundcubemail/program/include/rcmail.php
+++ b/roundcubemail/program/include/rcmail.php
@@ -891,17 +891,19 @@ class rcmail
{
if (!is_array($p))
$p = array('_action' => @func_get_arg(0));
-
- if ($p['task'] && in_array($p['task'], rcmail::$main_tasks))
- $url = './?_task='.$p['task'];
- else
- $url = $this->comm_path;
-
- unset($p['task']);
- foreach ($p as $par => $val)
- if (isset($val))
- $url .= '&'.urlencode($par).'='.urlencode($val);
-
+
+ if (!$p['task'] || !in_array($p['task'], rcmail::$main_tasks))
+ $p['task'] = $this->task;
+
+ $url = './';
+ $delm = '?';
+ foreach (array_reverse($p) as $par => $val)
+ {
+ if (!empty($val)) {
+ $url .= $delm.urlencode($par).'='.urlencode($val);
+ $delm = '&';
+ }
+ }
return $url;
}
}