Commit 99c90c56 authored by Kevin Abel's avatar Kevin Abel
Browse files

Use a redirect when a building alias is used in a request.

parent 20ae6a81
......@@ -20,6 +20,12 @@ class UNL_TourMap_Marker_Building extends UNL_TourMap_Marker
}
$data = current($data);
// redirect if the loaded building data is from an alias
if ($options['code'] !== $data['code']) {
header('Location: ' . str_replace('/' . $options['code'], '/' . $data['code'], $_SERVER['REQUEST_URI']));
exit;
}
} else {
$data = $options;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment