#12: Corrected the way redirects work on the gallery side due to an issue when trying out on a real system
This commit is contained in:
parent
f901ffa855
commit
d0d96df17d
@ -22,8 +22,9 @@ class AlbumController extends Controller
|
|||||||
$album = DbHelper::getAlbumByPath($albumUrlAlias);
|
$album = DbHelper::getAlbumByPath($albumUrlAlias);
|
||||||
if (is_null($album))
|
if (is_null($album))
|
||||||
{
|
{
|
||||||
// Check redirects
|
// Check redirects (remove the first 'a' at the beginning - e.g. "a/Florida-2015" => "/Florida-2015"
|
||||||
$redirect = AlbumRedirect::where(DB::raw('\'/a\' + source_url'), $request->path())->first();
|
$requestPath = preg_replace('/^a/', '', $request->path());
|
||||||
|
$redirect = AlbumRedirect::where('source_url', $requestPath)->first();
|
||||||
|
|
||||||
if (is_null($redirect))
|
if (is_null($redirect))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user