more refactoring
This commit is contained in:
+2
-2
@@ -155,14 +155,14 @@ function update_auction_listing()
|
||||
sort(auction_rows, function(a, b)
|
||||
return aux.sorting.multi_lt(
|
||||
{
|
||||
a.record.unit_buyout_price == 0 and aux.huge or a.record.unit_buyout_price,
|
||||
a.record.unit_buyout_price == 0 and huge or a.record.unit_buyout_price,
|
||||
a.record.unit_blizzard_bid,
|
||||
a.record.stack_size,
|
||||
b.record.own and 1 or 0,
|
||||
a.record.duration,
|
||||
},
|
||||
{
|
||||
b.record.unit_buyout_price == 0 and aux.huge or b.record.unit_buyout_price,
|
||||
b.record.unit_buyout_price == 0 and huge or b.record.unit_buyout_price,
|
||||
b.record.unit_blizzard_bid,
|
||||
b.record.stack_size,
|
||||
a.record.own and 1 or 0,
|
||||
|
||||
@@ -109,7 +109,7 @@ function get_filter_builder_query()
|
||||
end
|
||||
|
||||
local name = m.blizzard_query.name
|
||||
if not aux.index(aux.filter.parse_query_string(name), 'blizzard', 'name') then
|
||||
if not index(aux.filter.parse_query_string(name), 'blizzard', 'name') then
|
||||
name = aux.filter.quote(name)
|
||||
end
|
||||
add((name ~= '' or m.blizzard_query.exact) and name)
|
||||
@@ -175,7 +175,7 @@ function import_query_string()
|
||||
if components then
|
||||
m.set_form(components)
|
||||
else
|
||||
aux.log(error)
|
||||
log(error)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -277,7 +277,7 @@ function add_post_filter()
|
||||
m.filter_input:HighlightText()
|
||||
m.filter_input:SetFocus()
|
||||
elseif error then
|
||||
aux.log(error)
|
||||
log(error)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -325,7 +325,7 @@ function initialize_filter_dropdown()
|
||||
value = filter,
|
||||
func = function()
|
||||
m.filter_input:SetText(this.value)
|
||||
if aux.index(aux.filter.filters[this.value], 'input_type') == '' or this.value == 'not' then
|
||||
if index(aux.filter.filters[this.value], 'input_type') == '' or this.value == 'not' then
|
||||
m.add_post_filter()
|
||||
elseif aux.filter.filters[this.value] then
|
||||
m.filter_parameter_input:Show()
|
||||
|
||||
@@ -118,9 +118,9 @@ function update_auto_buy_filter()
|
||||
local queries = aux.filter.queries(g.aux_auto_buy_filter)
|
||||
if queries then
|
||||
if getn(queries) > 1 then
|
||||
aux.log('Error: The automatic buyout filter may contain only one query')
|
||||
log('Error: The automatic buyout filter may contain only one query')
|
||||
elseif size(queries[1].blizzard_query) > 0 then
|
||||
aux.log('Error: The automatic buyout filter does not support Blizzard filters')
|
||||
log('Error: The automatic buyout filter does not support Blizzard filters')
|
||||
else
|
||||
m.auto_buy_validator = queries[1].validator
|
||||
m.auto_buy_filter_button.prettified = queries[1].prettified
|
||||
@@ -315,10 +315,10 @@ function public.execute(resume, real_time)
|
||||
return
|
||||
elseif real_time then
|
||||
if getn(queries) > 1 then
|
||||
aux.log('Invalid filter: The real time mode does not support multiple queries')
|
||||
log('Invalid filter: The real time mode does not support multiple queries')
|
||||
return
|
||||
elseif queries[1].blizzard_query.first_page or queries[1].blizzard_query.last_page then
|
||||
aux.log('Invalid filter: The real time mode does not support page range filters')
|
||||
log('Invalid filter: The real time mode does not support page range filters')
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user