Skip to content

Commit

Permalink
DEV: rename ReadOnly module to ReadOnlyHeader
Browse files Browse the repository at this point in the history
  • Loading branch information
ZogStriP committed May 6, 2019
1 parent 33e06dd commit e2e72f4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@
require_dependency 'secure_session'
require_dependency 'topic_query'
require_dependency 'hijack'
require_dependency 'read_only'
require_dependency 'read_only_header'

class ApplicationController < ActionController::Base
include CurrentUser
include CanonicalURL::ControllerExtensions
include JsonError
include GlobalPath
include Hijack
include ReadOnly
include ReadOnlyHeader

attr_reader :theme_ids

Expand Down
8 changes: 4 additions & 4 deletions app/controllers/forums_controller.rb
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# frozen_string_literal: true

require "read_only"
require "read_only_header"

class ForumsController < ActionController::Base
include ReadOnly
include ReadOnlyHeader

before_action :check_readonly_mode
after_action :add_readonly_header

def status
if $shutdown
render plain: 'shutting down', status: 500
render plain: "shutting down", status: 500
else
render plain: 'ok'
render plain: "ok"
end
end

Expand Down
2 changes: 1 addition & 1 deletion lib/read_only.rb → lib/read_only_header.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

module ReadOnly
module ReadOnlyHeader

def check_readonly_mode
@readonly_mode = Discourse.readonly_mode?
Expand Down

0 comments on commit e2e72f4

Please sign in to comment.