Changeset 5706 for trunk/bp-themes/bp-default/_inc/ajax.php
- Timestamp:
- 02/11/2012 03:25:01 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-themes/bp-default/_inc/ajax.php
r5704 r5706 1 1 <?php 2 2 3 /*** 3 4 * AJAX Functions … … 107 108 // This function will load the activity loop template when activity is requested via AJAX 108 109 function bp_dtheme_activity_template_loader() { 109 global $bp;110 110 111 111 $scope = ''; … … 147 147 /* AJAX update posting */ 148 148 function bp_dtheme_post_update() { 149 global $bp;150 149 151 150 // Check the nonce … … 189 188 /* AJAX activity comment posting */ 190 189 function bp_dtheme_new_activity_comment() { 191 global $bp;192 190 193 191 // Check the nonce … … 246 244 /* AJAX delete an activity */ 247 245 function bp_dtheme_delete_activity() { 248 global $bp;249 246 250 247 // Check the nonce … … 285 282 /* AJAX delete an activity comment */ 286 283 function bp_dtheme_delete_activity_comment() { 287 global $bp; 288 289 /* Check the nonce */ 284 285 // Check the nonce 290 286 check_admin_referer( 'bp_activity_delete_link' ); 291 287 … … 368 364 /* AJAX mark an activity as a favorite */ 369 365 function bp_dtheme_mark_activity_favorite() { 370 global $bp;371 366 372 367 bp_activity_add_user_favorite( $_POST['id'] ); … … 377 372 /* AJAX mark an activity as not a favorite */ 378 373 function bp_dtheme_unmark_activity_favorite() { 379 global $bp;380 374 381 375 bp_activity_remove_user_favorite( $_POST['id'] ); … … 414 408 /* AJAX invite a friend to a group functionality */ 415 409 function bp_dtheme_ajax_invite_user() { 416 global $bp;417 410 418 411 check_ajax_referer( 'groups_invite_uninvite_user' ); … … 458 451 /* AJAX add/remove a user as a friend when clicking the button */ 459 452 function bp_dtheme_ajax_addremove_friend() { 460 global $bp;461 453 462 454 if ( 'is_friend' == BP_Friends_Friendship::check_is_friend( bp_loggedin_user_id(), $_POST['fid'] ) ) { … … 511 503 /* AJAX join or leave a group when clicking the "join/leave" button */ 512 504 function bp_dtheme_ajax_joinleave_group() { 513 global $bp;514 505 515 506 if ( groups_is_user_banned( bp_loggedin_user_id(), $_POST['gid'] ) ) … … 613 604 /* AJAX mark a private message as unread in your inbox */ 614 605 function bp_dtheme_ajax_message_markunread() { 615 global $bp;616 606 617 607 if ( !isset($_POST['thread_ids']) ) { … … 629 619 /* AJAX mark a private message as read in your inbox */ 630 620 function bp_dtheme_ajax_message_markread() { 631 global $bp;632 621 633 622 if ( !isset($_POST['thread_ids']) ) { … … 645 634 /* AJAX delete a private message or array of messages in your inbox */ 646 635 function bp_dtheme_ajax_messages_delete() { 647 global $bp;648 636 649 637 if ( !isset($_POST['thread_ids']) ) { … … 672 660 673 661 // 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() ) ) 675 663 $autocomplete_all = $bp->messages->autocomplete_all; 676 664 677 $friends = false;678 665 $pag_page = 1; 679 666
Note: See TracChangeset
for help on using the changeset viewer.