Changeset 6342 for trunk/bp-forums/bp-forums-functions.php
- Timestamp:
- 09/18/2012 06:03:00 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-forums/bp-forums-functions.php
r6259 r6342 243 243 extract( $r, EXTR_SKIP ); 244 244 245 // Check if the user is a spammer 246 if ( bp_is_user_inactive( bp_loggedin_user_id() ) ) 245 // Check if the user is a spammer 246 if ( bp_is_user_inactive( bp_loggedin_user_id() ) ) 247 247 return false; 248 248 … … 354 354 function bp_forums_reply_exists( $text = '', $topic_id = 0, $user_id = 0 ) { 355 355 $reply_exists = false; 356 356 357 357 if ( $text && $topic_id && $user_id ) { 358 358 do_action( 'bbpress_init' ); 359 359 360 360 $args = array( 361 361 'post_author_id' => $user_id, 362 362 'topic_id' => $topic_id 363 363 ); 364 364 365 365 // BB_Query's post_text parameter does a MATCH, while we need exact matches 366 366 add_filter( 'get_posts_where', create_function( '$q', 'return $q . " AND p.post_text = \'' . $text . '\'";' ) ); 367 367 368 368 $query = new BB_Query( 'post', $args ); 369 369 370 370 $reply_exists = !empty( $query->results ); 371 371 } 372 372 373 373 return apply_filters( 'bp_forums_reply_exists', $reply_exists, $text, $topic_id, $user_id ); 374 374 } … … 747 747 bb_update_postmeta( $id, $cachekey, $cache ); 748 748 } 749 ?>
Note: See TracChangeset
for help on using the changeset viewer.