summaryrefslogtreecommitdiffstats
path: root/web/html/packages.php
diff options
context:
space:
mode:
authorLoui Chang <louipc.ist@gmail.com>2007-09-27 00:06:56 -0400
committerLoui Chang <louipc.ist@gmail.com>2007-09-27 00:06:56 -0400
commitd2134f7637279592b11e4c0f778445bd347b0804 (patch)
tree38ab2013be237835ceff41f468d3dde2438e3bef /web/html/packages.php
parente8ae65abf62e2d85d4baf406fb651e2aa5814d3b (diff)
parentd1c9422095b9981f608b75f0b78e412983ba7aff (diff)
downloadaurweb-d2134f7637279592b11e4c0f778445bd347b0804.tar.xz
Merge commit 'origin/testing'
Yeah I actually want to work from testing. Conflicts: web/lib/pkgfuncs.inc Signed-off-by: Loui Chang <louipc.ist@gmail.com>
Diffstat (limited to 'web/html/packages.php')
-rw-r--r--web/html/packages.php21
1 files changed, 21 insertions, 0 deletions
diff --git a/web/html/packages.php b/web/html/packages.php
index 4cb8c47..0559060 100644
--- a/web/html/packages.php
+++ b/web/html/packages.php
@@ -66,6 +66,27 @@ if (isset($_REQUEST["do_Flag"])) {
print "<p>\n";
print __("The selected packages have been flagged out-of-date.");
print "</p>\n";
+
+ # notification by tardo.
+ $f_name = username_from_sid($_COOKIE['AURSID']);
+ $f_email = email_from_sid($_COOKIE['AURSID']);
+ $f_uid = uid_from_sid($_COOKIE['AURSID']);
+ $q = "SELECT Packages.Name, Users.Email, Packages.ID ";
+ $q.= "FROM Packages, Users ";
+ $q.= "WHERE Packages.ID IN (" . $flag .") ";
+ $q.= "AND Users.ID = Packages.MaintainerUID ";
+ $q.= "AND Users.ID != " . $f_uid;
+ $result = db_query($q, $dbh);
+ if (mysql_num_rows($result)) {
+ while ($row = mysql_fetch_assoc($result)) {
+ # construct email
+ $body = "Your package " . $row['Name'] . " has been flagged out of date by " . $f_name . ". You may view your package at:\nhttp://aur.archlinux.org/packages.php?do_Details=1&ID=" . $row['ID'];
+ $body = wordwrap($body, 70);
+ $headers = "To: ".$row['Email']."\nReply-to: nobody@archlinux.org\nFrom:aur-notify@archlinux.org\nX-Mailer: PHP\nX-MimeOLE: Produced By AUR\n";
+ @mail(' ', "AUR Out-of-date Notification for ".$row['Name'], $body, $headers);
+ }
+ }
+
} else {
print "<p>\n";
print __("You did not select any packages to flag.");