2016-11-20 23:46:02 -06:00
|
|
|
class SafeModeController < ApplicationController
|
|
|
|
layout 'no_ember'
|
2017-08-30 23:06:56 -05:00
|
|
|
skip_before_action :preload_json, :check_xhr
|
2016-11-20 23:46:02 -06:00
|
|
|
|
|
|
|
def index
|
|
|
|
end
|
|
|
|
|
|
|
|
def enter
|
|
|
|
safe_mode = []
|
|
|
|
safe_mode << "no_custom" if params["no_customizations"] == "true"
|
|
|
|
safe_mode << "no_plugins" if params["no_plugins"] == "true"
|
|
|
|
safe_mode << "only_official" if params["only_official"] == "true"
|
|
|
|
|
|
|
|
if safe_mode.length > 0
|
|
|
|
redirect_to path("/?safe_mode=#{safe_mode.join("%2C")}")
|
|
|
|
else
|
2016-12-19 04:12:15 -06:00
|
|
|
redirect_to safe_mode_path
|
2016-11-20 23:46:02 -06:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|