Skip to content

Commit

Permalink
[core] allow manually specifying larger random seeds
Browse files Browse the repository at this point in the history
  • Loading branch information
socram8888 committed Dec 30, 2024
1 parent 590474f commit 250e570
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ext/index/main.php
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ public function onSearchTermParse(SearchTermParseEvent $event): void
$default_order_for_column = \Safe\preg_match("/^(id|filename)$/", $matches[1]) ? "ASC" : "DESC";
$sort = isset($matches[2]) ? strtoupper($matches[2]) : $default_order_for_column;
$event->order = "images.$ord $sort";
} elseif ($matches = $event->matches("/^order[=|:]random[_]([0-9]{1,4})$/i")) {
} elseif ($matches = $event->matches("/^order[=|:]random[_]([0-9]{1,8})$/i")) {
// requires a seed to avoid duplicates
// since the tag can't be changed during the parseevent, we instead generate the seed during submit using js
$seed = (int)$matches[1];
Expand Down

0 comments on commit 250e570

Please sign in to comment.