UtilityPage/Random

* fix invalid type error
 * simplyfy query building (there are no longer tables with an index named `entry`)
This commit is contained in:
Sarjuuk
2024-08-27 14:50:55 +02:00
parent 3aede18926
commit 03cf3a5918
5 changed files with 9 additions and 10 deletions

View File

@@ -72,7 +72,7 @@ class UtilityPage extends GenericPage
{
case 'random':
$type = array_rand(Type::getClassesFor(Type::FLAG_RANDOM_SEARCHABLE));
$typeId = (Type::newList($type, null))?->getRandomId();
$typeId = (Type::newList($type))?->getRandomId();
header('Location: ?'.Type::getFileString($type).'='.$typeId, true, 302);
die();