summaryrefslogtreecommitdiff
path: root/roundcubemail/program/include/rcmail.php
diff options
context:
space:
mode:
authorthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-06-20 11:40:05 +0000
committerthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-06-20 11:40:05 +0000
commit960fb3ea401e7b96b3a09eca01a6482322186e04 (patch)
treeed46732f537f2b6093bb2cac85b67da0cd3ebd81 /roundcubemail/program/include/rcmail.php
parentf3285c42c642dcb0090f836cd1eff9b3543501f9 (diff)
Urlencode mail recipients for storing in session + little code cleanup
git-svn-id: https://svn.roundcube.net/trunk@1564 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include/rcmail.php')
-rw-r--r--roundcubemail/program/include/rcmail.php13
1 files changed, 8 insertions, 5 deletions
diff --git a/roundcubemail/program/include/rcmail.php b/roundcubemail/program/include/rcmail.php
index 7c12ef779..c2ad9cf87 100644
--- a/roundcubemail/program/include/rcmail.php
+++ b/roundcubemail/program/include/rcmail.php
@@ -830,13 +830,16 @@ class rcmail
public function url($p)
{
if (!is_array($p))
- $p = array('action' => @func_get_arg(0));
-
- $url = $p['task'] ? './?_task=' . $p['task'] : $this->comm_path;
- unset($p['task']);
+ $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)
- $url .= sprintf('&%s=%s', urlencode($par), urlencode($val));
+ $url .= '&'.urlencode($par).'='.urlencode($val);
return $url;
}