Prefix all GPC variables according to our coding standard
This commit is contained in:
@@ -13,11 +13,11 @@ require(BASE."include/mail.php");
|
||||
|
||||
$aClean = array(); //array of filtered user input
|
||||
|
||||
$aClean['str_why'] = makeSafe($_REQUEST['str_why']);
|
||||
$aClean['commentId'] = makeSafe($_REQUEST['commentId']);
|
||||
$aClean['int_delete_it'] = makeSafe($_REQUEST['int_delete_it']);
|
||||
$aClean['sWhy'] = makeSafe($_REQUEST['sWhy']);
|
||||
$aClean['iCommentId'] = makeSafe($_REQUEST['iCommentId']);
|
||||
$aClean['iDeleteIt'] = makeSafe($_REQUEST['iDeleteIt']);
|
||||
|
||||
$oComment = new Comment($aClean['commentId']);
|
||||
$oComment = new Comment($aClean['iCommentId']);
|
||||
|
||||
/* if we aren't an admin or the maintainer of this app we shouldn't be */
|
||||
/* allowed to delete any comments */
|
||||
@@ -29,7 +29,7 @@ if (!$_SESSION['current']->hasPriv("admin")
|
||||
exit;
|
||||
}
|
||||
|
||||
if($_SESSION['current']->getPref("confirm_comment_deletion") != "no" && !isset($aClean['int_delete_it']))
|
||||
if($_SESSION['current']->getPref("confirm_comment_deletion") != "no" && !isset($aClean['iDeleteIt']))
|
||||
{
|
||||
apidb_header("Delete Comment");
|
||||
$mesTitle = "<b>Please state why you are deleting the following comment</b>";
|
||||
@@ -40,20 +40,20 @@ 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=\"str_why\" cols=\"70\" rows=\"15\" wrap=\"virtual\"></textarea></td></tr>\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 align=center>\n";
|
||||
echo " <input type=\"submit\" value=\"Delete Comment\" class=\"button\" />\n";
|
||||
echo "</td></tr>\n";
|
||||
echo "</table>\n";
|
||||
echo html_frame_end();
|
||||
echo "<input type=\"hidden\" name=\"int_delete_it\" value=\"1\" />\n";
|
||||
echo "<input type=\"hidden\" name=\"commentId\" value=\"".$oComment->iCommentId."\" />";
|
||||
echo "<input type=\"hidden\" name=\"iDeleteIt\" value=\"1\" />\n";
|
||||
echo "<input type=\"hidden\" name=\"iCommentId\" value=\"".$oComment->iCommentId."\" />";
|
||||
echo "</form>";
|
||||
|
||||
apidb_footer();
|
||||
} else
|
||||
{
|
||||
$oComment->delete($aClean['str_why']);
|
||||
redirect(apidb_fullurl("appview.php?versionId=".$oComment->iVersionId));
|
||||
$oComment->delete($aClean['sWhy']);
|
||||
redirect(apidb_fullurl("appview.php?iVersionId=".$oComment->iVersionId));
|
||||
}
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user