Skip to:
Content

BuddyPress.org

Ticket #7324: 7324.patch

File 7324.patch, 1.1 KB (added by slaFFik, 5 years ago)

Removed some code cleanup

  • src/bp-templates/bp-legacy/buddypress-functions.php

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
     
    11031103        // Check the nonce.
    11041104        check_admin_referer( 'bp_activity_delete_link' );
    11051105
    1106         if ( ! is_user_logged_in() )
     1106        if ( empty( $_POST['id'] ) || ! is_numeric( $_POST['id'] ) ) {
    11071107                exit( '-1' );
     1108        }
     1109
     1110        if ( ! is_user_logged_in() ) {
     1111                exit( '-1' );
     1112        }
    11081113
    11091114        $comment = new BP_Activity_Activity( $_POST['id'] );
    11101115
    11111116        // Check access.
    11121117        if ( ! bp_current_user_can( 'bp_moderate' ) && $comment->user_id != bp_loggedin_user_id() )
    11131118                exit( '-1' );
    1114 
    1115         if ( empty( $_POST['id'] ) || ! is_numeric( $_POST['id'] ) )
    1116                 exit( '-1' );
    11171119
    11181120        /** This action is documented in bp-activity/bp-activity-actions.php */
    11191121        do_action( 'bp_activity_before_action_delete_activity', $_POST['id'], $comment->user_id );