Ticket #3667: suzuka-1.patch
File suzuka-1.patch, 1.3 KB (added by , 13 years ago) |
---|
-
bp-forums/bp-forums-functions.php
160 160 $r = wp_parse_args( $args, $defaults ); 161 161 extract( $r, EXTR_SKIP ); 162 162 163 // Check if the user is a spammer 164 if ( bp_core_is_user_spammer( $topic_poster ) || bp_core_is_user_deleted( $topic_poster ) ) 165 return false; 166 163 167 $topic_title = strip_tags( $topic_title ); 164 165 168 if ( empty( $topic_title ) || !strlen( trim( $topic_title ) ) ) 166 169 return false; 167 170 … … 195 198 $r = wp_parse_args( $args, $defaults ); 196 199 extract( $r, EXTR_SKIP ); 197 200 201 // Check if the user is a spammer 202 if ( bp_core_is_user_spammer( $bp->loggedin_user->id ) || bp_core_is_user_deleted( $bp->loggedin_user->id ) ) 203 return false; 204 198 205 // bb_insert_topic() will append tags, but not remove them. So we remove all existing tags. 199 206 bb_remove_topic_tags( $topic_id ); 200 207 … … 486 493 $r = wp_parse_args( $args, $defaults ); 487 494 extract( $r, EXTR_SKIP ); 488 495 496 // Check if the user is a spammer 497 if ( bp_core_is_user_spammer( $bp->loggedin_user->id ) || bp_core_is_user_deleted( $bp->loggedin_user->id ) ) 498 return false; 499 489 500 if ( !$post = bp_forums_get_post( $post_id ) ) 490 501 $post_id = false; 491 502