summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2008-11-30 12:12:06 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2008-11-30 12:12:06 +0000
commit6e777b745305b627c934d5585ca2083b482011d0 (patch)
treed44d3bc8d23ac9159dfa12afd316f7f3af15d45c /lib
parentfce4615f10ad81b9070e65a45f9d37b1c571ccd7 (diff)
downloadredmine-6e777b745305b627c934d5585ca2083b482011d0.tar.gz
redmine-6e777b745305b627c934d5585ca2083b482011d0.zip
Makes activity view accept a user_id param to show user's activity (#1002).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2067 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib')
-rw-r--r--lib/redmine/activity/fetcher.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/redmine/activity/fetcher.rb b/lib/redmine/activity/fetcher.rb
index b12caa441..1d0bd8a16 100644
--- a/lib/redmine/activity/fetcher.rb
+++ b/lib/redmine/activity/fetcher.rb
@@ -48,8 +48,16 @@ module Redmine
end
# Sets the scope
+ # Argument can be :all, :default or an array of event types
def scope=(s)
- @scope = s & event_types
+ case s
+ when :all
+ @scope = event_types
+ when :default
+ default_scope!
+ else
+ @scope = s & event_types
+ end
end
# Resets the scope to the default scope