Plugin API: Added addressbook_export hook

pull/322/head
Aleksander Machniak 9 years ago
parent 8dc756f319
commit 332ffef199

@ -19,6 +19,7 @@ CHANGELOG Roundcube Webmail
- Fix (again) security issue in DBMail driver of password plugin [CVE-2015-2181] (#1490643) - Fix (again) security issue in DBMail driver of password plugin [CVE-2015-2181] (#1490643)
- Fix bug where Archive/Junk buttons were not active after page jump with select=all mode (#1490647) - Fix bug where Archive/Junk buttons were not active after page jump with select=all mode (#1490647)
- Fix bug in long recipients list parsing for cases where recipient name contained @-char (#1490653) - Fix bug in long recipients list parsing for cases where recipient name contained @-char (#1490653)
- Plugin API: Added addressbook_export hook
RELEASE 1.2-beta RELEASE 1.2-beta
---------------- ----------------

@ -98,6 +98,14 @@ else {
$result = $CONTACTS->list_records(null, 0, true); $result = $CONTACTS->list_records(null, 0, true);
} }
// Give plugins a possibility to implement other output formats or modify the result
$plugin = $RCMAIL->plugins->exec_hook('addressbook_export', array('result' => $result));
$result = $plugin['result'];
if ($plugin['abort']) {
exit;
}
// send downlaod headers // send downlaod headers
header('Content-Type: text/x-vcard; charset='.RCUBE_CHARSET); header('Content-Type: text/x-vcard; charset='.RCUBE_CHARSET);
header('Content-Disposition: attachment; filename="contacts.vcf"'); header('Content-Disposition: attachment; filename="contacts.vcf"');

Loading…
Cancel
Save