summaryrefslogtreecommitdiff
path: root/program/include/rcmail.php
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2008-06-20 11:40:05 +0000
committerthomascube <thomas@roundcube.net>2008-06-20 11:40:05 +0000
commitfde466c58c004e8f7eff7b59c78f62eef250cde9 (patch)
treed46360c24b111482b27f0a14a4ab821e3cfd4d7a /program/include/rcmail.php
parent2da368e6633ae4dec5d9b02ec3f4b693ffc9fb76 (diff)
Urlencode mail recipients for storing in session + little code cleanup
Diffstat (limited to 'program/include/rcmail.php')
-rw-r--r--program/include/rcmail.php13
1 files changed, 8 insertions, 5 deletions
diff --git a/program/include/rcmail.php b/program/include/rcmail.php
index 7c12ef779..c2ad9cf87 100644
--- a/program/include/rcmail.php
+++ b/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;
}