Skip to:
Content

BuddyPress.org

Changeset 6981


Ignore:
Timestamp:
05/01/2013 01:48:00 PM (12 years ago)
Author:
boonebgorges
Message:

Coding standards in bp_activity_action_permalink_router()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-activity/bp-activity-actions.php

    r6980 r6981  
    4646 */
    4747function bp_activity_action_permalink_router() {
    48     global $bp;
    4948
    5049    // Not viewing activity
    51     if ( !bp_is_activity_component() || !bp_is_current_action( 'p' ) )
     50    if ( ! bp_is_activity_component() || ! bp_is_current_action( 'p' ) )
    5251        return false;
    5352
    5453    // No activity to display
    55     if ( !bp_action_variable( 0 ) || !is_numeric( bp_action_variable( 0 ) ) )
     54    if ( ! bp_action_variable( 0 ) || ! is_numeric( bp_action_variable( 0 ) ) )
    5655        return false;
    5756
     
    6362        bp_do_404();
    6463        return;
    65 
    6664    } else {
    6765        $activity = $activity['activities'][0];
     
    7270
    7371    // Redirect based on the type of activity
    74     if ( bp_is_active( 'groups' ) && $activity->component == $bp->groups->id ) {
     72    if ( bp_is_active( 'groups' ) && $activity->component == buddypress()->groups->id ) {
    7573
    7674        // Activity is a user update
    77         if ( !empty( $activity->user_id ) ) {
     75        if ( ! empty( $activity->user_id ) ) {
    7876            $redirect = bp_core_get_user_domain( $activity->user_id, $activity->user_nicename, $activity->user_login ) . bp_get_activity_slug() . '/' . $activity->id . '/';
    7977
     
    9391
    9492    // If set, add the original query string back onto the redirect URL
    95     if ( !empty( $_SERVER['QUERY_STRING'] ) ) {
     93    if ( ! empty( $_SERVER['QUERY_STRING'] ) ) {
    9694        $query_frags = array();
    9795        wp_parse_str( $_SERVER['QUERY_STRING'], $query_frags );
     
    10098
    10199    // Allow redirect to be filtered
    102     if ( !$redirect = apply_filters_ref_array( 'bp_activity_permalink_redirect_url', array( $redirect, &$activity ) ) )
     100    if ( ! $redirect = apply_filters_ref_array( 'bp_activity_permalink_redirect_url', array( $redirect, &$activity ) ) ) {
    103101        bp_core_redirect( bp_get_root_domain() );
     102    }
    104103
    105104    // Redirect to the actual activity permalink page
Note: See TracChangeset for help on using the changeset viewer.