mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
correct information leak in page not found
This commit is contained in:
parent
c47239b536
commit
e6e81efe85
6 changed files with 22 additions and 10 deletions
|
@ -63,6 +63,14 @@ class TopicQuery
|
|||
"CASE WHEN (topics.pinned_at IS NOT NULL) THEN 0 ELSE 1 END, topics.bumped_at DESC"
|
||||
end
|
||||
|
||||
def top_viewed(max)
|
||||
Topic.listable_topics.visible.secured.order('views desc').take(10)
|
||||
end
|
||||
|
||||
def recent(max)
|
||||
Topic.listable_topics.visible.secured.order('created_at desc').take(10)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
def initialize(user=nil, opts={})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue