summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2014-07-25 09:23:58 +0200
committerAleksander Machniak <alec@alec.pl>2014-07-25 09:23:58 +0200
commit1e09be8a95779119a65c81045a65f62c6bff6c3b (patch)
tree20f9bc48f5405cecb5a4a18c2546205374957550
parent2d52080ee1f515de67e0b44b12b833d5fc3747ad (diff)
Skip redundant prepare_for_export() calls
-rw-r--r--program/steps/addressbook/export.inc4
1 files changed, 3 insertions, 1 deletions
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']);