Changeset 4232
- Timestamp:
- 04/22/2011 02:51:12 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-forums/bp-forums-screens.php
r4137 r4232 21 21 check_admin_referer( 'bp_forums_new_topic' ); 22 22 23 if ( $bp->groups->current_group = groups_get_group( array( 'group_id' => $_POST['topic_group_id'] ) ) ) { 23 $bp->groups->current_group = groups_get_group( array( 'group_id' => $_POST['topic_group_id'] ) ); 24 if ( !empty( $bp->groups->current_group->id ) ) { 24 25 // Auto join this user if they are not yet a member of this group 25 26 if ( !is_super_admin() && 'public' == $bp->groups->current_group->status && !groups_is_user_member( $bp->loggedin_user->id, $bp->groups->current_group->id ) ) … … 27 28 28 29 $error_message = ''; 29 if ( $forum_id = groups_get_groupmeta( $bp->groups->current_group->id, 'forum_id' ) ) { 30 31 $forum_id = groups_get_groupmeta( $bp->groups->current_group->id, 'forum_id' ); 32 if ( !empty( $forum_id ) ) { 30 33 if ( empty( $_POST['topic_title'] ) ) 31 34 $error_message = __( 'Please provide a title for your forum topic.', 'buddypress' ); … … 50 53 } else { 51 54 bp_core_add_message( __( 'Please pick the group forum where you would like to post this topic.', 'buddypress' ), 'error' ); 55 bp_core_redirect( add_query_arg( 'new', '', bp_get_forum_directory_permalink() ) ); 52 56 } 57 58 } else { 59 bp_core_add_message( __( 'Please pick the group forum where you would like to post this topic.', 'buddypress' ), 'error' ); 60 bp_core_redirect( add_query_arg( 'new', '', bp_get_forum_directory_permalink() ) ); 53 61 } 54 62 } -
trunk/bp-themes/bp-default/_inc/global.js
r4218 r4232 9 9 10 10 /* Hide Forums Post Form */ 11 if ( jq('div.forums').length )11 if ( '-1' == window.location.search.indexOf('new') && jq('div.forums').length ) 12 12 jq('div#new-topic-post').hide(); 13 else 14 jq('div#new-topic-post').show(); 13 15 14 16 /* Activity filter and scope set */ -
trunk/bp-themes/bp-default/forums/index.php
r4009 r4232 88 88 <?php do_action( 'bp_before_new_topic_form' ); ?> 89 89 90 <div id="new-topic-post" style="display: none;">90 <div id="new-topic-post"> 91 91 92 92 <?php if ( is_user_logged_in() ) : ?> … … 100 100 <a name="post-new"></a> 101 101 <h5><?php _e( 'Create New Topic:', 'buddypress' ); ?></h5> 102 103 <?php do_action( 'template_notices' ); ?> 102 104 103 105 <label><?php _e( 'Title:', 'buddypress' ); ?></label>
Note: See TracChangeset
for help on using the changeset viewer.