From: Jean-Philippe Lang Date: Wed, 22 Dec 2010 21:41:08 +0000 (+0000) Subject: Avoid theme rescan when no theme is selected. X-Git-Tag: 1.1.0~45 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=c8dc7fff08b9cb0848bfe43ceac2c4f5dbdce0fe;p=redmine.git 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 --- diff --git a/lib/redmine/themes.rb b/lib/redmine/themes.rb index 2b38ec517..77833cb35 100644 --- a/lib/redmine/themes.rb +++ b/lib/redmine/themes.rb @@ -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