Changeset 6741
- Timestamp:
- 11/17/2017 08:51:34 PM (8 years ago)
- Location:
- trunk/src/includes
- Files:
-
- 2 edited
-
common/functions.php (modified) (2 diffs)
-
users/template.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/common/functions.php
r6738 r6741 649 649 // Set clauses 650 650 $join = $clauses['join']; 651 $where = $clauses['where']; 651 652 // "%" and "$" are valid characters 653 $where = $bbp_db->remove_placeholder_escape( $clauses['where'] ); 652 654 } 653 655 } … … 660 662 661 663 // Prepare duplicate check query 662 $query = $bbp_db->prepare( "SELECT ID FROM {$bbp_db->posts} {$join} WHERE post_type = %s AND post_status != %s AND post_author = %d AND post_content = %s {$where}", $r['post_type'], $r['post_status'], $r['post_author'], $r['post_content'] ); 663 $query .= ! empty( $r['post_parent'] ) ? $bbp_db->prepare( " AND post_parent = %d", $r['post_parent'] ) : ''; 664 $query = "SELECT ID FROM {$bbp_db->posts} {$join}"; 665 $query = $bbp_db->prepare( "WHERE post_type = %s AND post_status != %s AND post_author = %d AND post_content = %s", $r['post_type'], $r['post_status'], $r['post_author'], $r['post_content'] ); 666 $query .= ! empty( $r['post_parent'] ) 667 ? $bbp_db->prepare( " AND post_parent = %d", $r['post_parent'] ) 668 : ''; 669 $query .= $where; 664 670 $query .= " LIMIT 1"; 665 671 $dupe = apply_filters( 'bbp_check_for_duplicate_query', $query, $r ); -
trunk/src/includes/users/template.php
r6737 r6741 815 815 */ 816 816 function bbp_author_display_name( $post_id = 0 ) { 817 echo bbp_get_author_display_name( $post_id);817 echo esc_attr( bbp_get_author_display_name( $post_id ) ); 818 818 } 819 819 … … 865 865 */ 866 866 function bbp_author_email( $post_id = 0 ) { 867 echo bbp_get_author_email( $post_id);867 echo esc_attr( bbp_get_author_email( $post_id ) ); 868 868 } 869 869 … … 896 896 // Not an edit, so rely on current user cookie data 897 897 } else { 898 $retval = bbp_ current_anonymous_user_data( 'email' );898 $retval = bbp_get_current_anonymous_user_data( 'email' ); 899 899 } 900 900
Note: See TracChangeset
for help on using the changeset viewer.