Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
02/11/2012 03:25:01 AM (13 years ago)
Author:
johnjamesjacoby
Message:

Remove unused $bp globals from bp-default's ajax.php. See #3989.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-themes/bp-default/_inc/ajax.php

    r5704 r5706  
    11<?php
     2
    23/***
    34 * AJAX Functions
     
    107108// This function will load the activity loop template when activity is requested via AJAX
    108109function bp_dtheme_activity_template_loader() {
    109     global $bp;
    110110
    111111    $scope = '';
     
    147147/* AJAX update posting */
    148148function bp_dtheme_post_update() {
    149     global $bp;
    150149
    151150    // Check the nonce
     
    189188/* AJAX activity comment posting */
    190189function bp_dtheme_new_activity_comment() {
    191     global $bp;
    192190
    193191    // Check the nonce
     
    246244/* AJAX delete an activity */
    247245function bp_dtheme_delete_activity() {
    248     global $bp;
    249246
    250247    // Check the nonce
     
    285282/* AJAX delete an activity comment */
    286283function bp_dtheme_delete_activity_comment() {
    287     global $bp;
    288 
    289     /* Check the nonce */
     284
     285    // Check the nonce
    290286    check_admin_referer( 'bp_activity_delete_link' );
    291287
     
    368364/* AJAX mark an activity as a favorite */
    369365function bp_dtheme_mark_activity_favorite() {
    370     global $bp;
    371366
    372367    bp_activity_add_user_favorite( $_POST['id'] );
     
    377372/* AJAX mark an activity as not a favorite */
    378373function bp_dtheme_unmark_activity_favorite() {
    379     global $bp;
    380374
    381375    bp_activity_remove_user_favorite( $_POST['id'] );
     
    414408/* AJAX invite a friend to a group functionality */
    415409function bp_dtheme_ajax_invite_user() {
    416     global $bp;
    417410
    418411    check_ajax_referer( 'groups_invite_uninvite_user' );
     
    458451/* AJAX add/remove a user as a friend when clicking the button */
    459452function bp_dtheme_ajax_addremove_friend() {
    460     global $bp;
    461453
    462454    if ( 'is_friend' == BP_Friends_Friendship::check_is_friend( bp_loggedin_user_id(), $_POST['fid'] ) ) {
     
    511503/* AJAX join or leave a group when clicking the "join/leave" button */
    512504function bp_dtheme_ajax_joinleave_group() {
    513     global $bp;
    514505
    515506    if ( groups_is_user_banned( bp_loggedin_user_id(), $_POST['gid'] ) )
     
    613604/* AJAX mark a private message as unread in your inbox */
    614605function bp_dtheme_ajax_message_markunread() {
    615     global $bp;
    616606
    617607    if ( !isset($_POST['thread_ids']) ) {
     
    629619/* AJAX mark a private message as read in your inbox */
    630620function bp_dtheme_ajax_message_markread() {
    631     global $bp;
    632621
    633622    if ( !isset($_POST['thread_ids']) ) {
     
    645634/* AJAX delete a private message or array of messages in your inbox */
    646635function bp_dtheme_ajax_messages_delete() {
    647     global $bp;
    648636
    649637    if ( !isset($_POST['thread_ids']) ) {
     
    672660
    673661    // Include everyone in the autocomplete, or just friends?
    674     if ( $bp->messages->slug == $bp->current_component )
     662    if ( bp_is_current_component( bp_get_messages_slug() ) )
    675663        $autocomplete_all = $bp->messages->autocomplete_all;
    676664
    677     $friends  = false;
    678665    $pag_page = 1;
    679666
Note: See TracChangeset for help on using the changeset viewer.