Making WordPress.org

Changeset 9008


Ignore:
Timestamp:
07/02/2019 04:06:28 AM (6 years ago)
Author:
dd32
Message:

Plugin Directory: Remove a DB table name and build it from constants instead.

This allows for it to work better with Meta Environments.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-tools.php

    r8474 r9008  
    5151            $number = 2;
    5252        }
    53         if ( false === ( $reviews = wp_cache_get( "{$plugin_slug}_last{$number}", 'plugin-reviews' ) ) ) {
     53
     54        $reviews = wp_cache_get( "{$plugin_slug}_last{$number}", 'plugin-reviews' );
     55        if ( defined( 'WPORG_SUPPORT_FORUMS_BLOGID' ) && false === $reviews ) {
    5456            global $wpdb;
    5557
     
    5961                    r.rating as post_rating
    6062                FROM ratings r
    61                     LEFT JOIN wporg_419_posts p ON r.post_id = p.ID
     63                    LEFT JOIN " . $wpdb->base_prefix . WPORG_SUPPORT_FORUMS_BLOGID . "_posts p ON r.post_id = p.ID
    6264                WHERE r.object_type = 'plugin' AND r.object_slug = %s AND p.post_status = 'publish'
    6365                ORDER BY r.review_id DESC
Note: See TracChangeset for help on using the changeset viewer.