diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-10-05 13:18:55 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-10-05 13:18:55 +0000 |
commit | 74cd72a2d96941c3ab283f547fb35f6b02333f92 (patch) | |
tree | a6d983a62fc8894cf47d88286f94363190ae44eb /app/controllers | |
parent | a5675463352040ae8e63b0ba6c20a27dbfefc0d3 (diff) | |
download | redmine-74cd72a2d96941c3ab283f547fb35f6b02333f92.tar.gz redmine-74cd72a2d96941c3ab283f547fb35f6b02333f92.zip |
Fixed that preview doesn't show notes when issue project is changed (#17959).
git-svn-id: http://svn.redmine.org/redmine/trunk@13428 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/previews_controller.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/previews_controller.rb b/app/controllers/previews_controller.rb index 38245b94b..e74d1fe55 100644 --- a/app/controllers/previews_controller.rb +++ b/app/controllers/previews_controller.rb @@ -19,7 +19,7 @@ class PreviewsController < ApplicationController before_filter :find_project, :find_attachments def issue - @issue = @project.issues.find_by_id(params[:id]) unless params[:id].blank? + @issue = Issue.visible.find_by_id(params[:id]) unless params[:id].blank? if @issue @description = params[:issue] && params[:issue][:description] if @description && @description.gsub(/(\r?\n|\n\r?)/, "\n") == @issue.description.to_s.gsub(/(\r?\n|\n\r?)/, "\n") @@ -45,7 +45,7 @@ class PreviewsController < ApplicationController def find_project project_id = (params[:issue] && params[:issue][:project_id]) || params[:project_id] - @project = Project.find(project_id) + @project = Project.visible.find(project_id) rescue ActiveRecord::RecordNotFound render_404 end |