From 1e09be8a95779119a65c81045a65f62c6bff6c3b Mon Sep 17 00:00:00 2001 From: Aleksander Machniak <alec@alec.pl> Date: Fri, 25 Jul 2014 03:23:58 -0400 Subject: [PATCH] Skip redundant prepare_for_export() calls --- program/steps/addressbook/export.inc | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/program/steps/addressbook/export.inc b/program/steps/addressbook/export.inc index 2b45e5c..a6d3af9 100644 --- a/program/steps/addressbook/export.inc +++ b/program/steps/addressbook/export.inc @@ -103,7 +103,9 @@ 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']); -- Gitblit v1.9.1