Fix comment::delete() to take $bSilent as an input parameter and use

comment::SendNotificationEmail(). Update version::delete() to pass false into comment::delete()
so we don't send an email for each comment we are deleting for a given version. Fixes bug 8473.
This commit is contained in:
Chris Morgan
2007-08-24 02:52:34 +00:00
committed by WineHQ
parent 6b5305d1bf
commit 9e05efb1b6
3 changed files with 56 additions and 28 deletions

View File

@@ -6,7 +6,7 @@
* - iCommentId, comment identifier
*
* Optional parameters:
* - sWhy, reason for deleting the comment
* - sReplyText, reason for deleting the comment
* - iDeleteIt, 1 if the deletion has been confirmed
*/
@@ -40,7 +40,7 @@ if($_SESSION['current']->getPref("confirm_comment_deletion") != "no" && !isset($
echo htmlify_urls($oComment->sBody), "<br /><br />\n";
echo html_frame_end();
echo '<table width="100%" border=0 cellpadding=0 cellspacing=1>',"\n";
echo "<tr class=color1><td colspan=2><textarea name=\"sWhy\" cols=\"70\" rows=\"15\" wrap=\"virtual\"></textarea></td></tr>\n";
echo "<tr class=color1><td colspan=2><textarea name=\"sReplyText\" cols=\"70\" rows=\"15\" wrap=\"virtual\"></textarea></td></tr>\n";
echo "<tr class=color1><td colspan=2 align=center>\n";
echo " <input type=\"submit\" value=\"Delete Comment\" class=\"button\" />\n";
echo "</td></tr>\n";
@@ -54,7 +54,7 @@ if($_SESSION['current']->getPref("confirm_comment_deletion") != "no" && !isset($
// otherwise, just delete the comment
} else
{
$oComment->delete($aClean['sWhy']);
$oComment->delete(true);
$oVersion = new version($oComment->iVersionId);
util_redirect_and_exit($oVersion->objectMakeUrl());
}