[aur-dev] [PATCH] Turn on package notification by default for new packages
Signed-off-by: Callan Barrett <wizzomafizzo@gmail.com> --- web/html/pkgsubmit.php | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/web/html/pkgsubmit.php b/web/html/pkgsubmit.php index 78d6e50..3290293 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,10 @@ if ($_COOKIE["AURSID"]): $q .= $packageID . ", '" . mysql_real_escape_string($src) . "')"; db_query($q, $dbh); } + + # Turn on package notification + $q = 'INSERT INTO CommentNotify (PkgID, UserID) VALUES (' . $packageID . ', ' . $uid . ')'; + db_query($q, $dbh); header('Location: packages.php?ID=' . $packageID); -- 1.6.0.2
On Wed, Oct 08, 2008 at 03:19:15AM +0800, Callan Barrett wrote:
Signed-off-by: Callan Barrett <wizzomafizzo@gmail.com> --- web/html/pkgsubmit.php | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/web/html/pkgsubmit.php b/web/html/pkgsubmit.php index 78d6e50..3290293 100644 --- a/web/html/pkgsubmit.php +++ b/web/html/pkgsubmit.php @@ -370,6 +371,10 @@ if ($_COOKIE["AURSID"]): $q .= $packageID . ", '" . mysql_real_escape_string($src) . "')"; db_query($q, $dbh); } + + # Turn on package notification + $q = 'INSERT INTO CommentNotify (PkgID, UserID) VALUES (' . $packageID . ', ' . $uid . ')'; + db_query($q, $dbh);
header('Location: packages.php?ID=' . $packageID);
I'm thinking that notifying should really be calling the notify function eh?
On Fri, Oct 10, 2008 at 6:18 AM, Loui <louipc.ist@gmail.com> wrote:
I'm thinking that notifying should really be calling the notify function eh?
I've been doing these unrelated patches on a branch without the actions converted to functions, forgot all about using them. If you want we can just put this one on hold until those other patches are pushed? -- Callan Barrett
On Fri, Oct 10, 2008 at 10:45 AM, Callan Barrett <wizzomafizzo@gmail.com> wrote:
On Fri, Oct 10, 2008 at 6:18 AM, Loui <louipc.ist@gmail.com> wrote:
I'm thinking that notifying should really be calling the notify function eh?
I've been doing these unrelated patches on a branch without the actions converted to functions, forgot all about using them. If you want we can just put this one on hold until those other patches are pushed?
-- Callan Barrett
Alright got a new patch up, forget this one. -- Callan Barrett
participants (2)
-
Callan Barrett
-
Loui