From 94a805321016db8646834d5fb26198ce738d459f Mon Sep 17 00:00:00 2001 From: Callan Barrett Date: Thu, 29 May 2008 17:23:40 +0800 Subject: Disable user package deletion Users can no longer delete packages if they own them, only TUs and devs Signed-off-by: Callan Barrett --- web/html/packages.php | 3 --- web/lib/pkgfuncs.inc | 7 ++++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/web/html/packages.php b/web/html/packages.php index 0394c6e1..80ddf209 100644 --- a/web/html/packages.php +++ b/web/html/packages.php @@ -218,9 +218,6 @@ if ($_POST['action'] == "do_Flag" || isset($_POST['do_Flag'])) { # if ($atype == "Trusted User" || $atype == "Developer") { $result = db_query($q, $dbh); - } else { - $q.= "AND $field IN (0, " . uid_from_sid($_COOKIE["AURSID"]) . ")"; - $result = db_query($q, $dbh); } if ($result != Null && mysql_num_rows($result) > 0) { while ($row = mysql_fetch_assoc($result)) { diff --git a/web/lib/pkgfuncs.inc b/web/lib/pkgfuncs.inc index 5031aa4d..c6e7b8e8 100644 --- a/web/lib/pkgfuncs.inc +++ b/web/lib/pkgfuncs.inc @@ -512,8 +512,7 @@ function package_details($id=0, $SID="") { echo " value='".__("Disown Packages")."'>\n"; } - if ($row["MaintainerUID"] == uid_from_sid($SID) || - account_from_sid($SID) == "Trusted User" || + if (account_from_sid($SID) == "Trusted User" || account_from_sid($SID) == "Developer") { echo "\n"; @@ -905,7 +904,9 @@ function pkg_search_page($SID="") { print "\n"; print "\n"; print "\n"; - print "\n"; + if (account_from_sid($SID) == "Trusted User" || account_from_sid($SID) == "Developer") { + print "\n"; + } print "\n"; print ""; print ""; -- cgit v1.2.3-24-g4f1b