Skip to:
Content

BuddyPress.org

Changeset 7547


Ignore:
Timestamp:
11/09/2013 03:46:13 PM (13 years ago)
Author:
johnjamesjacoby
Message:

Ensure when users with bp_moderate capability navigate to other user's notifications, the correct notifications are shown. See #5148.

File:
1 edited

Legend:

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

    r7543 r7547  
    234234                // Setup variables
    235235                $this->pag_page     = isset( $_GET[ $r['page_arg'] ] ) ? intval( $_GET[ $r['page_arg'] ] ) : $r['page'];
    236                 $this->pag_num      = isset( $_GET['num'] ) ? intval( $_GET['num'] ) : $r['per_page'];
     236                $this->pag_num      = isset( $_GET['num']            ) ? intval( $_GET['num']            ) : $r['per_page'];
    237237                $this->user_id      = $r['user_id'];
    238238                $this->is_new       = $r['is_new'];
     
    415415        }
    416416
     417        // Get the user ID
     418        if ( bp_displayed_user_id() ) {
     419                $user_id = bp_displayed_user_id();
     420        } else {
     421                $user_id = bp_loggedin_user_id();
     422        }
     423
    417424        // Parse the args
    418425        $r = wp_parse_args( $args, array(
    419                 'user_id'      => bp_loggedin_user_id(),
     426                'user_id'      => $user_id,
    420427                'is_new'       => $is_new,
    421428                'page'         => 1,
Note: See TracChangeset for help on using the changeset viewer.