summaryrefslogtreecommitdiff
path: root/program/steps/addressbook
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2011-06-03 22:37:47 +0000
committerthomascube <thomas@roundcube.net>2011-06-03 22:37:47 +0000
commitb0c70b3ca7127b9028e666f15e24261414d3caa0 (patch)
treea4e9574d275bede35590c145a71aa058109cb678 /program/steps/addressbook
parent62e2254e3f2171932cf6a60c0a616dc17af599af (diff)
Use address_template config when adding a new address block (#1487944)
Diffstat (limited to 'program/steps/addressbook')
-rw-r--r--program/steps/addressbook/edit.inc4
1 files changed, 4 insertions, 0 deletions
diff --git a/program/steps/addressbook/edit.inc b/program/steps/addressbook/edit.inc
index cf6beba68..96c48704a 100644
--- a/program/steps/addressbook/edit.inc
+++ b/program/steps/addressbook/edit.inc
@@ -90,6 +90,10 @@ function rcmail_contact_editform($attrib)
// add some labels to client
$RCMAIL->output->add_label('noemailwarning', 'nonamewarning');
+
+ // copy (parsed) address template to client
+ if (preg_match_all('/\{([a-z0-9]+)\}([^{]*)/i', $RCMAIL->config->get('address_template', ''), $templ, PREG_SET_ORDER))
+ $RCMAIL->output->set_env('address_template', $templ);
$i_size = !empty($attrib['size']) ? $attrib['size'] : 40;
$t_rows = !empty($attrib['textarearows']) ? $attrib['textarearows'] : 10;