Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
06/29/2012 03:23:27 PM (8 years ago)
Author:
boonebgorges
Message:

Fixes fatal error in group invite notification when Settings is disabled

groups_notification_group_invites() assembles an email notification that
includes a link to the user settings page. This link cannot be directly
concatenated using bp_get_settings_slug(), since the latter function is not
defined when Settings is disabled.

Fixes #4311

Props Spitzohr

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.5/bp-groups/bp-groups-notifications.php

    r5801 r6148  
    219219            return false;
    220220
    221         $invited_ud = bp_core_get_core_userdata($invited_user_id);
    222 
    223         $settings_link = bp_core_get_user_domain( $invited_user_id ) . bp_get_settings_slug() . '/notifications/';
    224         $invited_link = bp_core_get_user_domain( $invited_user_id );
    225         $invites_link = $invited_link . bp_get_groups_slug() . '/invites';
     221        $invited_ud    = bp_core_get_core_userdata($invited_user_id);
     222        $settings_slug = function_exists( 'bp_get_settings_slug' ) ? bp_get_settings_slug() : 'settings';
     223        $settings_link = bp_core_get_user_domain( $invited_user_id ) . $settings_slug . '/notifications/';
     224        $invited_link  = bp_core_get_user_domain( $invited_user_id );
     225        $invites_link  = trailingslashit( $invited_link . bp_get_groups_slug() . '/invites' );
    226226
    227227        // Set up and send the message
Note: See TracChangeset for help on using the changeset viewer.