From a34058b9241b2a9852eff71bc1fc39482fcf79f0 Mon Sep 17 00:00:00 2001
From: Jonathan Ernst
Date: Thu, 6 Jul 2006 18:37:34 +0000
Subject: [PATCH] Update the comments in some files
---
account.php | 17 +++++++++++++----
addcomment.php | 32 ++++++++++++++++----------------
appbrowse.php | 10 +++++++---
appimage.php | 28 ++++++++++++++++++++--------
appview.php | 26 +++++++++++++++++++-------
deletecomment.php | 29 +++++++++++++++++++----------
index.php | 16 +++++++++-------
maintainerdelete.php | 24 ++++++++++++++++++------
maintainersubmit.php | 22 ++++++++++++++++------
preferences.php | 33 ++++++++++++++++++++++++---------
screenshots.php | 38 +++++++++++++++++++++++---------------
search.php | 16 ++++++++++------
viewbugs.php | 16 +++++++++++-----
13 files changed, 205 insertions(+), 102 deletions(-)
diff --git a/account.php b/account.php
index bdde0d6..4049d8a 100644
--- a/account.php
+++ b/account.php
@@ -1,7 +1,16 @@
isLoggedIn())
{
@@ -34,20 +40,14 @@ if(!is_numeric($aClean['iThread']))
$aClean['iThread'] = 0;
}
-############################
-# ADDS COMMENT TO DATABASE #
-############################
+// the user submitted his comment
if(!empty($aClean['sBody']))
{
$oComment = new Comment();
$oComment->create($aClean['sSubject'], $aClean['sBody'], $aClean['iThread'], $aClean['iVersionId']);
redirect(apidb_fullurl("appview.php?iVersionId=".$oComment->iVersionId));
-}
-
-################################
-# USER WANTS TO SUBMIT COMMENT #
-################################
-else
+// let's show the comment form
+} else
{
apidb_header("Add Comment");
diff --git a/appbrowse.php b/appbrowse.php
index 80ba674..5df818d 100644
--- a/appbrowse.php
+++ b/appbrowse.php
@@ -1,8 +1,12 @@
canViewImage($aClean['iId']))
util_show_error_page("Insufficient privileges.");
diff --git a/appview.php b/appview.php
index af0b67a..7d06e43 100644
--- a/appview.php
+++ b/appview.php
@@ -1,11 +1,23 @@
hasPriv("admin")
&& !$_SESSION['current']->isMaintainer($oComment->iVersionId)
&& !$_SESSION['current']->isSuperMaintainer($oComment->iAppId))
@@ -28,12 +35,13 @@ if (!$_SESSION['current']->hasPriv("admin")
util_show_error_page("You don't have sufficient privileges to delete this comment.");
}
+// let's show the deletion form if the user want's to explain why he deleted the comment
if($_SESSION['current']->getPref("confirm_comment_deletion") != "no" && !isset($aClean['iDeleteIt']))
{
apidb_header("Delete Comment");
- $mesTitle = "Please state why you are deleting the following comment";
+ $sMessageTitle = "Please state why you are deleting the following comment";
echo "";
apidb_footer();
+// otherwise, just delete the comment
} else
{
$oComment->delete($aClean['sWhy']);
diff --git a/index.php b/index.php
index e9605c5..fe8cb30 100644
--- a/index.php
+++ b/index.php
@@ -1,11 +1,13 @@
appId;
$voteAppName = $oRow->appName;
- /* don't mention the top application if there are no votes yet */
+ // don't mention the top application if there are no votes yet
if($voteAppId != "")
{
echo "There are $numApps applications currently in the database with\n";
diff --git a/maintainerdelete.php b/maintainerdelete.php
index 5541f01..8d24131 100644
--- a/maintainerdelete.php
+++ b/maintainerdelete.php
@@ -1,11 +1,23 @@
hasPriv("admin"))
{
if($r->name == "query:mode")
diff --git a/screenshots.php b/screenshots.php
index cce7f7d..27d182c 100644
--- a/screenshots.php
+++ b/screenshots.php
@@ -1,13 +1,24 @@
Please consider submitting a screenshot for the selected version yourself.
";
}
+// let's show the screenshot uploading box
if($aClean['iVersionId'])
{
- //image upload box
echo '