]> git.donarmstrong.com Git - roundcube.git/blobdiff - program/steps/addressbook/export.inc
Imported Upstream version 0.7.2
[roundcube.git] / program / steps / addressbook / export.inc
index a710aa20437478b7dd40e860c9e1a4e39cdc3ffa..988dabf51def3fd3e2d677b178219946da5783dc 100644 (file)
@@ -24,6 +24,7 @@
 // Use search result
 if (!empty($_REQUEST['_search']) && isset($_SESSION['search'][$_REQUEST['_search']]))
 {
+    $sort_col = $RCMAIL->config->get('addressbook_sort_col', 'name');
     $search  = (array)$_SESSION['search'][$_REQUEST['_search']];
     $records = array();
 
@@ -41,7 +42,7 @@ if (!empty($_REQUEST['_search']) && isset($_SESSION['search'][$_REQUEST['_search
 
         while ($row = $result->next()) {
             $row['sourceid'] = $s;
-            $key = $row['name'] . ':' . $row['sourceid'];
+            $key = rcmail_contact_key($row, $sort_col);
             $records[$key] = $row;
         }
         unset($result);
@@ -66,7 +67,6 @@ else {
 }
 
 // send downlaod headers
-send_nocacheing_headers();
 header('Content-Type: text/x-vcard; charset='.RCMAIL_CHARSET);
 header('Content-Disposition: attachment; filename="rcube_contacts.vcf"');