mirror of
https://github.com/discourse/discourse.git
synced 2025-03-09 14:34:35 +00:00
remove duplicated order_with_pinned_sql method
This commit is contained in:
parent
aca53aa722
commit
59ab71b060
@ -46,13 +46,5 @@ module TopicQuerySQL
|
|||||||
"CASE WHEN (topics.pinned_at IS NOT NULL) THEN 0 ELSE 1 END, topics.bumped_at DESC"
|
"CASE WHEN (topics.pinned_at IS NOT NULL) THEN 0 ELSE 1 END, topics.bumped_at DESC"
|
||||||
end
|
end
|
||||||
|
|
||||||
def order_with_pinned_sql
|
|
||||||
"CASE
|
|
||||||
WHEN (COALESCE(topics.pinned_at, '#{lowest_date}') > COALESCE(tu.cleared_pinned_at, '#{lowest_date}'))
|
|
||||||
THEN '#{highest_date}'
|
|
||||||
ELSE topics.bumped_at
|
|
||||||
END DESC"
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user