[aur-dev] [PATCH] Turn on package notification by default for new packages
Version using package functions Signed-off-by: Callan Barrett <wizzomafizzo@gmail.com> --- web/html/pkgsubmit.php | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/web/html/pkgsubmit.php b/web/html/pkgsubmit.php index 78d6e50..450e9b6 100644 --- a/web/html/pkgsubmit.php +++ b/web/html/pkgsubmit.php @@ -328,6 +328,7 @@ if ($_COOKIE["AURSID"]): header('Location: packages.php?ID=' . $pdata['ID']); } else { + $uid = uid_from_sid($_COOKIE["AURSID"]); # This is a brand new package $q = sprintf("INSERT INTO Packages (Name, License, Version, CategoryID, Description, URL, LocationID, SubmittedTS, SubmitterUID, MaintainerUID, FSPath, URLPath) VALUES ('%s', '%s', '%s-%s', %d, '%s', '%s', 2, UNIX_TIMESTAMP(), %d, %d, '%s', '%s')", @@ -338,8 +339,8 @@ if ($_COOKIE["AURSID"]): mysql_real_escape_string($_REQUEST['category']), mysql_real_escape_string($new_pkgbuild['pkgdesc']), mysql_real_escape_string($new_pkgbuild['url']), - uid_from_sid($_COOKIE["AURSID"]), - uid_from_sid($_COOKIE["AURSID"]), + $uid, + $uid, mysql_real_escape_string(INCOMING_DIR . $pkg_name . "/" . $pkg_name . ".tar.gz"), mysql_real_escape_string(URL_DIR . $pkg_name . "/" . $pkg_name . ".tar.gz")); @@ -370,6 +371,8 @@ if ($_COOKIE["AURSID"]): $q .= $packageID . ", '" . mysql_real_escape_string($src) . "')"; db_query($q, $dbh); } + + pkg_notify(account_from_sid($_COOKIE["AURSID"]), array($packageID)); header('Location: packages.php?ID=' . $packageID); -- 1.6.0.2
On Fri 10 Oct 2008 11:29 +0800, Callan Barrett wrote:
Version using package functions
Signed-off-by: Callan Barrett <wizzomafizzo@gmail.com>
Bwahah. This ancient patch has been merged.
participants (2)
-
Callan Barrett
-
Loui Chang