Skip to:
Content

BuddyPress.org

Changeset 8443


Ignore:
Timestamp:
05/22/2014 06:31:21 PM (10 years ago)
Author:
johnjamesjacoby
Message:

Add missing $notice to suppress debug notices. Remove trailing whitespace and a few more code-clean-up bits. Props imath. See #5623.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-members/bp-members-admin.php

    r8441 r8443  
    115115
    116116        // The current user id
    117         $this->current_user_id = get_current_user_id(); 
     117        $this->current_user_id = get_current_user_id();
    118118
    119119        // The user id being edited
     
    205205     *
    206206     * Look for $_GET['user_id']. If anything else, force the user ID to the
    207      * current user's ID so they aren't left without a user to edit. 
     207     * current user's ID so they aren't left without a user to edit.
    208208     *
    209209     * @since BuddyPress (2.1.0)
     
    230230    /**
    231231     * Can the current user edit the one displayed
    232      * 
     232     *
    233233     * self profile editing / or bp_moderate check.
    234234     * This might be replaced by more granular capabilities
     
    267267    private function get_user_notice() {
    268268
     269        // Setup empty notice for return value
     270        $notice = array();
     271
     272        // Updates
    269273        if ( ! empty( $_REQUEST['updated'] ) ) {
    270274            switch ( $_REQUEST['updated'] ) {
     
    296300        }
    297301
     302        // Errors
    298303        if ( ! empty( $_REQUEST['error'] ) ) {
    299304            switch ( $_REQUEST['error'] ) {
     
    451456        foreach ( $page_head as $head ) {
    452457            add_action( "admin_head-{$head}", array( $this, 'profile_admin_head' ) );
    453         }       
     458        }
    454459    }
    455460
     
    763768
    764769        // Construct URL for form
    765         $form_url        = remove_query_arg( array( 'action', 'error', 'updated', 'spam', 'ham' ), $_SERVER['REQUEST_URI'] );
    766         $form_url        = add_query_arg( 'action', 'update', $form_url );
     770        $request_url     = remove_query_arg( array( 'action', 'error', 'updated', 'spam', 'ham' ), $_SERVER['REQUEST_URI'] );
     771        $form_action_url = add_query_arg( 'action', 'update', $request_url );
    767772        $wp_http_referer = false;
    768773        if ( ! empty( $_REQUEST['wp_http_referer'] ) ) {
     
    812817                $this->profile_nav( $user, 'BuddyPress' ); ?>
    813818
    814                 <form action="<?php echo esc_url( $form_url ); ?>" id="your-profile" method="post">
     819                <form action="<?php echo esc_url( $form_action_url ); ?>" id="your-profile" method="post">
    815820                    <div id="poststuff">
    816821
     
    10441049    /**
    10451050     * Add a filter to edit profile url in WP Admin Bar
    1046      * 
     1051     *
    10471052     * @access public
    10481053     * @since BuddyPress (2.1.0)
     
    10541059    /**
    10551060     * Filter the profile url
    1056      * 
     1061     *
    10571062     * @access public
    10581063     * @since BuddyPress (2.1.0)
    1059      * 
     1064     *
    10601065     * @uses  user_admin_url()
    10611066     */
     
    10691074    /**
    10701075     * Remove the filter to edit profile url in WP Admin Bar
    1071      * 
     1076     *
    10721077     * @access public
    10731078     * @since BuddyPress (2.1.0)
     
    13871392        $notice = array();
    13881393
    1389         // Updated
     1394        // Updates
    13901395        if ( ! empty( $_REQUEST['updated'] ) ) {
    13911396            switch ( $_REQUEST['updated'] ) {
     
    14941499        }
    14951500
    1496         // Process error messages
     1501        // Errors
    14971502        if ( ! empty( $_REQUEST['error'] ) ) {
    14981503            switch ( $_REQUEST['error'] ) {
Note: See TracChangeset for help on using the changeset viewer.