Re: hooking a function makes mysql query to return empty
When I tried this (not using a manual call), it seemed that $limit was being passed something, but it wasn’t numeric. So I added in before the global
line:
if (!is_numeric($limit))
$limit = 5;
I also changed $query_recent_replies to:
$query_recent_replies = "SELECT * FROM $bbdb->topics JOIN $bbdb->posts ON $bbdb->topics.topic_id = $bbdb->posts.topic_id $where ORDER BY post_time DESC LIMIT $limit";
and first echo inside the foreach to:
echo "n<li>". bb_get_profile_link( array( 'id' => $recent_reply->poster_id, 'text' => get_user_display_name( $recent_reply->poster_id ) ) ) . ' on <a href="' . get_topic_link($recent_reply->topic_id);
but that’s more just my idea of cleaner code