]> source.dussan.org Git - redmine.git/commitdiff
Silently ignore invalid status_by param.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 20 Mar 2011 21:09:48 +0000 (21:09 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 20 Mar 2011 21:09:48 +0000 (21:09 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5180 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/helpers/versions_helper.rb

index 4f5ad4b60a05d90a8d144fe256aa313ed8c79181..d16007b4a066b5e0f72b6543edc93578270cd8ea 100644 (file)
@@ -20,8 +20,7 @@ module VersionsHelper
   STATUS_BY_CRITERIAS = %w(category tracker status priority author assigned_to)
   
   def render_issue_status_by(version, criteria)
-    criteria ||= 'category'
-    raise 'Unknown criteria' unless STATUS_BY_CRITERIAS.include?(criteria)
+    criteria = 'category' unless STATUS_BY_CRITERIAS.include?(criteria)
     
     h = Hash.new {|k,v| k[v] = [0, 0]}
     begin