Skip to content

Commit

Permalink
Improves handling of $_REQUEST['start'] in SMF\Actions\Search2
Browse files Browse the repository at this point in the history
Signed-off-by: Jon Stovell <[email protected]>
  • Loading branch information
Sesquipedalian committed Nov 26, 2023
1 parent 75a103b commit fa739ba
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions Sources/Actions/Search2.php
Original file line number Diff line number Diff line change
Expand Up @@ -251,9 +251,7 @@ protected function __construct()
// Number of pages hard maximum - normally not set at all.
Config::$modSettings['search_max_results'] = empty(Config::$modSettings['search_max_results']) ? 200 * Config::$modSettings['search_results_per_page'] : (int) Config::$modSettings['search_max_results'];

if (isset($_REQUEST['start'])) {
$_REQUEST['start'] = (int) $_REQUEST['start'];
}
$_REQUEST['start'] = isset($_REQUEST['start']) ? (int) $_REQUEST['start'] - ((int) $_REQUEST['start'] % Config::$modSettings['search_results_per_page']) : 0;

Lang::load('Search');

Expand Down

0 comments on commit fa739ba

Please sign in to comment.