]> source.dussan.org Git - redmine.git/commitdiff
Avoid theme rescan when no theme is selected.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Wed, 22 Dec 2010 21:41:08 +0000 (21:41 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Wed, 22 Dec 2010 21:41:08 +0000 (21:41 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4559 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/redmine/themes.rb

index 2b38ec517839d1fb4c2dca5fd204ce7dfa0e2894..77833cb35ea68c73ab8416cabc33c84997261575 100644 (file)
@@ -30,6 +30,8 @@ module Redmine
     
     # Return theme for given id, or nil if it's not found
     def self.theme(id, options={})
+      return nil if id.blank?
+      
       found = themes.find {|t| t.id == id}
       if found.nil? && options[:rescan] != false
         rescan