]> 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 8ba1c08b617a9b1a6b7413d7060d31fc1199b6fd..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);