Skip to:
Content

BuddyPress.org

Changeset 1214


Ignore:
Timestamp:
03/16/2009 11:42:05 AM (15 years ago)
Author:
apeatling
Message:

Fixes #588

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-forums/bp-forums-templatetags.php

    r1145 r1214  
    9292}
    9393
    94 function bp_has_topics( $topics_per_page = 10 ) {
     94function bp_has_topics( $topics_per_page = 10, $forum_id = false ) {
    9595    global $forum_template, $bp;
    9696    global $group_obj;
    9797   
    98     $forum_id = groups_get_groupmeta( $group_obj->id, 'forum_id' );
     98    if ( !$forum_id )
     99        $forum_id = groups_get_groupmeta( $group_obj->id, 'forum_id' );
    99100
    100101    if ( is_numeric( $forum_id ) )
     
    367368}
    368369
    369 function bp_has_topic_posts( $posts_per_page = 10 ) {
     370function bp_has_topic_posts( $posts_per_page = 10, $topic_id = false ) {
    370371    global $topic_template, $bp;
    371     global $group_obj;
    372    
    373     $topic_id = $bp->action_variables[1];
     372   
     373    if ( !$topic_id )
     374        $topic_id = $bp->action_variables[1];
    374375
    375376    if ( is_numeric( $topic_id ) )
Note: See TracChangeset for help on using the changeset viewer.