Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/14/2011 05:19:12 AM (13 years ago)
Author:
johnjamesjacoby
Message:

Find/replace on is_super_admin() to use bp_current_user_can( 'bp_moderate' ). See #3740.

File:
1 edited

Legend:

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

    r5302 r5329  
    154154            } else {
    155155                // For forum directories (All Topics), get a true count
    156                 $status = is_super_admin() ? 'all' : 'public'; // todo: member-of
     156                $status = bp_current_user_can( 'bp_moderate' ) ? 'all' : 'public'; // todo: member-of
    157157                $topic_count = (int)groups_total_forum_topic_count( $status, $search_terms );
    158158            }
     
    792792        $links[] = '<a href="' . wp_nonce_url( bp_get_the_topic_permalink() . 'edit', 'bp_forums_edit_topic' ) . '">' . __( 'Edit Topic', 'buddypress' ) . '</a>';
    793793
    794         if ( $bp->is_item_admin || $bp->is_item_mod || is_super_admin() ) {
     794        if ( $bp->is_item_admin || $bp->is_item_mod || bp_current_user_can( 'bp_moderate' ) ) {
    795795            if ( 0 == (int)$forum_template->topic->topic_sticky )
    796796                $links[] = '<a href="' . wp_nonce_url( bp_get_the_topic_permalink() . 'stick', 'bp_forums_stick_topic' ) . '">' . __( 'Sticky Topic', 'buddypress' ) . '</a>';
Note: See TracChangeset for help on using the changeset viewer.