diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 79371c9423a..e3f2c36a7f2 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -700,7 +700,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 + @hide_search = true if SiteSetting.login_required render_to_string status: status, layout: layout, formats: [:html], template: '/exceptions/not_found' end diff --git a/app/controllers/exceptions_controller.rb b/app/controllers/exceptions_controller.rb index 540add85c49..4c951e84b68 100644 --- a/app/controllers/exceptions_controller.rb +++ b/app/controllers/exceptions_controller.rb @@ -1,6 +1,6 @@ class ExceptionsController < ApplicationController skip_before_action :check_xhr, :preload_json - before_action :hide_google + before_action :hide_search def not_found # centralize all rendering of 404 into app controller @@ -14,8 +14,8 @@ class ExceptionsController < ApplicationController private - def hide_google - @hide_google = true if SiteSetting.login_required + def hide_search + @hide_search = true if SiteSetting.login_required end end diff --git a/app/views/exceptions/not_found.html.erb b/app/views/exceptions/not_found.html.erb index e06acfd0900..7949a1b5ab3 100644 --- a/app/views/exceptions/not_found.html.erb +++ b/app/views/exceptions/not_found.html.erb @@ -25,15 +25,14 @@ <% end %> -<%- unless @hide_google %> +<%- unless @hide_search%>
-