From 089adc085b63d85853c004fb04fa814c3629da72 Mon Sep 17 00:00:00 2001 From: evazion Date: Mon, 18 Apr 2022 00:52:08 -0500 Subject: [PATCH] Fix #5119: /counts/posts ignores aliased tags on betabooru --- app/controllers/counts_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/counts_controller.rb b/app/controllers/counts_controller.rb index 560b1b785..0d48732e3 100644 --- a/app/controllers/counts_controller.rb +++ b/app/controllers/counts_controller.rb @@ -6,7 +6,7 @@ class CountsController < ApplicationController def posts estimate_count = params.fetch(:estimate_count, "true").truthy? skip_cache = params.fetch(:skip_cache, "false").truthy? - @count = PostQuery.new(params[:tags], current_user: CurrentUser.user, tag_limit: CurrentUser.user.tag_query_limit).fast_count(timeout: CurrentUser.statement_timeout, estimate_count: estimate_count, skip_cache: skip_cache) + @count = PostQuery.normalize(params[:tags], current_user: CurrentUser.user, tag_limit: CurrentUser.user.tag_query_limit).fast_count(timeout: CurrentUser.statement_timeout, estimate_count: estimate_count, skip_cache: skip_cache) if request.format.xml? respond_with({ posts: @count }, root: "counts")