parent
bd3c0dd59f
commit
5e2e374c72
|
@ -785,7 +785,9 @@ class ApplicationController < ActionController::Base
|
||||||
opts[:layout] = 'application' if opts[:layout] == 'no_ember'
|
opts[:layout] = 'application' if opts[:layout] == 'no_ember'
|
||||||
end
|
end
|
||||||
|
|
||||||
if !SiteSetting.login_required? || (current_user rescue false)
|
@current_user = current_user rescue nil
|
||||||
|
|
||||||
|
if !SiteSetting.login_required? || @current_user
|
||||||
key = "page_not_found_topics"
|
key = "page_not_found_topics"
|
||||||
if @topics_partial = Discourse.redis.get(key)
|
if @topics_partial = Discourse.redis.get(key)
|
||||||
@topics_partial = @topics_partial.html_safe
|
@topics_partial = @topics_partial.html_safe
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<div class="page-not-found">
|
<div class="page-not-found">
|
||||||
<h1 class="title"><%= @title %></h1>
|
<h1 class="title"><%= @title %></h1>
|
||||||
|
|
||||||
<%- if !current_user %>
|
<%- if !@current_user %>
|
||||||
<a href="<%= path "/login" %>" class='btn btn-primary'><%= SvgSprite.raw_svg('fa-user') %><%= I18n.t('log_in') %></a>
|
<a href="<%= path "/login" %>" class='btn btn-primary'><%= SvgSprite.raw_svg('fa-user') %><%= I18n.t('log_in') %></a>
|
||||||
<%- end %>
|
<%- end %>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue