From c8dc7fff08b9cb0848bfe43ceac2c4f5dbdce0fe Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Wed, 22 Dec 2010 21:41:08 +0000 Subject: [PATCH] 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 --- lib/redmine/themes.rb | 2 ++ 1 file changed, 2 insertions(+) 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 -- 2.39.5