summaryrefslogtreecommitdiff
path: root/program/steps/mail/compose.inc
diff options
context:
space:
mode:
authorThomas Bruederli <thomas@roundcube.net>2013-08-29 17:29:18 +0200
committerThomas Bruederli <thomas@roundcube.net>2013-09-04 09:32:01 +0200
commit0ce2126ac91f634b0bc5bf7f3567acd2f87f9972 (patch)
tree96a3b836868b034939442237667349c4613d51e2 /program/steps/mail/compose.inc
parent2d6242ffb25b199b569d956b65dec36170026d1e (diff)
New settings section to manage canned responses
Diffstat (limited to 'program/steps/mail/compose.inc')
-rw-r--r--program/steps/mail/compose.inc15
1 files changed, 4 insertions, 11 deletions
diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc
index efc0cc8e0..282a2fd3e 100644
--- a/program/steps/mail/compose.inc
+++ b/program/steps/mail/compose.inc
@@ -1707,23 +1707,16 @@ function rcmail_compose_responses_list($attrib)
$attrib += array('id' => 'rcmresponseslist', 'tagname' => 'ul', 'cols' => 1);
$jsenv = array();
- $items = array();
- foreach ($RCMAIL->config->get('compose_responses', array()) as $response) {
- $key = $response['key'] ? $response['key'] : substr(md5($response['name']), 0, 16);
- $items[strtolower($response['name'])] = html::a(array(
+ $list = new html_table($attrib);
+ foreach ($RCMAIL->get_compose_responses(true) as $response) {
+ $key = $response['key'];
+ $item = html::a(array(
'href '=> '#'.urlencode($response['name']),
'class' => rtrim('insertresponse ' . $attrib['itemclass']),
'rel' => $key,
), Q($response['name']));
$jsenv[$key] = $response;
- }
-
- // sort list by name
- ksort($items, SORT_LOCALE_STRING);
-
- $list = new html_table($attrib);
- foreach ($items as $item) {
$list->add(array(), $item);
}