X-Git-Url: http://git.iain.cx/?a=blobdiff_plain;f=lib%2Fcontact.php;h=fdbd169aa3873e4f926a74e1628f9aa6eca69315;hb=009c426bb2c9a34e5e7d7527242536da3bea7aaa;hp=a2e94151cbe22a8aa397c2ad4cfe29fb47dc957a;hpb=bacdf10614c315868adfc94c597208d8c8256181;p=readifood.git diff --git a/lib/contact.php b/lib/contact.php index a2e9415..fdbd169 100644 --- a/lib/contact.php +++ b/lib/contact.php @@ -1,10 +1,12 @@ Added contact.

\n"; @@ -32,12 +34,14 @@ exit; } else if ($_POST['show_in_area']) { + set_last_selected("area_id", $_POST['area_id']); $q = new AreaQuery; $area = $q->findOneById($_POST['area_id']); header(sprintf("Location: http%s://%s/%s/in/area/%s/%d", ($_SERVER['HTTPS']) ? "s" : "", $_SERVER['HTTP_HOST'], $module, urlencode($area->getName()), $_POST['area_id'])); exit; } else if ($_POST['show_in_city']) { + set_last_selected("city_id", $_POST['city_id']); $q = new CityQuery; $city = $q->findOneById($_POST['city_id']); header(sprintf("Location: http%s://%s/%s/in/city/%s/%d", ($_SERVER['HTTPS']) ? "s" : "", $_SERVER['HTTP_HOST'], $module, urlencode($city->getName()), $_POST['city_id'])); @@ -503,6 +507,7 @@ $contact = new Contact; if (! update_contact($contact, $area_id, true)) return false; + $name = $contact->getDisplayname(); return $contact->getId(); }