Skip to:
Content

bbPress.org

Changeset 2517


Ignore:
Timestamp:
07/27/2010 06:03:02 AM (16 years ago)
Author:
chrishajer
Message:

Add optional $user_id for subscriptions (useful for plugins). Further fixes #1268. Props dimadin

Location:
trunk/bb-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/bb-includes/functions.bb-meta.php

    r2516 r2517  
    297297                        break;
    298298                case 'version':
    299                         return '1.1-alpha-2516'; // Don't filter
     299                        return '1.1-alpha-2517'; // Don't filter
    300300                        break;
    301301                case 'bb_db_version' :
  • trunk/bb-includes/functions.bb-posts.php

    r2511 r2517  
    672672 * @param int $topic_id ID of topic for subscription
    673673 * @param string $new_status New subscription status
     674 * @param int $user_id Optional. ID of user for subscription
    674675 */
    675 function bb_subscription_management( $topic_id, $new_status ) {
     676function bb_subscription_management( $topic_id, $new_status, $user_id = '' ) {
    676677        global $bbdb, $wp_taxonomy_object;
    677678       
    678679        $topic = get_topic( $topic_id );
    679         $user_id = bb_get_current_user_info( 'id' );
     680        if (!$user_id) {
     681                $user_id = bb_get_current_user_info( 'id' );
     682        }
    680683       
    681684        do_action( 'bb_subscripton_management', $topic_id, $new_status, $user_id );
Note: See TracChangeset for help on using the changeset viewer.