mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
TopicQuery cleanup in advance of custom sorting:
- Move SQL method constants into a module - Removed unused count methods - Moved methods that don't return a TopicList into Topic - Replaced some confusing method signatures
This commit is contained in:
@ -274,8 +274,8 @@ class ApplicationController < ActionController::Base
|
||||
end
|
||||
|
||||
def build_not_found_page(status=404, layout=false)
|
||||
@top_viewed = TopicQuery.top_viewed(10)
|
||||
@recent = TopicQuery.recent(10)
|
||||
@top_viewed = Topic.top_viewed(10)
|
||||
@recent = Topic.recent(10)
|
||||
@slug = params[:slug].class == String ? params[:slug] : ''
|
||||
@slug = (params[:id].class == String ? params[:id] : '') if @slug.blank?
|
||||
@slug.gsub!('-',' ')
|
||||
|
Reference in New Issue
Block a user