From 8d047c668f27262463427ad522912567379dbfa3 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak <alec@alec.pl> Date: Tue, 02 Feb 2016 05:42:32 -0500 Subject: [PATCH] Plugin API: Added addressbook_export hook --- CHANGELOG | 1 + program/steps/addressbook/export.inc | 8 ++++++++ 2 files changed, 9 insertions(+), 0 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 858f17d..3ed3443 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -9,6 +9,7 @@ - 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 in long recipients list parsing for cases where recipient name contained @-char (#1490653) +- Plugin API: Added addressbook_export hook RELEASE 1.1.4 ------------- diff --git a/program/steps/addressbook/export.inc b/program/steps/addressbook/export.inc index 9fbdb96..e2b6d88 100644 --- a/program/steps/addressbook/export.inc +++ b/program/steps/addressbook/export.inc @@ -98,6 +98,14 @@ $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 header('Content-Type: text/x-vcard; charset='.RCUBE_CHARSET); header('Content-Disposition: attachment; filename="contacts.vcf"'); -- Gitblit v1.9.1