Skip to content

Commit

Permalink
fixes for redmine 3 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
asimmushtaq committed Jul 22, 2016
1 parent c785328 commit 4d486db
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Empty file modified LICENSE
100644 → 100755
Empty file.
4 changes: 2 additions & 2 deletions app/views/hooks/redmine_mentions/_edit_mentionable.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<% regex_find = '/\B'+Setting.plugin_redmine_mentions['trigger']+'(\w*)$/i'%>


<%users= @project.users.delete_if{|u| (u.type != 'User' || u.mail.empty?)}%>
<%users= (@project && @project.users.to_a.delete_if{|u| (u.type != 'User' || u.mail.empty?)}) || []%>
<%users_regex=users.collect{|u| "#{Setting.plugin_redmine_mentions['trigger']}#{u.login}"}.join('|')%>
<% regex_highlight = '/\B('+users_regex+')/g' %>
<script>
Expand Down Expand Up @@ -32,4 +32,4 @@
}
}
]);
</script>
</script>
Empty file modified init.rb
100644 → 100755
Empty file.
4 changes: 2 additions & 2 deletions lib/redmine_mentions/journal_patch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def send_mail
if self.journalized.is_a?(Issue) && self.notes.present?
issue = self.journalized
project=self.journalized.project
users=project.users.delete_if{|u| (u.type != 'User' || u.mail.empty?)}
users=project.users.to_a.delete_if{|u| (u.type != 'User' || u.mail.empty?)}
users_regex=users.collect{|u| "#{Setting.plugin_redmine_mentions['trigger']}#{u.login}"}.join('|')
regex_for_email = '\B('+users_regex+')'
regex = Regexp.new(regex_for_email)
Expand All @@ -24,4 +24,4 @@ def send_mail
end
end
end
end
end

0 comments on commit 4d486db

Please sign in to comment.