diff options
author | Thomas Tanghus <thomas@tanghus.net> | 2012-01-02 23:14:58 +0100 |
---|---|---|
committer | Thomas Tanghus <thomas@tanghus.net> | 2012-01-09 20:38:05 +0100 |
commit | 47548fb8c612b5a61b00b03b525fd168fe940451 (patch) | |
tree | 8e9dbe154ba601289b32b4e4a9d443894c88b926 | |
parent | 85ab3b3924b0e66f3cb3f4e84222b08dd3d882bc (diff) | |
download | nextcloud-server-47548fb8c612b5a61b00b03b525fd168fe940451.tar.gz nextcloud-server-47548fb8c612b5a61b00b03b525fd168fe940451.zip |
Fixed showing first contact if non is selected.
-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'); |