[aur-dev] [PATCH 1/2] Remove unused canManagePackage() function
Signed-off-by: canyonknight <canyonknight@gmail.com> --- web/lib/pkgfuncs.inc.php | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/web/lib/pkgfuncs.inc.php b/web/lib/pkgfuncs.inc.php index b2daf0e..f0e64d2 100644 --- a/web/lib/pkgfuncs.inc.php +++ b/web/lib/pkgfuncs.inc.php @@ -40,28 +40,6 @@ function canDeleteCommentArray($comment, $atype="", $uid=0) { return FALSE; } -# see if this Users.ID can manage the package -# -function canManagePackage($uid=0,$AURMUID=0, $MUID=0, $SUID=0, $managed=0) { - if (!$uid) {return 0;} - - # The uid of the TU/Dev that manages the package - # - if ($uid == $AURMUID) {return 1;} - - # If the package isn't maintained by a TU/Dev, is this the user-maintainer? - # - 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; -} - # Check if the current user can submit blacklisted packages. # function canSubmitBlacklisted($atype = "") { -- 1.7.12
Signed-off-by: canyonknight <canyonknight@gmail.com> --- web/lib/pkgfuncs.inc.php | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/web/lib/pkgfuncs.inc.php b/web/lib/pkgfuncs.inc.php index f0e64d2..8208af0 100644 --- a/web/lib/pkgfuncs.inc.php +++ b/web/lib/pkgfuncs.inc.php @@ -281,29 +281,6 @@ function pkgvotes_from_sid($sid="", $dbh=NULL) { return $pkgs; } -# array of package ids that you're being notified for -# *yoink* -# -function pkgnotify_from_sid($sid="", $dbh=NULL) { - $pkgs = array(); - if (!$sid) {return $pkgs;} - if(!$dbh) { - $dbh = db_connect(); - } - $q = "SELECT PkgID "; - $q.= "FROM CommentNotify, Users, Sessions "; - $q.= "WHERE Users.ID = Sessions.UsersID "; - $q.= "AND Users.ID = CommentNotify.UserID "; - $q.= "AND Sessions.SessionID = " . $dbh->quote($sid); - $result = $dbh->query($q); - if ($result) { - while ($row = $result->fetch(PDO::FETCH_NUM)) { - $pkgs[$row[0]] = 1; - } - } - return $pkgs; -} - # get name of package based on pkgid # function pkgname_from_id($pkgids, $dbh=NULL) { -- 1.7.12
participants (1)
-
canyonknight