From 9a83e56b69bff3ef1921d3f8dab0b2daabb4d4c3 Mon Sep 17 00:00:00 2001 From: Callan Barrett Date: Thu, 3 Jan 2008 05:53:50 +0900 Subject: Adds support for TUs and devs to disown packages they do not own This is to add support for either devs or TUs to disown packages whether they own them or not. I know of countless times where I or another TU have been asked to orphan packages for someone and end up having to adopt the package first and then disown it, this gets really tedious for more than one package. As far as I can tell there's no other way to disown packages you don't own and if there is at least this is a more obvious way, pretty sure I didn't leave anything out in the patch. Signed-off-by: Callan Barrett --- web/html/packages.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'web/html/packages.php') diff --git a/web/html/packages.php b/web/html/packages.php index 95b5979..85ab6b7 100644 --- a/web/html/packages.php +++ b/web/html/packages.php @@ -171,7 +171,10 @@ if (isset($_REQUEST["do_Flag"])) { $q = "UPDATE Packages "; $q.= "SET ".$field." = 0 "; $q.= "WHERE ID IN (" . $disown . ") "; - $q.= "AND ".$field." = ".uid_from_sid($_COOKIE["AURSID"]); + # If a user is a TU or dev they can disown any package + if ($atype == "User") { + $q.= "AND ".$field." = ".uid_from_sid($_COOKIE["AURSID"]); + } db_query($q, $dbh); } -- cgit v1.2.3-70-g09d2