Commit 31323dca8b8564ee9cb1e2809210cbe78bb9c3d7

Authored by Victor Costa
1 parent 25f9eb43

Fix comment_form_extra_contents hotspot

Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
app/views/comment/_comment_form.html.erb
@@ -81,7 +81,7 @@ function check_captcha(button, confirm_action) { @@ -81,7 +81,7 @@ function check_captcha(button, confirm_action) {
81 <%= hidden_field_tag(:view, params[:view])%> 81 <%= hidden_field_tag(:view, params[:view])%>
82 <%= f.hidden_field(:reply_of_id) %> 82 <%= f.hidden_field(:reply_of_id) %>
83 83
84 - <%= @plugins.dispatch(:comment_form_extra_contents, local_assigns).collect { |content| instance_exec(&content) }.join("") %> 84 + <%= @plugins.dispatch(:comment_form_extra_contents, local_assigns.merge(:comment => @comment)).collect { |content| instance_exec(&content) }.join("") %>
85 85
86 <% button_bar do %> 86 <% button_bar do %>
87 <%= submit_button('add', _('Post comment'), :onclick => "if(check_captcha(this)) { save_comment(this) } else { check_captcha(this, save_comment)};return false;") %> 87 <%= submit_button('add', _('Post comment'), :onclick => "if(check_captcha(this)) { save_comment(this) } else { check_captcha(this, save_comment)};return false;") %>