prepared and gallery fixes

This commit is contained in:
2026-02-19 08:36:32 +01:00
parent 8935065af1
commit c30fa5a392
36 changed files with 1437 additions and 104 deletions

View File

@@ -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;