mirror of
https://github.com/discourse/discourse.git
synced 2025-06-10 04:13:42 +08:00
BUGFIX: flag topic broke all liking on the sites
This commit is contained in:
@ -65,7 +65,10 @@ class PostActionsController < ApplicationController
|
|||||||
def fetch_post_from_params
|
def fetch_post_from_params
|
||||||
params.require(:id)
|
params.require(:id)
|
||||||
|
|
||||||
post_id = if params[:flag_topic]
|
flag_topic = params[:flag_topic]
|
||||||
|
flag_topic = flag_topic && (flag_topic == true || flag_topic == "true")
|
||||||
|
|
||||||
|
post_id = if flag_topic
|
||||||
begin
|
begin
|
||||||
Topic.find(params[:id]).posts.first.id
|
Topic.find(params[:id]).posts.first.id
|
||||||
rescue
|
rescue
|
||||||
|
Reference in New Issue
Block a user