From 546016bfd24dcce85cf6f196ca5b6a72b9c2a566 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Wed, 13 Feb 2013 11:50:27 -0500 Subject: [PATCH] Remove unused controllers, apply substitutions to TOS. --- app/controllers/faq_controller.rb | 9 --------- app/controllers/privacy_controller.rb | 9 --------- app/controllers/static_controller.rb | 5 +++++ app/controllers/tos_controller.rb | 12 ------------ 4 files changed, 5 insertions(+), 30 deletions(-) delete mode 100644 app/controllers/faq_controller.rb delete mode 100644 app/controllers/privacy_controller.rb delete mode 100644 app/controllers/tos_controller.rb diff --git a/app/controllers/faq_controller.rb b/app/controllers/faq_controller.rb deleted file mode 100644 index c3d25213f..000000000 --- a/app/controllers/faq_controller.rb +++ /dev/null @@ -1,9 +0,0 @@ -class FaqController < ApplicationController - - skip_before_filter :check_xhr - - def index - render layout: false - end - -end diff --git a/app/controllers/privacy_controller.rb b/app/controllers/privacy_controller.rb deleted file mode 100644 index 1d403862c..000000000 --- a/app/controllers/privacy_controller.rb +++ /dev/null @@ -1,9 +0,0 @@ -class PrivacyController < ApplicationController - - skip_before_filter :check_xhr - - def index - render layout: false - end - -end diff --git a/app/controllers/static_controller.rb b/app/controllers/static_controller.rb index 9038082de..e9dcba739 100644 --- a/app/controllers/static_controller.rb +++ b/app/controllers/static_controller.rb @@ -9,6 +9,11 @@ class StaticController < ApplicationController # Don't allow paths like ".." or "/" or anything hacky like that page.gsub!(/[^a-z0-9\_\-]/, '') + # Some variables to substitute + @company_shortname = 'CDCK' + @company_fullname = 'Civilized Discourse Construction Kit, Inc.' + @company_domain = 'discourse.org' + file = "static/#{page}.html" templates = lookup_context.find_all(file) if templates.any? diff --git a/app/controllers/tos_controller.rb b/app/controllers/tos_controller.rb deleted file mode 100644 index 91a477192..000000000 --- a/app/controllers/tos_controller.rb +++ /dev/null @@ -1,12 +0,0 @@ -class TosController < ApplicationController - - skip_before_filter :check_xhr - - def index - @company_shortname = 'CDCK' - @company_fullname = 'Civilized Discourse Construction Kit, Inc.' - @company_domain = 'discourse.org' - render - end - -end \ No newline at end of file