Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
02/03/2010 12:12:19 AM (16 years ago)
Author:
apeatling
Message:

Fixes #1708 - more extensible posting.

File:
1 edited

Legend:

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

    r2544 r2552  
    6969        }
    7070
    71         if ( (int)$_POST['group'] ) {
    72                 $activity_id = groups_post_update( array(
    73                         'content' => $_POST['content'],
    74                         'group_id' => $_POST['group']
    75                 ));
    76         } else {
     71        if ( empty( $_POST['object'] ) ) {
    7772                $activity_id = bp_activity_post_update( array(
    7873                        'content' => $_POST['content']
    7974                ));
     75        } elseif ( $_POST['object'] == 'groups' ) {
     76                if ( !empty( $_POST['item_id'] ) ) {
     77                $activity_id = groups_post_update( array(
     78                        'content' => $_POST['content'],
     79                                'group_id' => $_POST['item_id']
     80                ));
     81                }
     82        } else {
     83                $activity_id = apply_filters( 'bp_activity_custom_update', $_POST['object'], $_POST['item_id'], $_POST['content'] );
    8084        }
    8185
Note: See TracChangeset for help on using the changeset viewer.