From 822f4f108374e953b6e3f8e5402f364c3bc68bb7 Mon Sep 17 00:00:00 2001 From: Jan ten Bokkel Date: Fri, 29 Aug 2014 17:52:51 +0200 Subject: [PATCH] Fix export of contacts --- js/app.js | 3 ++- lib/controller/exportcontroller.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/js/app.js b/js/app.js index 003af3c5..1b14e3bf 100644 --- a/js/app.js +++ b/js/app.js @@ -1175,7 +1175,8 @@ OC.notify = function(params) { } targets[contact.backend][contact.addressBookId].push(contact.contactId); }); - var url = OC.generateUrl('apps/contacts/exportSelected', {t:targets}); + targets = JSON.stringify(targets); + var url = OC.generateUrl('apps/contacts/exportSelected?t={t}', {t:targets}); //console.log('export url', url); document.location.href = url; }; diff --git a/lib/controller/exportcontroller.php b/lib/controller/exportcontroller.php index 926f67cc..5e45cca4 100644 --- a/lib/controller/exportcontroller.php +++ b/lib/controller/exportcontroller.php @@ -79,7 +79,7 @@ class ExportController extends Controller { * @NoCSRFRequired */ public function exportSelected() { - $targets = $this->request['t']; + $targets = json_decode($this->request['t']); $exports = ''; foreach($targets as $backend => $addressBooks) {