Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Ryan Dee
UNL_TourMap
Commits
99c90c56
Commit
99c90c56
authored
Jun 19, 2014
by
Kevin Abel
Browse files
Use a redirect when a building alias is used in a request.
parent
20ae6a81
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/UNL/TourMap/Marker/Building.php
View file @
99c90c56
...
...
@@ -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
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment