Skip to:
Content

BuddyPress.org

Changeset 12192


Ignore:
Timestamp:
07/20/2018 08:29:17 PM (7 years ago)
Author:
boonebgorges
Message:

Avoid the use of $this inside closures in Nouveau AJAX handlers.

This construction is not compatible with PHP 5.3.

Props r-a-y.
Fixes #7925.

Location:
trunk/src/bp-templates/bp-nouveau
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-templates/bp-nouveau/buddypress-functions.php

    r12156 r12192  
    9797            add_action( 'admin_init', function() {
    9898                if ( defined( 'DOING_AJAX' ) && true === DOING_AJAX ) {
    99                     require $this->includes_dir . 'ajax.php';
     99                    require bp_nouveau()->includes_dir . 'ajax.php';
    100100                }
    101101            }, 0 );
     
    104104        add_action( 'bp_customize_register', function() {
    105105            if ( bp_is_root_blog() && current_user_can( 'customize' ) ) {
    106                 require $this->includes_dir . 'customizer.php';
     106                require bp_nouveau()->includes_dir . 'customizer.php';
    107107            }
    108108        }, 0 );
  • trunk/src/bp-templates/bp-nouveau/includes/activity/loader.php

    r12082 r12192  
    5959                    ( false !== strpos( $_REQUEST['action'], 'activity' ) || ( 'post_update' === $_REQUEST['action'] ) )
    6060                ) {
    61                     require $this->dir . 'ajax.php';
     61                    require bp_nouveau()->activity->dir . 'ajax.php';
    6262                }
    6363            } );
  • trunk/src/bp-templates/bp-nouveau/includes/blogs/loader.php

    r11899 r12192  
    5353            add_action( 'admin_init', function() {
    5454                if ( defined( 'DOING_AJAX' ) && true === DOING_AJAX && 0 === strpos( $_REQUEST['action'], 'blogs_' ) ) {
    55                     require $this->dir . 'ajax.php';
     55                    require bp_nouveau()->blogs->dir . 'ajax.php';
    5656                }
    5757            } );
  • trunk/src/bp-templates/bp-nouveau/includes/friends/loader.php

    r12082 r12192  
    5151            add_action( 'admin_init', function() {
    5252                if ( defined( 'DOING_AJAX' ) && true === DOING_AJAX && 0 === strpos( $_REQUEST['action'], 'friends_' ) ) {
    53                     require $this->dir . 'ajax.php';
     53                    require bp_nouveau()->friends->dir . 'ajax.php';
    5454                }
    5555            } );
  • trunk/src/bp-templates/bp-nouveau/includes/groups/loader.php

    r12082 r12192  
    5656            add_action( 'admin_init', function() {
    5757                if ( defined( 'DOING_AJAX' ) && true === DOING_AJAX && 0 === strpos( $_REQUEST['action'], 'groups_' ) ) {
    58                     require $this->dir . 'ajax.php';
     58                    require bp_nouveau()->groups->dir . 'ajax.php';
    5959                }
    6060            } );
  • trunk/src/bp-templates/bp-nouveau/includes/messages/loader.php

    r12082 r12192  
    5454            add_action( 'admin_init', function() {
    5555                if ( defined( 'DOING_AJAX' ) && true === DOING_AJAX && 0 === strpos( $_REQUEST['action'], 'messages_' ) ) {
    56                     require $this->dir . 'ajax.php';
     56                    require bp_nouveau()->messages->dir . 'ajax.php';
    5757                }
    5858            } );
Note: See TracChangeset for help on using the changeset viewer.