diff --git a/admin/adminMaintainerQueue.php b/admin/adminMaintainerQueue.php
new file mode 100644
index 0000000..6e4dcce
--- /dev/null
+++ b/admin/adminMaintainerQueue.php
@@ -0,0 +1,274 @@
+
+
+/* code to View and approve new application maintainers */
+
+include("path.php");
+require(BASE."include/"."incl.php");
+require(BASE."include/"."tableve.php");
+require(BASE."include/"."category.php");
+require_once(BASE."include/"."maintainer.php");
+
+//deny access if not logged in
+if(!loggedin())
+{
+ errorpage("You need to be logged in to use this page.");
+ exit;
+} else if (!havepriv("admin"))
+{
+ errorpage("You must be an administrator to use this page.");
+ exit;
+}
+
+apidb_header("Admin Maintainer Queue");
+echo '
";
+apidb_footer();
+
+
+?>
diff --git a/admin/adminMaintainers.php b/admin/adminMaintainers.php
new file mode 100644
index 0000000..9eb1e69
--- /dev/null
+++ b/admin/adminMaintainers.php
@@ -0,0 +1,99 @@
+
+
+/* code to view and maintain the list of application maintainers */
+
+include("path.php");
+require(BASE."include/"."incl.php");
+require(BASE."include/"."tableve.php");
+require(BASE."include/"."category.php");
+require(BASE."include/"."maintainer.php");
+
+//deny access if not logged in
+if(!loggedin())
+{
+ errorpage("You need to be logged in to use this page.");
+ exit;
+} else if (!havepriv("admin"))
+{
+ errorpage("You must be an administrator to use this page.");
+ exit;
+}
+
+apidb_header("Admin Maintainers");
+echo '";
+apidb_footer();
+
+
+?>
diff --git a/appview.php b/appview.php
index d8348ea..c60217a 100644
--- a/appview.php
+++ b/appview.php
@@ -16,6 +16,8 @@ require(BASE."include/"."vote.php");
require(BASE."include/"."rating.php");
require(BASE."include/"."category.php");
+require(BASE."include/"."maintainer.php");
+
global $apidb_root;
@@ -194,7 +196,7 @@ function display_versions($appId, $versions)
echo "
";
+
+ /* close the table */
+ echo "\n";
echo html_frame_end();
diff --git a/deletecomment.php b/deletecomment.php
index 3deda40..f22a956 100644
--- a/deletecomment.php
+++ b/deletecomment.php
@@ -3,8 +3,15 @@
include("path.php");
require(BASE."include/"."incl.php");
-//FIXME: should check to see if the user is an application maintainer when we have application maintainers
-if(!havepriv("admin"))
+$appId = strip_tags($_POST['appId']);
+$versionId = strip_tags($_POST['versionId']);
+
+$commentId = strip_tags($_POST['commentId']);
+$commentId = mysql_escape_string($commentId);
+
+/* if we aren't an admin or the maintainer of this app we shouldn't be */
+/* allowed to delete any comments */
+if(!havepriv("admin") && !isMaintainer($appId, $versionId))
{
errorpage('You don\'t have admin privilages');
exit;
@@ -12,12 +19,6 @@ if(!havepriv("admin"))
opendb();
-$commentId = strip_tags($_POST['commentId']);
-$commentId = mysql_escape_string($commentId);
-
-$appId = strip_tags($_POST['appId']);
-$versionId = strip_tags($_POST['versionId']);
-
/* retrieve the parentID of the comment we are deleting */
/* so we can fix up the parentIds of this comments children */
$result = mysql_query("SELECT parentId FROM appComments WHERE commentId = '$commentId'");
diff --git a/include/comments.php b/include/comments.php
index 036c517..9fed347 100644
--- a/include/comments.php
+++ b/include/comments.php
@@ -66,8 +66,7 @@ function view_app_comment($ob)
echo "\n";
// delete message button, for admins
- //TODO: application managers should also see this button
- if(havepriv("admin"))
+ if(havepriv("admin") || isMaintainer($ob->appId, $ob->versionId))
{
echo "