summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsimo <simo>2005-04-30 20:29:08 +0200
committersimo <simo>2005-04-30 20:29:08 +0200
commit6496ff7a2ca14809128dd2c38285df47ff4cc0e6 (patch)
tree55fec232245e07f75eab2bd22032b3e55212870a
parent82848581f4f266228c084d71e3249ec7b91bbd99 (diff)
downloadaur-6496ff7a2ca14809128dd2c38285df47ff4cc0e6.tar.gz
aur-6496ff7a2ca14809128dd2c38285df47ff4cc0e6.tar.xz
Fix issue where a submitteruid was retained on dummies
Also fix issue where orphan was generated if a dummy is replaced and "overwrite" wasn't checked
-rw-r--r--web/html/pkgsubmit.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/web/html/pkgsubmit.php b/web/html/pkgsubmit.php
index 9ef2737c..5c9f266b 100644
--- a/web/html/pkgsubmit.php
+++ b/web/html/pkgsubmit.php
@@ -334,7 +334,13 @@ if ($_COOKIE["AURSID"]) {
# update package data
#
$q = "UPDATE Packages SET ";
- $q.= "DummyPkg = 0, ";
+ # if the package was a dummy, undummy it and change submitter
+ # also give it a maintainer so we dont go making an orphan
+ if ($pdata['DummyPkg'] == 1) {
+ $q.= "DummyPkg = 0, ";
+ $q.= "SubmitterUID = ".uid_from_sid($_COOKIE["AURSID"]).", ";
+ $q.= "MaintainerUID = ".uid_from_sid($_COOKIE["AURSID"]).", ";
+ }
$q.="Name='".mysql_escape_string($new_pkgbuild['pkgname'])."', ";
$q.="Version='".mysql_escape_string($new_pkgbuild['pkgver'])."-".
mysql_escape_string($new_pkgbuild['pkgrel'])."',";