From ea14ba0c45890ddab98573f07dd1347a90f328f7 Mon Sep 17 00:00:00 2001 From: Jonathan Ernst Date: Sat, 12 Mar 2005 01:09:51 +0000 Subject: [PATCH] - fix supermaintainers delete comments - use deleteAny.php for comment deletion --- admin/deleteAny.php | 2 +- include/comment.php | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/admin/deleteAny.php b/admin/deleteAny.php index d9e3708..b7e4c87 100644 --- a/admin/deleteAny.php +++ b/admin/deleteAny.php @@ -36,7 +36,7 @@ if($_REQUEST['what']) } else { $oComment->delete(); - redirect(BASE."appview.php?appId=".$_REQUEST['appId']."&versionId=".$_REQUEST['versionId']); + redirect(BASE."appview.php?versionId=".$oComment->iVersionId); } break; case "category": diff --git a/include/comment.php b/include/comment.php index 8311386..637d880 100644 --- a/include/comment.php +++ b/include/comment.php @@ -225,13 +225,16 @@ function view_app_comment($ob) echo "\n"; // delete message button, for admins - if ($_SESSION['current']->isLoggedIn() && ($_SESSION['current']->hasPriv("admin") || $_SESSION['current']->isMaintainer($ob->appId,$ob->versionId) )) + if ($_SESSION['current']->hasPriv("admin") + || $_SESSION['current']->isMaintainer($ob->versionId) + || $_SESSION['current']->isSuperMaintainer($ob->appId)) { echo ""; - echo "
\n"; + echo "\n"; echo "commentId\" />"; - echo "appId\" />"; - echo "versionId\" />
","\n"; + echo ""; + echo ""; + echo "\n"; echo ""; }