X-Git-Url: http://git.iain.cx/?a=blobdiff_plain;f=lib%2Farea.php;fp=lib%2Farea.php;h=77272f76e9ba375d5d076471f17c9c87da834e59;hb=99c95916fa6901a10f864f25f9a05f95d792902e;hp=9b0d5e1181850517fd907a2ff17645b72f33d5e4;hpb=f44ed8d0e1de072ea341c013c967714cd0217fee;p=readifood.git diff --git a/lib/area.php b/lib/area.php index 9b0d5e1..77272f7 100644 --- a/lib/area.php +++ b/lib/area.php @@ -1,6 +1,7 @@ Added area.

\n"; @@ -8,8 +9,10 @@ } } else if ($_POST['city_id']) { - /* XXX: city_id is actually a string $city_name/$city_id */ - header(sprintf("Location: http%s://%s/%s/in/city/%s", ($_SERVER['HTTPS']) ? "s" : "", $_SERVER['HTTP_HOST'], $module, $_POST['city_id'])); + set_last_selected("city_id", $_POST['city_id']); + $city_id = $_POST['city_id']; + $city = get_city_by_id($city_id); + header(sprintf("Location: http%s://%s/%s/in/city/%s/%d", ($_SERVER['HTTPS']) ? "s" : "", $_SERVER['HTTP_HOST'], $module, $city->getName(), $city_id)); exit; } else if ($_POST['update_area']) { @@ -64,7 +67,7 @@ echo "

Show areas in\n"; echo "\n"; echo "\n";