Skip to:
Content

Changeset 5296


Ignore:
Timestamp:
11/07/11 18:49:14 (2 years ago)
Author:
johnjamesjacoby
Message:

Add function_exists checks for bp_get_settings_slug() where needed. Fixes #3712.

Location:
trunk
Files:
5 edited

Legend:

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

    r5217 r5296  
    5454        $poster_name = bp_core_get_user_displayname( $activity->user_id ); 
    5555 
    56         $message_link = bp_activity_get_permalink( $activity_id ); 
    57         $settings_link = bp_core_get_user_domain( $receiver_user_id ) . bp_get_settings_slug() . '/notifications/'; 
     56        $message_link  = bp_activity_get_permalink( $activity_id ); 
     57        $settings_slug = function_exists( 'bp_get_settings_slug' ) ? bp_get_settings_slug() : 'settings'; 
     58        $settings_link = bp_core_get_user_domain( $receiver_user_id ) . $settings_slug . '/notifications/'; 
    5859 
    5960        $poster_name = stripslashes( $poster_name ); 
     
    139140 
    140141    if ( $original_activity->user_id != $commenter_id && 'no' != bp_get_user_meta( $original_activity->user_id, 'notification_activity_new_reply', true ) ) { 
    141         $poster_name = bp_core_get_user_displayname( $commenter_id ); 
    142         $thread_link = bp_activity_get_permalink( $activity_id ); 
    143         $settings_link = bp_core_get_user_domain( $original_activity->user_id ) . bp_get_settings_slug() . '/notifications/'; 
     142        $poster_name   = bp_core_get_user_displayname( $commenter_id ); 
     143        $thread_link   = bp_activity_get_permalink( $activity_id ); 
     144        $settings_slug = function_exists( 'bp_get_settings_slug' ) ? bp_get_settings_slug() : 'settings'; 
     145        $settings_link = bp_core_get_user_domain( $original_activity->user_id ) . $settings_slug . '/notifications/'; 
    144146 
    145147        $poster_name = stripslashes( $poster_name ); 
     
    184186 
    185187    if ( $parent_comment->user_id != $commenter_id && $original_activity->user_id != $parent_comment->user_id && 'no' != bp_get_user_meta( $parent_comment->user_id, 'notification_activity_new_reply', true ) ) { 
    186         $poster_name = bp_core_get_user_displayname( $commenter_id ); 
    187         $thread_link = bp_activity_get_permalink( $activity_id ); 
    188         $settings_link = bp_core_get_user_domain( $parent_comment->user_id ) . bp_get_settings_slug() . '/notifications/'; 
     188        $poster_name   = bp_core_get_user_displayname( $commenter_id ); 
     189        $thread_link   = bp_activity_get_permalink( $activity_id ); 
     190        $settings_slug = function_exists( 'bp_get_settings_slug' ) ? bp_get_settings_slug() : 'settings'; 
     191        $settings_link = bp_core_get_user_domain( $parent_comment->user_id ) . $settings_slug . '/notifications/'; 
    189192 
    190193        // Set up and send the message 
  • trunk/bp-core/deprecated/1.5.php

    r5294 r5296  
    322322            $poster_name = bp_core_get_user_displayname( $poster_user_id ); 
    323323 
    324             $message_link = bp_activity_get_permalink( $activity_id ); 
    325             $settings_link = bp_core_get_user_domain( $receiver_user_id ) . bp_get_settings_slug() . '/notifications/'; 
     324            $message_link  = bp_activity_get_permalink( $activity_id ); 
     325            $settings_slug = function_exists( 'bp_get_settings_slug' ) ? bp_get_settings_slug() : 'settings'; 
     326            $settings_link = bp_core_get_user_domain( $receiver_user_id ) . $settings_slug . '/notifications/'; 
    326327 
    327328            $poster_name = stripslashes( $poster_name ); 
  • trunk/bp-friends/bp-friends-notifications.php

    r4961 r5296  
    1515 
    1616    $all_requests_link = bp_core_get_user_domain( $friend_id ) . bp_get_friends_slug() . '/requests/'; 
    17     $settings_link = bp_core_get_user_domain( $friend_id ) .  bp_get_settings_slug() . '/notifications'; 
    18  
    19     $initiator_link = bp_core_get_user_domain( $initiator_id ); 
     17    $settings_slug    = function_exists( 'bp_get_settings_slug' ) ? bp_get_settings_slug() : 'settings'; 
     18    $settings_link    = bp_core_get_user_domain( $friend_id ) .  $settings_slug . '/notifications'; 
     19    $initiator_link   = bp_core_get_user_domain( $initiator_id ); 
    2020 
    2121    // Set up and send the message 
     
    5858    $ud = get_userdata( $initiator_id ); 
    5959 
    60     $friend_link = bp_core_get_user_domain( $friend_id ); 
    61     $settings_link = bp_core_get_user_domain( $initiator_id ) . bp_get_settings_slug() . '/notifications'; 
     60    $friend_link   = bp_core_get_user_domain( $friend_id ); 
     61    $settings_slug = function_exists( 'bp_get_settings_slug' ) ? bp_get_settings_slug() : 'settings'; 
     62    $settings_link = bp_core_get_user_domain( $initiator_id ) . $settings_slug . '/notifications'; 
    6263 
    6364    // Set up and send the message 
  • trunk/bp-groups/bp-groups-notifications.php

    r5215 r5296  
    1919        $to = $ud->user_email; 
    2020 
    21         $group_link = site_url( bp_get_groups_root_slug(). '/' . $group->slug ); 
    22         $settings_link = bp_core_get_user_domain( $user_id ) . bp_get_settings_slug() . '/notifications/'; 
     21        $group_link    = site_url( bp_get_groups_root_slug(). '/' . $group->slug ); 
     22        $settings_slug = function_exists( 'bp_get_settings_slug' ) ? bp_get_settings_slug() : 'settings'; 
     23        $settings_link = bp_core_get_user_domain( $user_id ) . $settings_slug . '/notifications/'; 
    2324 
    2425        $message = sprintf( __( 
     
    6061 
    6162    $group_requests = bp_get_group_permalink( $group ) . 'admin/membership-requests'; 
    62     $profile_link = bp_core_get_user_domain( $requesting_user_id ); 
    63     $settings_link = bp_core_get_user_domain( $requesting_user_id ) . bp_get_settings_slug() . '/notifications/'; 
     63    $profile_link   = bp_core_get_user_domain( $requesting_user_id ); 
     64    $settings_slug  = function_exists( 'bp_get_settings_slug' ) ? bp_get_settings_slug() : 'settings'; 
     65    $settings_link  = bp_core_get_user_domain( $requesting_user_id ) . $settings_slug . '/notifications/'; 
    6466 
    6567    // Set up and send the message 
     
    109111    $ud = bp_core_get_core_userdata($requesting_user_id); 
    110112 
    111     $group_link = bp_get_group_permalink( $group ); 
    112     $settings_link = bp_core_get_user_domain( $requesting_user_id ) . bp_get_settings_slug() . '/notifications/'; 
     113    $group_link   = bp_get_group_permalink( $group ); 
     114    $settings_slug = function_exists( 'bp_get_settings_slug' ) ? bp_get_settings_slug() : 'settings'; 
     115    $settings_link = bp_core_get_user_domain( $requesting_user_id ) . $settings_slug . '/notifications/'; 
    113116 
    114117    // Set up and send the message 
     
    166169        return false; 
    167170 
    168     $group = new BP_Groups_Group( $group_id ); 
    169     $ud = bp_core_get_core_userdata($user_id); 
    170  
    171     $group_link = bp_get_group_permalink( $group ); 
    172     $settings_link = bp_core_get_user_domain( $user_id ) . bp_get_settings_slug() . '/notifications/'; 
     171    $group         = new BP_Groups_Group( $group_id ); 
     172    $ud            = bp_core_get_core_userdata($user_id); 
     173    $group_link    = bp_get_group_permalink( $group ); 
     174    $settings_slug = function_exists( 'bp_get_settings_slug' ) ? bp_get_settings_slug() : 'settings'; 
     175    $settings_link = bp_core_get_user_domain( $user_id ) . $settings_slug . '/notifications/'; 
    173176 
    174177    // Set up and send the message 
  • trunk/bp-messages/bp-messages-notifications.php

    r4825 r5296  
    1818        $ud            = get_userdata( $recipient->user_id ); 
    1919        $message_link  = bp_core_get_user_domain( $recipient->user_id ) . bp_get_messages_slug() .'/'; 
    20         $settings_link = bp_core_get_user_domain( $recipient->user_id ) . bp_get_settings_slug() . '/notifications/'; 
     20        $settings_slug = function_exists( 'bp_get_settings_slug' ) ? bp_get_settings_slug() : 'settings'; 
     21        $settings_link = bp_core_get_user_domain( $recipient->user_id ) . $settings_slug . '/notifications/'; 
    2122 
    2223        // Sender info 
Note: See TracChangeset for help on using the changeset viewer.