[aur-dev] [PATCH 1/4] remove submitter from package data

elij elij.mx at gmail.com
Wed May 11 00:01:27 EDT 2011


---
 web/html/pkgsubmit.php       |    3 +--
 web/lib/pkgfuncs.inc         |   10 +---------
 web/template/pkg_details.php |   11 -----------
 3 files changed, 2 insertions(+), 22 deletions(-)

diff --git a/web/html/pkgsubmit.php b/web/html/pkgsubmit.php
index 26608ea..4f0c076 100644
--- a/web/html/pkgsubmit.php
+++ b/web/html/pkgsubmit.php
@@ -339,7 +339,7 @@ if ($uid):
 
 			} else {
 				# This is a brand new package
-				$q = sprintf("INSERT INTO Packages (Name, License, Version, CategoryID, Description, URL, SubmittedTS, ModifiedTS, SubmitterUID, MaintainerUID) VALUES ('%s', '%s', '%s-%s', %d, '%s', '%s', UNIX_TIMESTAMP(), UNIX_TIMESTAMP(), %d, %d)",
+				$q = sprintf("INSERT INTO Packages (Name, License, Version, CategoryID, Description, URL, SubmittedTS, ModifiedTS, MaintainerUID) VALUES ('%s', '%s', '%s-%s', %d, '%s', '%s', UNIX_TIMESTAMP(), UNIX_TIMESTAMP(), %d)",
 					mysql_real_escape_string($new_pkgbuild['pkgname']),
 					mysql_real_escape_string($new_pkgbuild['license']),
 					mysql_real_escape_string($new_pkgbuild['pkgver']),
@@ -347,7 +347,6 @@ if ($uid):
 					mysql_real_escape_string($_REQUEST['category']),
 					mysql_real_escape_string($new_pkgbuild['pkgdesc']),
 					mysql_real_escape_string($new_pkgbuild['url']),
-					$uid,
 					$uid);
 
 				db_query($q, $dbh);
diff --git a/web/lib/pkgfuncs.inc b/web/lib/pkgfuncs.inc
index 7b43e45..c32037e 100644
--- a/web/lib/pkgfuncs.inc
+++ b/web/lib/pkgfuncs.inc
@@ -40,7 +40,7 @@ function canDeleteCommentArray($comment, $atype="", $uid=0) {
 
 # see if this Users.ID can manage the package
 #
-function canManagePackage($uid=0,$AURMUID=0, $MUID=0, $SUID=0, $managed=0) {
+function canManagePackage($uid=0,$AURMUID=0, $MUID=0, $managed=0) {
 	if (!$uid) {return 0;}
 
 	# The uid of the TU/Dev that manages the package
@@ -51,10 +51,6 @@ function canManagePackage($uid=0,$AURMUID=0, $MUID=0, $SUID=0, $managed=0) {
 	#
 	if ($uid == $MUID && !$managed) {return 1;}
 
-	# If the package isn't maintained by a TU/Dev, is this the user-submitter?
-	#
-	if ($uid == $SUID && !$managed) {return 1;}
-
 	# otherwise, no right to manage this package
 	#
 	return 0;
@@ -438,10 +434,6 @@ function pkg_search_page($SID="") {
 		if (isset($_GET["SeB"]) && $_GET["SeB"] == "m") {
 			$q_where .= "AND Users.Username = '".$_GET['K']."' ";
 		}
-		# Search by submitter
-		elseif (isset($_GET["SeB"]) && $_GET["SeB"] == "s") {
-			$q_where .= "AND SubmitterUID = ".uid_from_username($_GET['K'])." ";
-		}
 		# Search by name
 		elseif (isset($_GET["SeB"]) && $_GET["SeB"] == "n") {
 			$q_where .= "AND (Name LIKE '%".$_GET['K']."%') ";
diff --git a/web/template/pkg_details.php b/web/template/pkg_details.php
index 0658063..6fe0ec3 100644
--- a/web/template/pkg_details.php
+++ b/web/template/pkg_details.php
@@ -26,16 +26,6 @@ else {
 	$edit_cat = "<span class='f3'>Category: " . $row['Category'] . "</span>";
 }
 
-if ($row["SubmitterUID"]) {
-	$submitter = username_from_id($row["SubmitterUID"]);
-	if ($SID) {
-		$submitter = '<a href="account.php?Action=AccountInfo&ID=' . htmlspecialchars($row['SubmitterUID'], ENT_QUOTES) . '">' . htmlspecialchars($submitter) . '</a>';
-	}
-
-} else {
-	$submitter = "None";
-}
-
 if ($row["MaintainerUID"]) {
 	$maintainer = username_from_id($row["MaintainerUID"]);
 	if ($SID) {
@@ -74,7 +64,6 @@ $out_of_date_time = ($row["OutOfDateTS"] == 0) ? $msg : gmdate("r", intval($row[
 	<?php echo $edit_cat ?>
 
 	<p>
-	<span class='f3'><?php echo __('Submitter') .': ' . $submitter ?></span><br />
 	<span class='f3'><?php echo __('Maintainer') .': ' . $maintainer ?></span><br />
 	<span class='f3'><?php echo $votes ?></span>
 	</p>
-- 
1.7.2.5



More information about the aur-dev mailing list