prepared and gallery fixes
This commit is contained in:
@@ -17,6 +17,19 @@ class GalleryController extends Controller
|
||||
abort(404);
|
||||
}
|
||||
|
||||
// canonicalize username in URL when possible
|
||||
try {
|
||||
$correctName = $user->name ?? $user->uname ?? null;
|
||||
if ($username && $correctName && $username !== $correctName) {
|
||||
$qs = $request->getQueryString();
|
||||
$url = route('legacy.gallery', ['id' => $user->id, 'username' => $correctName]);
|
||||
if ($qs) $url .= '?' . $qs;
|
||||
return redirect($url, 301);
|
||||
}
|
||||
} catch (\Throwable $e) {
|
||||
// ignore
|
||||
}
|
||||
|
||||
$page = max(1, (int) $request->query('page', 1));
|
||||
$hits = 20;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user