FIX: not found page shouldn't include the Google search form for sites with login_required enabled

This commit is contained in:
Neil Lalonde
2018-05-23 16:58:47 -04:00
parent b519beb314
commit 3db1032bfd
2 changed files with 19 additions and 0 deletions

View File

@ -681,6 +681,7 @@ class ApplicationController < ActionController::Base
@slug = params[:slug].class == String ? params[:slug] : ''
@slug = (params[:id].class == String ? params[:id] : '') if @slug.blank?
@slug.tr!('-', ' ')
@hide_google = true if SiteSetting.login_required
render_to_string status: status, layout: layout, formats: [:html], template: '/exceptions/not_found'
end