[buddypress-trac] [BuddyPress] #4589: Group Membership Request Pagination missing
buddypress-trac at lists.automattic.com
buddypress-trac at lists.automattic.com
Wed Oct 10 14:51:46 UTC 2012
#4589: Group Membership Request Pagination missing
--------------------------+-----------------------------
Reporter: simplyletgo | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Groups | Version: 1.6.1
Severity: normal | Keywords:
--------------------------+-----------------------------
Hello, I recently encountered a problem where as a 'Group Administrator' I
went to view membership requests, and only was able to view 10 of the
requests (there were over 40 in actuality). Easiest way to replicate this
is to just make a group and then have 11 or more people request membership
to the group and then as 'Group Administer' go to 'Group Name' -> 'Admin'
-> 'Requests'. You will only see 10 of the total requests.
After digging around the code a bit I found that it appeared the
pagination of group membership requests was half implemented.
If you look at the class BP_Groups_Membership_Requests_Template:
/buddypress/bp-groups/bp-groups-template.php (line:2447)
You can see that the class has variables that it initializes related to
pagination ($pag_page, $pag_num...). These variables are initialized to
determine what set of requests to display on a page (10 per page). By
default, these vars are set to initialize as 'page 1' (entries 1-10) if
nothing is passed in from $_REQUEST\['mrpage'\] or $_REQUEST\['num'\]
(line: 2462).
However, this class does not have any support functions for outputting
links to other pages (like bp_group_member_pagination() does for class
BP_Groups_Group_Members_Template).
Also, the default Buddypress Theme does not attempt to output pagination
links for Group Membership Requests (see buddypress/bp-themes/bp-
default/groups/single/admin.php line: 301). Instead, just the first 10
entries are given, with no options to see the rest of the requests (if
there are more than 10).
For the site I'm managing, I implemented the pagination functions
similarly to how its handled for other classes. I've attached both the
original files (bp-groups-template.php-orig and admin.php-orig) as well as
the ones I updated (bp-groups-template.php-modified and admin.php-
modified). I'm not very knowledgeable about open source permission
procedures, but you certainly able to use the changes I made.
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/4589>
BuddyPress <http://buddypress.org/>
BuddyPress
More information about the buddypress-trac
mailing list