From 3ba557f4b8d1d7da4c09e82558d5467d7f870abc Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Mon, 7 Jul 2014 16:47:08 +0000 Subject: [PATCH] Use select_all flag to export all entries, not just visible selected ones. --- addressbook/inc/class.addressbook_ui.inc.php | 2 +- importexport/inc/class.importexport_export_ui.inc.php | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/addressbook/inc/class.addressbook_ui.inc.php b/addressbook/inc/class.addressbook_ui.inc.php index 75d213c672..883b81eb16 100644 --- a/addressbook/inc/class.addressbook_ui.inc.php +++ b/addressbook/inc/class.addressbook_ui.inc.php @@ -644,7 +644,7 @@ class addressbook_ui extends addressbook_bo 'csv' => array( 'caption' => 'Export as CSV', 'allowOnMultiple' => true, - 'url' => 'menuaction=importexport.importexport_export_ui.export_dialog&appname=addressbook&plugin=addressbook_export_contacts_csv&selection=$id', + 'url' => 'menuaction=importexport.importexport_export_ui.export_dialog&appname=addressbook&plugin=addressbook_export_contacts_csv&selection=$id&select_all=$select_all', 'popup' => '850x440' ), 'vcard' => array( diff --git a/importexport/inc/class.importexport_export_ui.inc.php b/importexport/inc/class.importexport_export_ui.inc.php index aea17bacd0..0713647de3 100644 --- a/importexport/inc/class.importexport_export_ui.inc.php +++ b/importexport/inc/class.importexport_export_ui.inc.php @@ -52,6 +52,8 @@ class importexport_export_ui { $_appname = $_content['appname'] ? $_content['appname'] : $_GET['appname']; $_definition = $_content['definition'] ? $_content['definition'] : $_GET['definition']; $_plugin = $_content['plugin'] ? $_content['plugin'] : $_GET['plugin']; + // Select all from context menu, means use all search results, not just selected + if($_GET['select_all']) $_GET['selection'] = 'search'; $_selection = $_content['selection'] ? $_content['selection'] : $_GET['selection']; if($_GET['selection'] || $_content['selection_passed']) $content['selection_passed'] = $preserv['selection_passed'] = true;