FEATURE: add redirect_users_to_top_page site setting (default to true)

This commit is contained in:
Régis Hanol
2014-03-31 21:53:38 +02:00
parent 7baa8ea0af
commit ef24a4c71c
4 changed files with 45 additions and 31 deletions

View File

@ -560,6 +560,8 @@ class User < ActiveRecord::Base
end
def redirected_to_top_reason
# redirect is enabled
return unless SiteSetting.redirect_users_to_top_page
# top must be in the top_menu
return unless SiteSetting.top_menu =~ /top/i
# there should be enough topics