diff options
-rw-r--r-- | apps/contacts/index.php | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/apps/contacts/index.php b/apps/contacts/index.php index b392b195a9c..b7c88236a80 100644 --- a/apps/contacts/index.php +++ b/apps/contacts/index.php @@ -45,11 +45,17 @@ $id = isset( $_GET['id'] ) ? $_GET['id'] : null; $details = array(); // FIXME: This cannot work..? -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); +if(is_null($id) && count($contacts) > 0) { + $id = $contacts[0]['id']; } +$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 OC_Util::addScript('contacts','interface'); |