X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/2fabbed1894b7b04860665a78b814469fa2fce3e..581c243e0ec43dab9cbff2dc9d36d8c17f057286:/app/controllers/diary_entry_controller.rb diff --git a/app/controllers/diary_entry_controller.rb b/app/controllers/diary_entry_controller.rb index 947187227..48cdda8a0 100644 --- a/app/controllers/diary_entry_controller.rb +++ b/app/controllers/diary_entry_controller.rb @@ -54,7 +54,10 @@ class DiaryEntryController < ApplicationController @diary_comment = @entry.diary_comments.build(params[:diary_comment]) @diary_comment.user = @user if @diary_comment.save - Notifier::deliver_diary_comment_notification(@diary_comment) + if @diary_comment.user != @entry.user + Notifier::deliver_diary_comment_notification(@diary_comment) + end + redirect_to :controller => 'diary_entry', :action => 'view', :display_name => @entry.user.display_name, :id => @entry.id else render :action => 'view' @@ -131,6 +134,7 @@ class DiaryEntryController < ApplicationController if @entry @title = t 'diary_entry.view.title', :user => params[:display_name] else + @title = t 'diary_entry.no_such_entry.title', :id => params[:id] render :action => 'no_such_entry', :status => :not_found end else