Fix sorting by priority

This commit is contained in:
Beu 2022-04-13 10:46:42 +02:00
parent 68fab26667
commit d42a8a55a9

View File

@ -609,9 +609,9 @@ class SettingManager implements CallbackListener, UsageInformationAble {
// LIMIT is required to keep unlinked setting
$settingStatement = $mysqli->prepare("SELECT * FROM (SELECT * FROM `" . self::TABLE_SETTINGS . "`
WHERE class = ? AND (`serverIndex` = ? OR `serverIndex` = 0)
ORDER BY `priority` ASC, `setting` ASC, `serverIndex` DESC
ORDER BY `serverIndex` DESC
LIMIT 9999999)
as t GROUP BY `setting`; ");
as t GROUP BY `setting` ORDER BY `priority` ASC, `setting`;");
if ($mysqli->error) {
trigger_error($mysqli->error);
return null;