summaryrefslogtreecommitdiff
path: root/program/steps/addressbook/edit.inc
diff options
context:
space:
mode:
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');