summaryrefslogtreecommitdiff
path: root/program/include/main.inc
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/main.inc
parent2da368e6633ae4dec5d9b02ec3f4b693ffc9fb76 (diff)
Urlencode mail recipients for storing in session + little code cleanup
Diffstat (limited to 'program/include/main.inc')
-rw-r--r--program/include/main.inc13
1 files changed, 1 insertions, 12 deletions
diff --git a/program/include/main.inc b/program/include/main.inc
index a29978a5e..d84ca896a 100644
--- a/program/include/main.inc
+++ b/program/include/main.inc
@@ -128,18 +128,7 @@ function rcmail_overwrite_action($action)
function rcmail_url($action, $p=array(), $task=null)
{
$app = rcmail::get_instance();
-
- $qstring = '';
- $base = $app->comm_path;
-
- if ($task && in_array($task, rcmail::$main_tasks))
- $base = ereg_replace('_task=[a-z]+', '_task='.$task, $app->comm_path);
-
- if (is_array($p))
- foreach ($p as $key => $val)
- $qstring .= '&'.urlencode($key).'='.urlencode($val);
-
- return $base . ($action ? '&_action='.$action : '') . $qstring;
+ return $app->url((array)$p + array('_action' => $action, 'task' => $task));
}