From 0f492047a5833fbe75eef77d5191abd80b8754fa Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 10 Oct 2014 13:52:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=A1=B9=E7=9B=AE=E9=A6=96?= =?UTF-8?q?=E9=A1=B5=E7=9A=84=E7=94=A8=E6=88=B7=E5=8A=A8=E6=80=81=E4=BC=9A?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E7=A7=81=E6=9C=89=E9=A1=B9=E7=9B=AE=E4=B8=AD?= =?UTF-8?q?=E7=9A=84=E5=8A=A8=E6=80=81=E7=9A=84BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/welcome_helper.rb | 3 ++- lib/redmine/activity/fetcher.rb | 15 ++++++++++----- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/app/helpers/welcome_helper.rb b/app/helpers/welcome_helper.rb index 5dcf55d49..1139deb35 100644 --- a/app/helpers/welcome_helper.rb +++ b/app/helpers/welcome_helper.rb @@ -405,7 +405,8 @@ module WelcomeHelper "show_bids" => true, "show_contest" => true } - activity.scope_select{|t| ['changesets', 'documents', 'memos', 'messages', 'journals_for_messages', 'bids', 'news', 'contestnotification'].include?(t) ? nil : 'You may think you know what the following code does, may be. but why don"t you close this file and go play with something else, Now?' } + activity.scope_select{|t| ['changesets', 'documents', 'memos', 'messages', 'journals_for_messages', 'bids', 'news', 'contestnotification'].include?(t) ? + nil : 'You may think you know what the following code does, may be. but why don"t you close this file and go play with something else, Now?' } activity.events_welcome(nil, nil, {:limit => limit, :types => 'welcome'}) end diff --git a/lib/redmine/activity/fetcher.rb b/lib/redmine/activity/fetcher.rb index 2caef48b8..ba2033775 100644 --- a/lib/redmine/activity/fetcher.rb +++ b/lib/redmine/activity/fetcher.rb @@ -109,12 +109,17 @@ module Redmine end if cur_objs cur_objs.each do |cur_obj| - if cur_obj.class == Issue - if cur_obj.project != nil && cur_obj.project.project_status != nil - e += [cur_obj] - end - else + #if cur_obj.class.to_s == 'Issue' + # if cur_obj.project != nil && cur_obj.project.project_status != nil && cur_obj.project.is_public == 1 + # e += [cur_obj] + # end + #else + # e += [cur_obj] + #end + if cur_obj.project != nil && cur_obj.project.project_status != nil && cur_obj.project.is_public == true e += [cur_obj] + #else + # e += [cur_obj] end end end