isLoggedIn()) { errorpage("You need to be logged in to delete a comment."); exit; } /* if we aren't an admin or the maintainer of this app we shouldn't be */ /* allowed to delete any comments */ if(!$_SESSION['current']->hasPriv("admin") && !$_SESSION['current']->isMaintainer($_REQUEST['appId'], $_REQUEST['versionId'])) { errorpage('You don\'t have sufficient privileges to delete this comment.'); exit; } $oComment = new Comment($_REQUEST['commentId']); if($_SESSION['current']->getPref("confirm_comment_deletion") != "no" && !isset($_REQUEST['int_delete_it'])) { apidb_header("Delete Comment"); $mesTitle = "Please state why you are deleting the following comment"; echo "
"; ?>delete($_REQUEST['str_why']); redirect(apidb_fullurl("appview.php?versionId=".$_REQUEST['versionId'])); } ?>