summaryrefslogtreecommitdiffstats
path: root/web/html/pkgsubmit.php
diff options
context:
space:
mode:
authorswiergot <swiergot>2005-08-09 11:20:07 +0200
committerswiergot <swiergot>2005-08-09 11:20:07 +0200
commit6001191a0d5fb3c9be3bc93a338d910465f5dd0a (patch)
tree904b4678be6c7f78f7e608d5b07692b70764f713 /web/html/pkgsubmit.php
parentc2c143399ecf10bc4d2e37fa9a061fd21d08c4e2 (diff)
downloadaur-6001191a0d5fb3c9be3bc93a338d910465f5dd0a.tar.gz
aur-6001191a0d5fb3c9be3bc93a338d910465f5dd0a.tar.xz
autoflag safe for packages submitted by TUs and Developers
Diffstat (limited to 'web/html/pkgsubmit.php')
-rw-r--r--web/html/pkgsubmit.php15
1 files changed, 13 insertions, 2 deletions
diff --git a/web/html/pkgsubmit.php b/web/html/pkgsubmit.php
index e160571e..250a15f9 100644
--- a/web/html/pkgsubmit.php
+++ b/web/html/pkgsubmit.php
@@ -378,7 +378,11 @@ if ($_COOKIE["AURSID"]) {
$q.="Description='".mysql_escape_string($new_pkgbuild['pkgdesc'])."', ";
$q.="URL='".mysql_escape_string($new_pkgbuild['url'])."', ";
$q.="LocationID=2, ";
- $q.="Safe=0, ";
+ if (account_from_sid($_COOKIE["AURSID"]) == "Trusted User" || account_from_sid($_COOKIE["AURSID"]) == "Developer") {
+ $q.="Safe=1, VerifiedBy=".uid_from_sid($_COOKIE["AURSID"]).", ";
+ } else {
+ $q.="Safe=0, ";
+ }
$fspath=$INCOMING_DIR.$pkg_name."/".$_FILES["pfile"]["name"];
$q.="FSPath='".mysql_escape_string($fspath)."', ";
$urlpath=$URL_DIR.$pkg_name."/".$_FILES["pfile"]["name"];
@@ -430,6 +434,9 @@ if ($_COOKIE["AURSID"]) {
#
$q = "INSERT INTO Packages ";
$q.= " (Name, Version, CategoryID, Description, URL, LocationID, ";
+ if (account_from_sid($_COOKIE["AURSID"]) == "Trusted User" || account_from_sid($_COOKIE["AURSID"]) == "Developer") {
+ $q.= "Safe, VerifiedBy,";
+ }
$q.= " SubmittedTS, SubmitterUID, MaintainerUID, FSPath, URLPath) ";
$q.= "VALUES ('";
$q.= mysql_escape_string($new_pkgbuild['pkgname'])."', '";
@@ -438,7 +445,11 @@ if ($_COOKIE["AURSID"]) {
$q.= mysql_escape_string($_REQUEST['category']).", '";
$q.= mysql_escape_string($new_pkgbuild['pkgdesc'])."', '";
$q.= mysql_escape_string($new_pkgbuild['url']);
- $q.= "', 2, UNIX_TIMESTAMP(), ";
+ $q.= "', 2, ";
+ if (account_from_sid($_COOKIE["AURSID"]) == "Trusted User" || account_from_sid($_COOKIE["AURSID"]) == "Developer") {
+ $q.= "1, ".uid_from_sid($_COOKIE["AURSID"]).", ";
+ }
+ $q.= "UNIX_TIMESTAMP(), ";
$q.= uid_from_sid($_COOKIE["AURSID"]).", ";
$q.= uid_from_sid($_COOKIE["AURSID"]).", '";
$fspath=$INCOMING_DIR.$pkg_name."/".$_FILES["pfile"]["name"];