From 1d94d98668f03ec0cda1e7f5772f1defdec9308f Mon Sep 17 00:00:00 2001 From: Thomas Tanghus Date: Wed, 5 Sep 2012 16:44:26 +0200 Subject: [PATCH] Addressbook selection dialig didn't show names or descriptions. --- ajax/selectaddressbook.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/ajax/selectaddressbook.php b/ajax/selectaddressbook.php index e5527c8e..04c871bd 100644 --- a/ajax/selectaddressbook.php +++ b/ajax/selectaddressbook.php @@ -11,12 +11,8 @@ OCP\JSON::checkAppEnabled('contacts'); $books = OC_Contacts_Addressbook::all(OCP\USER::getUser()); if(count($books) > 1) { - $addressbooks = array(); - foreach($books as $book) { - $addressbooks[] = array('id' => $book['id'], 'name' => $book['displayname']); - } $tmpl = new OCP\Template("contacts", "part.selectaddressbook"); - $tmpl->assign('addressbooks', $addressbooks); + $tmpl->assign('addressbooks', $books); $page = $tmpl->fetchPage(); OCP\JSON::success(array('data' => array( 'type' => 'dialog', 'page' => $page ))); } else {