diff options
| author | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-06-20 11:40:05 +0000 |
|---|---|---|
| committer | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-06-20 11:40:05 +0000 |
| commit | 960fb3ea401e7b96b3a09eca01a6482322186e04 (patch) | |
| tree | ed46732f537f2b6093bb2cac85b67da0cd3ebd81 /roundcubemail/program/include/main.inc | |
| parent | f3285c42c642dcb0090f836cd1eff9b3543501f9 (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/main.inc')
| -rw-r--r-- | roundcubemail/program/include/main.inc | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/roundcubemail/program/include/main.inc b/roundcubemail/program/include/main.inc index a29978a5e..d84ca896a 100644 --- a/roundcubemail/program/include/main.inc +++ b/roundcubemail/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)); } |
