Filter out flagged entries in the original query

This commit is contained in:
Roscoe 2025-08-31 03:35:45 +01:00
commit fd82adc73e
Signed by: RoscoeDaWah
SSH key fingerprint: SHA256:Hqn452XQ1ETzUt/FthJu6+OFkS4NBxCv5VQSEvuk7CE
3 changed files with 2 additions and 4 deletions

View file

@ -29,7 +29,7 @@ public static function insertGuestbookEntry(Request $request) {
}
public static function selectEntries() {
$entries = GuestbookEntry::orderBy('created_at', 'desc')->get();
$entries = GuestbookEntry::where("legacy_flagged", false)->orderBy('created_at', 'desc')->get();
return $entries;
}

View file

@ -5,7 +5,7 @@
return [
'name' => env('APP_NAME', 'wah.moe'),
'version' => '2025.08.30-patch1',
'version' => '2025.08.30-patch2',
'env' => env('APP_ENV', 'production'),
'debug' => (bool) env('APP_DEBUG', false),
'url' => env('APP_URL', 'http://localhost'),

View file

@ -66,8 +66,6 @@
<font size="+2"><b>Entries ({{ count($entries) }} total)</b></font>
<table cellspacing="10" cellpadding="0" border="0">
@foreach ($entries as $entry)
{{-- Skip entries flagged as legacy --}}
@if($entry->legacy_flagged) @php continue @endphp @endif
@php
$user_agent = $parser->parse($entry->agent);
@endphp