Aleksander Machniak
2012-06-28 669747a81c4b2ff823d1f20dc50899163c0a8a4a
program/steps/addressbook/edit.inc
@@ -17,9 +17,6 @@
 +-----------------------------------------------------------------------+
 | Author: Thomas Bruederli <roundcube@gmail.com>                        |
 +-----------------------------------------------------------------------+
 $Id$
*/
if ($RCMAIL->action == 'edit') {
@@ -36,8 +33,8 @@
        $OUTPUT->set_env('cid', $record['ID']);
    }
    // adding not allowed here
    if ($CONTACTS->readonly) {
    // editing not allowed here
    if ($CONTACTS->readonly || $record['readonly']) {
        $OUTPUT->show_message('sourceisreadonly');
        rcmail_overwrite_action('show');
        return;
@@ -265,12 +262,27 @@
}
/**
 * Register container as active area to drop photos onto
 */
function rcmail_photo_drop_area($attrib)
{
    global $OUTPUT;
    if ($attrib['id']) {
        $OUTPUT->add_gui_object('filedrop', $attrib['id']);
        $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'))