refactoring
This commit is contained in:
+1
-1
@@ -273,7 +273,7 @@ function UseContainerItem(...) temp=arg
|
||||
if modified or not index(active_tab, 'USE_ITEM') then
|
||||
return orig.UseContainerItem(unpack(arg))
|
||||
end
|
||||
for item_info in present(info.container_item(arg[1], arg[2])) do
|
||||
for item_info in present(aux.info.container_item(arg[1], arg[2])) do
|
||||
return active_tab.USE_ITEM(item_info)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -134,7 +134,7 @@ function get_filter_builder_query()
|
||||
add(strlower(_G['ITEM_QUALITY'..quality..'_DESC']))
|
||||
end
|
||||
|
||||
local post_filter_string = filter_util.filter_string(temp-T('blizzard', tt, 'post', post_filter))
|
||||
local post_filter_string = filter_util.filter_string(post_filter)
|
||||
add(post_filter_string ~= '' and post_filter_string)
|
||||
|
||||
return filter_string or ''
|
||||
|
||||
+2
-2
@@ -418,10 +418,10 @@ function suggestions(filter)
|
||||
return suggestions
|
||||
end
|
||||
|
||||
function public.filter_string(filter)
|
||||
function public.filter_string(components)
|
||||
local query_builder = query_builder()
|
||||
|
||||
for _, component in filter.components do
|
||||
for _, component in components do
|
||||
if component[1] == 'blizzard' then
|
||||
query_builder.append(filter[4] or filter[3])
|
||||
elseif component[1] == 'operator' then
|
||||
|
||||
Reference in New Issue
Block a user