mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 16:21:18 +08:00
FIX: clicks counter on attachments wasn't always working
This commit is contained in:
@ -8,12 +8,6 @@ class ClicksController < ApplicationController
|
||||
if params[:topic_id].present? || params[:post_id].present?
|
||||
params.merge!({ user_id: current_user.id }) if current_user.present?
|
||||
@redirect_url = TopicLinkClick.create_from(params)
|
||||
|
||||
if @redirect_url.blank? && params[:url].index('?')
|
||||
# Check the url without query parameters
|
||||
params[:url].sub!(/\?.*$/, '')
|
||||
@redirect_url = TopicLinkClick.create_from(params)
|
||||
end
|
||||
end
|
||||
|
||||
# Sometimes we want to record a link without a 302. Since XHR has to load the redirected
|
||||
|
Reference in New Issue
Block a user