From: Iain Patterson Date: Thu, 31 Oct 2013 16:21:50 +0000 (-0400) Subject: Fix setting name in add_contact(). X-Git-Tag: 2013-10-31^0 X-Git-Url: http://git.iain.cx/?a=commitdiff_plain;h=cd900901a496c76cb2e0cf0d4efba43540b86002;p=readifood.git Fix setting name in add_contact(). The add_contact() function was supposed to set the name parameter to the display name of the newly-created contact. We now ensure that that happens. A side-effect of the bug was that we weren't showing the details of new contacts, as was intended. --- diff --git a/lib/contact.php b/lib/contact.php index a2e9415..f376406 100644 --- a/lib/contact.php +++ b/lib/contact.php @@ -503,6 +503,7 @@ $contact = new Contact; if (! update_contact($contact, $area_id, true)) return false; + $name = $contact->getDisplayname(); return $contact->getId(); }