summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authoreric <eric>2005-03-05 20:39:36 +0000
committereric <eric>2005-03-05 20:39:36 +0000
commitaae43d9ad6fc83d04a4975f27392c1422dfa0ec4 (patch)
treeaacdeb67fd388fec026dc4dfde343d8e8e32b5b1 /web
parent93ac7cb91db74b6043f0aeb54a548f9a5560a15e (diff)
downloadaurweb-aae43d9ad6fc83d04a4975f27392c1422dfa0ec4.tar.xz
started working on package comments
Diffstat (limited to 'web')
-rw-r--r--web/html/packages.php13
-rw-r--r--web/html/pkgsubmit.php8
2 files changed, 14 insertions, 7 deletions
diff --git a/web/html/packages.php b/web/html/packages.php
index b2dabef..823a4ca 100644
--- a/web/html/packages.php
+++ b/web/html/packages.php
@@ -209,7 +209,7 @@ if (isset($_REQUEST["do_Flag"])) {
}
}
if (!empty($ids_to_delete)) {
- # TODO These are the packages that are safe to delete
+ # These are the packages that are safe to delete
#
foreach ($ids_to_delete as $id) {
# 1) delete from PackageVotes
@@ -228,8 +228,8 @@ if (isset($_REQUEST["do_Flag"])) {
$q = "DELETE FROM PackageSources WHERE PackageID = " . $id;
$result = db_query($q, $dbh);
- # 5) delete from PackageUploadHistory
- $q = "DELETE FROM PackageUploadHistory WHERE PackageID = " . $id;
+ # 5) delete from PackageComments
+ $q = "DELETE FROM PackageComments WHERE PackageID = " . $id;
$result = db_query($q, $dbh);
# 6) delete from Packages
@@ -239,6 +239,7 @@ if (isset($_REQUEST["do_Flag"])) {
# TODO question: Now that the package as been deleted, does
# the unsupported repo need to be regenerated?
# ANSWER: No, there is no actual repo for unsupported, so no worries! (PJM)
+ # TODO question: What about regenerating the AUR repo? (EJ)
# Print the success message
print "<p>\n";
@@ -355,6 +356,12 @@ if (isset($_REQUEST["do_Flag"])) {
$q.= $vote_clauses;
db_query($q, $dbh);
+ # Update the LastVoted field for this user
+ #
+ $q = "UPDATE Users SET LastVoted = UNIX_TIMESTAMP() ";
+ $q.= "WHERE ID = ".$uid;
+ db_query($q, $dbh);
+
print "<p>\n";
print __("Your votes have been cast for the selected packages.");
print "</p>\n";
diff --git a/web/html/pkgsubmit.php b/web/html/pkgsubmit.php
index ccf1df7..d679704 100644
--- a/web/html/pkgsubmit.php
+++ b/web/html/pkgsubmit.php
@@ -371,8 +371,8 @@ if ($_COOKIE["AURSID"]) {
# add upload history
#
- $q = "INSERT INTO PackageUploadHistory ";
- $q.= "(PackageID, UsersID, Comments, UploadTS) VALUES (";
+ $q = "INSERT INTO PackageComments ";
+ $q.= "(PackageID, UsersID, Comments, CommentTS) VALUES (";
$q.= $pdata["ID"] . ", " . uid_from_sid($_COOKIE['AURSID']);
$q.= ", '" . mysql_escape_string($_REQUEST["comments"]);
$q.= "', UNIX_TIMESTAMP())";
@@ -434,8 +434,8 @@ if ($_COOKIE["AURSID"]) {
# add upload history
#
- $q = "INSERT INTO PackageUploadHistory ";
- $q.= "(PackageID, UsersID, Comments, UploadTS) VALUES (";
+ $q = "INSERT INTO PackageComments ";
+ $q.= "(PackageID, UsersID, Comments, CommentTS) VALUES (";
$q.= $packageID . ", " . uid_from_sid($_COOKIE["AURSID"]) . ", '";
$q.= mysql_escape_string($_REQUEST["comments"]);
$q.= "', UNIX_TIMESTAMP())";