Skip to content

Commit

Permalink
Merge pull request #7892 from Oldiesmann/fixmodcenter
Browse files Browse the repository at this point in the history
Fix error with mod center
  • Loading branch information
Sesquipedalian authored Nov 25, 2023
2 parents 92439b6 + d64843c commit be40b43
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Sources/Actions/Moderation/Home.php
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,7 @@ protected function notes(): void

// Grab the current notes. We can only use the cache for the first page of notes.
$offset = isset($_GET['notes']) && isset($_GET['start']) ? $_GET['start'] : 0;
$start = (int) ($_GET['start'] ?? 0);

if ($offset != 0 || ($moderator_notes = CacheApi::get('moderator_notes', 240)) === null) {
$moderator_notes = [];
Expand Down Expand Up @@ -334,8 +335,8 @@ protected function notes(): void
}

// Lets construct a page index.
Utils::$context['page_index'] = new PageIndex(Config::$scripturl . '?action=moderate;area=index;notes', $_GET['start'], $moderator_notes_total, 10);
Utils::$context['start'] = $_GET['start'];
Utils::$context['page_index'] = new PageIndex(Config::$scripturl . '?action=moderate;area=index;notes', $start, $moderator_notes_total, 10);
Utils::$context['start'] = $start;

Utils::$context['notes'] = [];

Expand Down

0 comments on commit be40b43

Please sign in to comment.