summaryrefslogtreecommitdiff
path: root/program/include
diff options
context:
space:
mode:
Diffstat (limited to 'program/include')
-rw-r--r--program/include/main.inc30
-rw-r--r--program/include/rcmail_template.inc4
2 files changed, 11 insertions, 23 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)
{
diff --git a/program/include/rcmail_template.inc b/program/include/rcmail_template.inc
index 6e3fe52b8..3609bec1b 100644
--- a/program/include/rcmail_template.inc
+++ b/program/include/rcmail_template.inc
@@ -563,9 +563,9 @@ class rcmail_template extends rcube_html_page
// make valid href to specific buttons
if (in_array($attrib['command'], $MAIN_TASKS))
- $attrib['href'] = Q(rcmail_self_url(null, null, $attrib['command']));
+ $attrib['href'] = Q(rcmail_url(null, null, $attrib['command']));
else if (in_array($attrib['command'], $a_static_commands))
- $attrib['href'] = Q(rcmail_self_url($attrib['command']));
+ $attrib['href'] = Q(rcmail_url($attrib['command']));
}
// overwrite attributes