X-Git-Url: http://git.iain.cx/?a=blobdiff_plain;f=lib%2Farea.php;h=720617eccb920a19888f4cbcf3187e24897d78e7;hb=019bb882834304615564c9f9e1c28ed1d980d8d9;hp=5785ed2947c0e2a7b006c1784af801a5eb94078c;hpb=6fdbfe32798452ec1c0fdbda57edabb892518409;p=readifood.git diff --git a/lib/area.php b/lib/area.php index 5785ed2..720617e 100644 --- a/lib/area.php +++ b/lib/area.php @@ -9,7 +9,7 @@ } else if ($_POST['city_id']) { /* XXX: city_id is actually a string $city_name/$city_id */ - header(sprintf("Location: http%s://%s/%s/in/%s", ($_SERVER['HTTPS']) ? "s" : "", $_SERVER['HTTP_HOST'], $module, $_POST['city_id'])); + header(sprintf("Location: http%s://%s/%s/in/city/%s", ($_SERVER['HTTPS']) ? "s" : "", $_SERVER['HTTP_HOST'], $module, $_POST['city_id'])); exit; } else if ($_POST['update_area']) { @@ -236,9 +236,11 @@ /* /area/in/Cambridge/1 */ if (count($parameters)) { if ($parameters[0] == "in") { - $city_id = $parameters[2]; - show_areas(0, 10, $parameters[1], $city_id); - show_new_area_form($city_id); + if ($parameters[1] == "city") { + $city_id = $parameters[3]; + show_areas(0, 10, $parameters[2], $city_id); + show_new_area_form($city_id); + } } } list($name, $id, $args) = parse_parameters($parameters);