X-Git-Url: http://git.iain.cx/?a=blobdiff_plain;f=lib%2Fcontact.php;h=fdbd169aa3873e4f926a74e1628f9aa6eca69315;hb=d4756a23630bd3de036e2e4d09b168b56d14b0ae;hp=051f291b3daf017cdb63958909dd542bbf49c15d;hpb=adaa23b9f9bbfb55f5c1cd85d6e84c49b950887d;p=readifood.git diff --git a/lib/contact.php b/lib/contact.php index 051f291..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'])); @@ -335,9 +339,9 @@ echo " "; for ($i = count($parcel_sizes); $i < count($parcel_contents); $i++) { if (1 << $i == $GLOBALS['PARCEL_TOILETRY']) continue; - echo " getParcel() & (1 << $i)) echo " checked"; - echo ">$parcel_contents[$i]\n"; + echo ">\n"; } echo "\n"; echo "\n"; @@ -503,6 +507,7 @@ $contact = new Contact; if (! update_contact($contact, $area_id, true)) return false; + $name = $contact->getDisplayname(); return $contact->getId(); }