lib/milkode/cdweb/lib/web_setting.rb in milkode-0.9.5 vs lib/milkode/cdweb/lib/web_setting.rb in milkode-0.9.6

- old
+ new

@@ -15,16 +15,22 @@ :home_icon => "/images/MilkodeIcon135.png", :header_title => "Milkode", :header_icon => "/images/MilkodeIcon135.png", + :favicon => "/images/favicon.ico", + :display_about_milkode => true } def self.hash_method(name) define_method(name) do - @data[name] + if @data[name] + @data[name] + else + DEFAULT_SETTING[name] + end end end def initialize fname = File.join(Database.dbdir, "milkweb.yaml") @@ -41,9 +47,11 @@ hash_method :home_icon hash_method :header_title hash_method :header_icon + hash_method :favicon + def about_milkode if (@data[:display_about_milkode]) ', <a href="http://milkode.ongaeshi.me">milkodeについて</a>' else ''