Making WordPress.org


Ignore:
Timestamp:
09/05/2016 08:22:29 PM (9 years ago)
Author:
jmdodd
Message:

Support Forums: Use INNER JOIN instead of JOIN on the ratings table.

Fix viewing description so it isn't cut off on the right-hand side.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-ratings-compat.php

    r3966 r3969  
    6262        global $wpdb;
    6363
    64         $clauses['join']  .= " JOIN ratings ON ( $wpdb->posts.ID = ratings.post_id )";
     64        $clauses['join']  .= " INNER JOIN ratings ON ( $wpdb->posts.ID = ratings.post_id )";
    6565        $clauses['where'] .= $wpdb->prepare( " AND ratings.rating = %d", $this->filter );
    6666
     
    173173    $filter = isset( $_GET['filter'] ) ? absint( $_GET['filter'] ) : 0;
    174174    if ( $filter > 0 && $filter < 6 ) {
    175         echo '<div class="col-10 reviews-filtered-msg" style="font-style:italic;margin-top:24px;">';
     175        echo '<div class="col-9 reviews-filtered-msg" style="font-style:italic;margin-top:24px;">';
    176176        printf(
    177177            _n( 'You are currently viewing the reviews that provided a rating of <strong>%d star</strong>. <a href="%s">Click here</a> to see all reviews.',
Note: See TracChangeset for help on using the changeset viewer.