Closed (fixed)
Project:
User Relationships
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
11 Sep 2007 at 04:54 UTC
Updated:
21 Sep 2007 at 17:03 UTC
Jump to comment: Most recent file
Comments
Comment #1
prfctns6@gmail.com commentedAttached is a patch that adds pagination to the pending relationships page. Two queries are performed, one for pending sent requests and one for pending received requests, and each are paged independently. The code uses the same user_relationships_relationships_per_page variable that controls the number of relationships to be shown on the relationships page(s).
Comment #2
prfctns6@gmail.com commentedPrevious patch had a stupid mistake in setting the page title. D'oh!
Comment #3
sprsquish commentedThe diff was based on version 1.6 of the _theme file. Most recent version is 1.8 and all changes were rejected by CVS. Please resubmit diffed to the most recent version.
Comment #4
sprsquish commentedack.. scratch that. I was looking at the wrong file
Comment #5
sprsquish commentedPatched.
I changed the code a lot; cleaned it up to make it easier to read, removed user_load.
The location and user of user_load would have created a potentially huge performance hit. It would have sent a DB request for every relationship request, loaded the user, then called the user hook for all modules probably creating another large set of DB requests. Since we really only need the data from the user table I joined that table to the query and faked the functionality of the user object within the relationship object. This means cutting the number of DB hits down to exactly two.
Comment #6
prfctns6@gmail.com commentedSweet - didn't know you could pass to theme_user an object was returned by user_load. Thanks for fixing that!