The _user_relationships_generate_query() function does not put parens around the (ur.requester_id = %d AND ur.requestee_id = %d) OR (ur.requestee_id = %d AND ur.requester_id = %d) condition it generates when passed the 'between' parameter. This means that if you pass other criteria in addition to the 'between' parameter, the generated SQL associates the OR with other elements of the WHERE clause, resulting in incorrect results.
I've attached a patch that puts parens around the condition generated by 'between'.
| Comment | File | Size | Author |
|---|---|---|---|
| ur_load_rels_between.patch | 902 bytes | prfctns6@gmail.com |
Comments
Comment #1
sprsquish commented@JBChristy you asked me if there were differences between head and DRUPAL-5--2. Well, this was one of them. Sorry for the confusion.