mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: support for emoji sets
Added following emoji sets - Apple/International - Emoji One (default) - Android/Google - Twitter FIX: translations from plugins weren't properly merged with default translations FEATURE: new 'site_setting_changed' event
This commit is contained in:
@@ -7,6 +7,11 @@ class SiteSetting < ActiveRecord::Base
|
||||
validates_presence_of :name
|
||||
validates_presence_of :data_type
|
||||
|
||||
after_save do |site_setting|
|
||||
DiscourseEvent.trigger(:site_setting_saved, site_setting)
|
||||
true
|
||||
end
|
||||
|
||||
def self.load_settings(file)
|
||||
SiteSettings::YamlLoader.new(file).load do |category, name, default, opts|
|
||||
if opts.delete(:client)
|
||||
@@ -19,8 +24,10 @@ class SiteSetting < ActiveRecord::Base
|
||||
|
||||
load_settings(File.join(Rails.root, 'config', 'site_settings.yml'))
|
||||
|
||||
Dir[File.join(Rails.root, "plugins", "*", "config", "settings.yml")].each do |file|
|
||||
load_settings(file)
|
||||
unless Rails.env.test? && ENV['LOAD_PLUGINS'] != "1"
|
||||
Dir[File.join(Rails.root, "plugins", "*", "config", "settings.yml")].each do |file|
|
||||
load_settings(file)
|
||||
end
|
||||
end
|
||||
|
||||
client_settings << :available_locales
|
||||
|
||||
Reference in New Issue
Block a user