Avoid theme rescan when no theme is selected.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4559 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2010-12-22 21:41:08 +00:00
parent 523febf9c1
commit c8dc7fff08
1 changed files with 2 additions and 0 deletions

View 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