Skip to:
Content

BuddyPress.org

Ticket #5077: 5077.diff

File 5077.diff, 1.9 KB (added by imath, 12 years ago)
  • bp-themes/bp-default/_inc/global.js

     
    10081008                                jq(parentdiv).fadeOut(200,
    10091009                                        function() {
    10101010                                                parentdiv.fadeIn(200).html(response);
     1011                                                // hidden groups slide up
     1012                                                if( thelink.hasClass( 'leave-group' ) && parentdiv.hasClass( 'hidden' ) )
     1013                                                        parentdiv.parent().parent().slideUp( 200 );
    10111014                                        }
    10121015                                        );
    10131016                        }
  • bp-templates/bp-legacy/js/buddypress.js

     
    10371037                                jq(parentdiv).fadeOut(200,
    10381038                                        function() {
    10391039                                                parentdiv.fadeIn(200).html(response);
     1040                                                // hidden groups slide up
     1041                                                if( thelink.hasClass( 'leave-group' ) && parentdiv.hasClass( 'hidden' ) )
     1042                                                        parentdiv.parent().parent().slideUp( 200 );
    10401043                                        }
    10411044                                        );
    10421045                        }
  • bp-groups/bp-groups-actions.php

     
    258258                        bp_core_add_message( __( 'There was an error leaving the group.', 'buddypress' ), 'error' );
    259259                else
    260260                        bp_core_add_message( __( 'You successfully left the group.', 'buddypress' ) );
     261                       
     262                $redirect = bp_get_group_permalink( $bp->groups->current_group );
     263               
     264                if( 'hidden' == $bp->groups->current_group->status )
     265                        $redirect = trailingslashit( bp_loggedin_user_domain() . bp_get_groups_slug() );
    261266
    262                 bp_core_redirect( bp_get_group_permalink( $bp->groups->current_group ) );
     267                bp_core_redirect( $redirect );
    263268        }
    264269
    265270        bp_core_load_template( apply_filters( 'groups_template_group_home', 'groups/single/home' ) );