Fix luacheck

This commit is contained in:
Athozus 2023-04-07 20:36:28 +02:00
parent 49b1f0d400
commit 779ba48a2c
No known key found for this signature in database
GPG key ID: B50895022E8484BF

View file

@ -24,13 +24,6 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
-- then sort them
if not fields.sortfield or fields.sortfield == "" then
sortfield = "3"
end
if not fields.sortdirection or fields.sortdirection == "" then
sortdirection = "1"
end
if not sortfield then
local sortfield = fields.sortfield
end
@ -38,6 +31,13 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
local sortdirection = fields.sortdirection
end
if not fields.sortfield or fields.sortfield == "" then
sortfield = "3"
end
if not fields.sortdirection or fields.sortdirection == "" then
sortdirection = "1"
end
local messagesInbox = mail.sort_messages(messagesInboxFiltered, sortfield, sortdirection, filter)
local messagesSent = mail.sort_messages(messagesOutboxFiltered, sortfield, sortdirection, filter)