diff options
author | Aleksander Machniak <alec@alec.pl> | 2014-07-25 09:23:58 +0200 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2014-07-25 09:23:58 +0200 |
commit | 1e09be8a95779119a65c81045a65f62c6bff6c3b (patch) | |
tree | 20f9bc48f5405cecb5a4a18c2546205374957550 | |
parent | 2d52080ee1f515de67e0b44b12b833d5fc3747ad (diff) |
Skip redundant prepare_for_export() calls
-rw-r--r-- | 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 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']); |