mirror of
https://github.com/owncloudarchive/contacts.git
synced 2024-12-01 13:24:10 +01:00
Fixed showing first contact if non is selected.
This commit is contained in:
parent
c76097f7fe
commit
4e095cb3f0
14
index.php
14
index.php
@ -45,11 +45,17 @@ $id = isset( $_GET['id'] ) ? $_GET['id'] : null;
|
|||||||
$details = array();
|
$details = array();
|
||||||
|
|
||||||
// FIXME: This cannot work..?
|
// FIXME: This cannot work..?
|
||||||
if( !is_null($id)/* || count($contacts)*/){
|
if(is_null($id) && count($contacts) > 0) {
|
||||||
if(is_null($id)) $id = $contacts[0]['id'];
|
$id = $contacts[0]['id'];
|
||||||
$vcard = OC_Contacts_App::getContactVCard($id);
|
|
||||||
$details = OC_Contacts_VCard::structureContact($vcard);
|
|
||||||
}
|
}
|
||||||
|
$vcard = OC_Contacts_App::getContactVCard($id);
|
||||||
|
$details = OC_Contacts_VCard::structureContact($vcard);
|
||||||
|
|
||||||
|
// if( !is_null($id)/* || count($contacts)*/){
|
||||||
|
// if(is_null($id)) $id = $contacts[0]['id'];
|
||||||
|
// $vcard = OC_Contacts_App::getContactVCard($id);
|
||||||
|
// $details = OC_Contacts_VCard::structureContact($vcard);
|
||||||
|
// }
|
||||||
|
|
||||||
// Include Style and Script
|
// Include Style and Script
|
||||||
OC_Util::addScript('contacts','interface');
|
OC_Util::addScript('contacts','interface');
|
||||||
|
Loading…
Reference in New Issue
Block a user