Changeset 2239 for trunk/bp-forums.php
- Timestamp:
- 01/01/2010 04:01:13 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/bp-forums.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-forums.php
r2195 r2239 68 68 check_admin_referer( 'bp_forums_new_topic' ); 69 69 70 if ( $ group = groups_get_group( array( 'group_id' => $_POST['topic_group_id'] ) ) ) {70 if ( $bp->groups->current_group = groups_get_group( array( 'group_id' => $_POST['topic_group_id'] ) ) ) { 71 71 /* Auto join this user if they are not yet a member of this group */ 72 if ( !is_site_admin() && 'public' == $ group->status && !groups_is_user_member( $bp->loggedin_user->id, $group->id ) )73 groups_join_group( $ group->id, $group->id );74 75 if ( $forum_id = groups_get_groupmeta( $ group->id, 'forum_id' ) ) {72 if ( !is_site_admin() && 'public' == $bp->groups->current_group->status && !groups_is_user_member( $bp->loggedin_user->id, $bp->groups->current_group->id ) ) 73 groups_join_group( $bp->groups->current_group->id, $bp->groups->current_group->id ); 74 75 if ( $forum_id = groups_get_groupmeta( $bp->groups->current_group->id, 'forum_id' ) ) { 76 76 if ( !$topic = groups_new_group_forum_topic( $_POST['topic_title'], $_POST['topic_text'], $_POST['topic_tags'], $forum_id ) ) 77 77 bp_core_add_message( __( 'There was an error when creating the topic', 'buddypress'), 'error' ); … … 79 79 bp_core_add_message( __( 'The topic was created successfully', 'buddypress') ); 80 80 81 bp_core_redirect( bp_get_group_permalink( $ group ) . '/forum/topic/' . $topic->topic_slug . '/' );81 bp_core_redirect( bp_get_group_permalink( $bp->groups->current_group ) . '/forum/topic/' . $topic->topic_slug . '/' ); 82 82 } 83 83 }
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)