summaryrefslogtreecommitdiff
path: root/program/steps/addressbook/edit.inc
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2013-12-31 13:58:29 +0100
committerAleksander Machniak <alec@alec.pl>2013-12-31 13:58:29 +0100
commitf5d2eef55c89b7f1a5549704705c25fd7f0c0185 (patch)
treecadb85945d32237ea37d50ad0b8d400d6b19d2e2 /program/steps/addressbook/edit.inc
parentddc161721cdec783d58b43a265854b4eac388c13 (diff)
More CS fixes, replace global $CONFIG usage with $RCMAIL->config->get()
Diffstat (limited to 'program/steps/addressbook/edit.inc')
-rw-r--r--program/steps/addressbook/edit.inc35
1 files changed, 19 insertions, 16 deletions
diff --git a/program/steps/addressbook/edit.inc b/program/steps/addressbook/edit.inc
index f7f0c7100..3bbbfccdf 100644
--- a/program/steps/addressbook/edit.inc
+++ b/program/steps/addressbook/edit.inc
@@ -59,6 +59,25 @@ else {
$SOURCE_ID = $source;
rcmail_set_sourcename($CONTACTS);
+
+$OUTPUT->add_handlers(array(
+ 'contactedithead' => 'rcmail_contact_edithead',
+ 'contacteditform' => 'rcmail_contact_editform',
+ 'contactphoto' => 'rcmail_contact_photo',
+ 'photouploadform' => 'rcmail_upload_photo_form',
+ 'sourceselector' => 'rcmail_source_selector',
+ 'filedroparea' => 'rcmail_photo_drop_area',
+));
+
+if ($RCMAIL->action == 'add' && $OUTPUT->template_exists('contactadd')) {
+ $OUTPUT->send('contactadd');
+}
+
+// this will be executed if no template for addcontact exists
+$OUTPUT->send('contactedit');
+
+
+
function rcmail_get_edit_record()
{
global $RCMAIL, $CONTACTS;
@@ -289,19 +308,3 @@ function rcmail_photo_drop_area($attrib)
$OUTPUT->set_env('filedrop', array('action' => 'upload-photo', 'fieldname' => '_photo', 'single' => 1, 'filter' => '^image/.+'));
}
}
-
-
-$OUTPUT->add_handlers(array(
- 'contactedithead' => 'rcmail_contact_edithead',
- 'contacteditform' => 'rcmail_contact_editform',
- 'contactphoto' => 'rcmail_contact_photo',
- 'photouploadform' => 'rcmail_upload_photo_form',
- 'sourceselector' => 'rcmail_source_selector',
- 'filedroparea' => 'rcmail_photo_drop_area',
-));
-
-if ($RCMAIL->action == 'add' && $OUTPUT->template_exists('contactadd'))
- $OUTPUT->send('contactadd');
-
-// this will be executed if no template for addcontact exists
-$OUTPUT->send('contactedit');