diff options
author | Aleksander Machniak <alec@alec.pl> | 2013-07-01 10:22:14 +0200 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2013-07-01 10:22:14 +0200 |
commit | a45f9b7bf58475ccc812e819f159638403c00419 (patch) | |
tree | 2853fa82a74bf3cf61eb9212b2b012c1c4bd763a /program/steps/addressbook/delete.inc | |
parent | 049ba0aed21590dbbc3286d68b45a7f46d28b142 (diff) |
Contacts drag-n-drop default action is to move contacts (#1488751)
Added possibility to choose to move or copy contacts from drag-n-drop menu (#1488751)
Use consistent naming: 'moveto' -> 'move'
Diffstat (limited to 'program/steps/addressbook/delete.inc')
-rw-r--r-- | program/steps/addressbook/delete.inc | 38 |
1 files changed, 2 insertions, 36 deletions
diff --git a/program/steps/addressbook/delete.inc b/program/steps/addressbook/delete.inc index 56118583c..3bb2ef500 100644 --- a/program/steps/addressbook/delete.inc +++ b/program/steps/addressbook/delete.inc @@ -68,48 +68,14 @@ foreach ($cids as $source => $cid) $page = isset($_SESSION['page']) ? $_SESSION['page'] : 1; // update saved search after data changed -if (($search_request = $_REQUEST['_search']) && isset($_SESSION['search'][$search_request])) { - $sort_col = $RCMAIL->config->get('addressbook_sort_col', 'name'); - $afields = $RCMAIL->config->get('contactlist_fields'); - $search = (array)$_SESSION['search'][$search_request]; - $records = array(); - - // Get records from all sources (refresh search) - foreach ($search as $s => $set) { - $source = $RCMAIL->get_address_book($s); - - // reset page - $source->set_page(1); - $source->set_pagesize(9999); - $source->set_search_set($set); - - // get records - $result = $source->list_records($afields); - - if (!$result->count) { - unset($search[$s]); - continue; - } - - while ($row = $result->next()) { - $row['sourceid'] = $s; - $key = rcube_addressbook::compose_contact_key($row, $sort_col); - $records[$key] = $row; - } - unset($result); - - $search[$s] = $source->get_search_set(); - } - - $_SESSION['search'][$search_request] = $search; - +if (($records = rcmail_search_update(true)) !== false) { // create resultset object $count = count($records); $first = ($page-1) * $PAGE_SIZE; $result = new rcube_result_set($count, $first); + $pages = ceil((count($records) + $delcnt) / $PAGE_SIZE); // get records from the next page to add to the list - $pages = ceil((count($records) + $delcnt) / $PAGE_SIZE); if ($_GET['_from'] != 'show' && $pages > 1 && $page < $pages) { // sort the records ksort($records, SORT_LOCALE_STRING); |