summaryrefslogtreecommitdiffstats
path: root/lib/redmine/themes.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2010-12-22 21:41:08 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2010-12-22 21:41:08 +0000
commitc8dc7fff08b9cb0848bfe43ceac2c4f5dbdce0fe (patch)
treefb7c66fa823c389f0b1564f671defd3bffaf432f /lib/redmine/themes.rb
parent523febf9c1b31991fed52fe5878bec3153f8aafb (diff)
downloadredmine-c8dc7fff08b9cb0848bfe43ceac2c4f5dbdce0fe.tar.gz
redmine-c8dc7fff08b9cb0848bfe43ceac2c4f5dbdce0fe.zip
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
Diffstat (limited to 'lib/redmine/themes.rb')
-rw-r--r--lib/redmine/themes.rb2
1 files changed, 2 insertions, 0 deletions
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