Commit 6da147c1 authored by Robert Lyon's avatar Robert Lyon Committed by Jinelle Foley-Barnes
Browse files

Bug 1486763: Now deleting correct comment



Was a problem with the old delete button being an image and so passed
the _x value, which was then checked for.

Changed it so it checks that the submit param exists, which is more
robust

behatnotneeded : problem of finding the row that you just deleted as
all deleted rows have the same 'Comment removed by the author' text

Change-Id: Iea379badd2d364112d107977b8f53a62ac272428
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent 5600c733
...@@ -81,7 +81,7 @@ else { ...@@ -81,7 +81,7 @@ else {
if (param_variable('make_public_submit', null)) { if (param_variable('make_public_submit', null)) {
pieform(ArtefactTypeComment::make_public_form(param_integer('comment'))); pieform(ArtefactTypeComment::make_public_form(param_integer('comment')));
} }
else if (param_variable('delete_comment_submit_x', null)) { else if (param_exists('delete_comment_submit')) {
pieform(ArtefactTypeComment::delete_comment_form(param_integer('comment'))); pieform(ArtefactTypeComment::delete_comment_form(param_integer('comment')));
} }
......
...@@ -56,7 +56,7 @@ class PluginBlocktypeComment extends SystemBlocktype { ...@@ -56,7 +56,7 @@ class PluginBlocktypeComment extends SystemBlocktype {
if (param_variable('make_public_submit', null)) { if (param_variable('make_public_submit', null)) {
pieform(ArtefactTypeComment::make_public_form(param_integer('comment'))); pieform(ArtefactTypeComment::make_public_form(param_integer('comment')));
} }
else if (param_variable('delete_comment_submit_x', null)) { else if (param_exists('delete_comment_submit')) {
pieform(ArtefactTypeComment::delete_comment_form(param_integer('comment'))); pieform(ArtefactTypeComment::delete_comment_form(param_integer('comment')));
} }
$view = new View($instance->get('view')); $view = new View($instance->get('view'));
......
...@@ -90,7 +90,7 @@ $showcomment = param_integer('showcomment', null); ...@@ -90,7 +90,7 @@ $showcomment = param_integer('showcomment', null);
if (param_variable('make_public_submit', null)) { if (param_variable('make_public_submit', null)) {
pieform(ArtefactTypeComment::make_public_form(param_integer('comment'))); pieform(ArtefactTypeComment::make_public_form(param_integer('comment')));
} }
else if (param_variable('delete_comment_submit_x', null)) { else if (param_exists('delete_comment_submit')) {
pieform(ArtefactTypeComment::delete_comment_form(param_integer('comment'))); pieform(ArtefactTypeComment::delete_comment_form(param_integer('comment')));
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment