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:
parent
523febf9c1
commit
c8dc7fff08
|
@ -30,6 +30,8 @@ module Redmine
|
||||||
|
|
||||||
# Return theme for given id, or nil if it's not found
|
# Return theme for given id, or nil if it's not found
|
||||||
def self.theme(id, options={})
|
def self.theme(id, options={})
|
||||||
|
return nil if id.blank?
|
||||||
|
|
||||||
found = themes.find {|t| t.id == id}
|
found = themes.find {|t| t.id == id}
|
||||||
if found.nil? && options[:rescan] != false
|
if found.nil? && options[:rescan] != false
|
||||||
rescan
|
rescan
|
||||||
|
|
Loading…
Reference in New Issue