[buddypress-trac] [BuddyPress] #4600: children of activity comments not populated with BP_Activity_Activity::get()
buddypress-trac
noreply at wordpress.org
Wed Oct 24 00:43:33 UTC 2012
#4600: children of activity comments not populated with
BP_Activity_Activity::get()
--------------------------+-----------------------
Reporter: sboisvert | Owner:
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: 1.7
Component: Activity | Version: 1.7
Severity: minor | Resolution:
Keywords: |
--------------------------+-----------------------
Comment (by sboisvert):
I think I might of come to the root of the problem uncovered by r-a-y of
the child comments finding themselves.
The way we find child comments is by looking for items that have lefts
that are in between the left and the right of that node and whose top
level parent is the same as our node.
The reason we were pulling ourselves in the query is that the SQL BETWEEN
word uses the >= logic and not > logic therefore when we ask it to find
values between the left and the right of our node, our node shows up since
its >= in the between.
Changing from
{{{
AND a.mptt_left BETWEEN %d AND %d
}}}
to
{{{
AND a.mptt_left > %d AND a.mptt_left < %d
}}}
Should fix that. That seems to be working and then we don't need to add a
if inside our loop.
Thoughts?
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/4600#comment:12>
BuddyPress <http://buddypress.org/>
BuddyPress
More information about the buddypress-trac
mailing list