Skip to:
Content

BuddyPress.org

Ticket #5899: 5899.02.patch

File 5899.02.patch, 1.0 KB (added by imath, 12 years ago)
  • src/bp-members/bp-members-template.php

    diff --git src/bp-members/bp-members-template.php src/bp-members/bp-members-template.php
    index 4d3824f..a506d5a 100644
    function bp_signup_avatar_dir_value() {  
    16841684         * @return string
    16851685         */
    16861686        function bp_get_signup_avatar_dir_value() {
    1687                 global $bp;
     1687                $bp = buddypress();
    16881688
    16891689                // Check if signup_avatar_dir is passed
    1690                 if ( !empty( $_POST['signup_avatar_dir'] ) )
     1690                if ( ! empty( $_POST['signup_avatar_dir'] ) ) {
    16911691                        $signup_avatar_dir = $_POST['signup_avatar_dir'];
    16921692
    16931693                // If not, check if global is set
    1694                 elseif ( !empty( $bp->signup->avatar_dir ) )
     1694                } else if ( ! empty( $bp->signup->avatar_dir ) ) {
    16951695                        $signup_avatar_dir = $bp->signup->avatar_dir;
    16961696
    16971697                // If not, set false
    1698                 else
     1698                } else {
    16991699                        $signup_avatar_dir = false;
     1700                }
    17001701
    1701                 return apply_filters( 'bp_get_signup_avatar_dir_value', $bp->signup->avatar_dir );
     1702                return apply_filters( 'bp_get_signup_avatar_dir_value', $signup_avatar_dir );
    17021703        }
    17031704
    17041705/**