diff options
Diffstat (limited to 'program/include/main.inc')
-rw-r--r-- | program/include/main.inc | 30 |
1 files changed, 9 insertions, 21 deletions
diff --git a/program/include/main.inc b/program/include/main.inc index 71534f6b1..6aa8b91a1 100644 --- a/program/include/main.inc +++ b/program/include/main.inc @@ -753,8 +753,15 @@ function rcmail_overwrite_action($action) } -// compose a URL to the given action -function rcmail_self_url($action, $p=array(), $task=null) +/** + * Compose an URL for a specific action + * + * @param string Request action + * @param array More URL parameters + * @param string Request task (omit if the same) + * @return The application URL + */ +function rcmail_url($action, $p=array(), $task=null) { global $MAIN_TASKS, $COMM_PATH; $qstring = ''; @@ -1123,25 +1130,6 @@ function strip_newlines($str) } -/** - * Compose an URL for a specific action - * - * @param string Request action - * @param array More URL parameters - * @return The application URL - */ -function rcmail_url($action, $param=NULL) -{ - $url = $GLOBALS['COMM_PATH'] . '&'.$action; - - if (is_array($param)) - foreach ($param as $p => $val) - $url .= sprintf('&%s=%s', urlencode($p), urlencode($val)); - - return $url; -} - - // return boolean if a specific template exists function template_exists($name) { |