lib/tr8n/config.rb in tr8n-3.1.8 vs lib/tr8n/config.rb in tr8n-3.2.0
- old
+ new
@@ -1,7 +1,7 @@
#--
-# Copyright (c) 2010-2011 Michael Berkovich
+# Copyright (c) 2010-2012 Michael Berkovich, tr8n.net
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
@@ -259,10 +259,18 @@
end
def self.open_registration_mode?
config[:open_registration_mode]
end
+
+ def self.enable_registration_disclaimer?
+ config[:enable_registration_disclaimer]
+ end
+
+ def self.registration_disclaimer_path
+ config[:registration_disclaimer_path] || "/tr8n/common/terms_of_service"
+ end
def self.enable_fallback_languages?
config[:enable_fallback_languages]
end
@@ -280,10 +288,14 @@
def self.enable_country_tracking?
config[:enable_country_tracking]
end
+ def self.enable_translator_tabs?
+ config[:enable_translator_tabs]
+ end
+
#########################################################
# Config Sections
def self.caching
config[:caching]
end
@@ -741,9 +753,33 @@
end
def self.enable_client_sdk?
config[:enable_client_sdk]
end
+
+ def self.enable_browser_cache?
+ config[:enable_browser_cache]
+ end
+
+ def self.default_client_interval
+ 5000
+ end
+
+ def self.api_skip_before_filters
+ return [] unless api[:skip_before_filters]
+ @api_skip_before_filters ||= api[:skip_before_filters].collect{|filter| filter.to_sym}
+ end
+
+ def self.api_before_filters
+ return [] unless api[:before_filters]
+ @api_before_filters ||= api[:before_filters].collect{|filter| filter.to_sym}
+ end
+
+ def self.api_after_filters
+ return [] unless api[:after_filters]
+ @api_after_filters ||= api[:after_filters].collect{|filter| filter.to_sym}
+ end
+
#########################################################
# Sync Process
#########################################################
def self.synchronization_batch_size
\ No newline at end of file