diff options
author | simo <simo> | 2005-04-30 18:29:08 +0000 |
---|---|---|
committer | simo <simo> | 2005-04-30 18:29:08 +0000 |
commit | 6496ff7a2ca14809128dd2c38285df47ff4cc0e6 (patch) | |
tree | 55fec232245e07f75eab2bd22032b3e55212870a /web | |
parent | 82848581f4f266228c084d71e3249ec7b91bbd99 (diff) | |
download | aurweb-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
Diffstat (limited to 'web')
-rw-r--r-- | web/html/pkgsubmit.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/web/html/pkgsubmit.php b/web/html/pkgsubmit.php index 9ef2737..5c9f266 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'])."',"; |