1
0
mirror of https://github.com/owncloudarchive/contacts.git synced 2024-12-01 13:24:10 +01:00

Addressbook selection dialig didn't show names or descriptions.

This commit is contained in:
Thomas Tanghus 2012-09-05 16:44:26 +02:00
parent 17d9ef3b01
commit 1d94d98668

View File

@ -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 {