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