2
0
Fork 0
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:
Sam 2013-06-13 10:27:17 +10:00
parent c47239b536
commit e6e81efe85
6 changed files with 22 additions and 10 deletions

View file

@ -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={})