From 1e09be8a95779119a65c81045a65f62c6bff6c3b Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Fri, 25 Jul 2014 09:23:58 +0200 Subject: Skip redundant prepare_for_export() calls --- program/steps/addressbook/export.inc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/program/steps/addressbook/export.inc b/program/steps/addressbook/export.inc index 2b45e5cd1..a6d3af978 100644 --- a/program/steps/addressbook/export.inc +++ b/program/steps/addressbook/export.inc @@ -103,7 +103,9 @@ header('Content-Type: text/x-vcard; charset='.RCUBE_CHARSET); header('Content-Disposition: attachment; filename="contacts.vcf"'); while ($result && ($row = $result->next())) { - prepare_for_export($row, $CONTACTS); + if ($CONTACTS) { + prepare_for_export($row, $CONTACTS); + } // fix folding and end-of-line chars $row['vcard'] = preg_replace('/\r|\n\s+/', '', $row['vcard']); -- cgit v1.2.3