From 6496ff7a2ca14809128dd2c38285df47ff4cc0e6 Mon Sep 17 00:00:00 2001 From: simo Date: Sat, 30 Apr 2005 18:29:08 +0000 Subject: 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 --- web/html/pkgsubmit.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'web') 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'])."',"; -- cgit v1.2.3-24-g4f1b