mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 13:41:31 +08:00
DEV: rename ReadOnly module to ReadOnlyHeader
This commit is contained in:
parent
33e06dd796
commit
e2e72f4e8e
|
@ -14,7 +14,7 @@ require_dependency 'global_path'
|
|||
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
|
||||
|
@ -22,7 +22,7 @@ class ApplicationController < ActionController::Base
|
|||
include JsonError
|
||||
include GlobalPath
|
||||
include Hijack
|
||||
include ReadOnly
|
||||
include ReadOnlyHeader
|
||||
|
||||
attr_reader :theme_ids
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module ReadOnly
|
||||
module ReadOnlyHeader
|
||||
|
||||
def check_readonly_mode
|
||||
@readonly_mode = Discourse.readonly_mode?
|
Loading…
Reference in New Issue
Block a user