Making WordPress.org

Changeset 4940


Ignore:
Timestamp:
02/19/2017 03:52:31 PM (8 years ago)
Author:
SergeyBiryukov
Message:

Support Forums: In Directory_Compat, replace hardcoded database prefix for plugin tables with PLUGINS_TABLE_PREFIX.

Fixes #2514.

File:
1 edited

Legend:

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

    r4894 r4940  
    726726                $authors = array( $author->user_login );
    727727            } else {
    728                 $authors = $wpdb->get_col( $wpdb->prepare( " SELECT user FROM plugin_2_svn_access WHERE `path` = %s", '/' . $slug ) );
     728                $authors = $wpdb->get_col( $wpdb->prepare( " SELECT user FROM " . PLUGINS_TABLE_PREFIX . "svn_access WHERE `path` = %s", '/' . $slug ) );
    729729            }
    730730
     
    754754            // @todo Update this when the Plugin Directory switches over to WordPress.
    755755            $contributors = $wpdb->get_var( $wpdb->prepare(
    756                 "SELECT meta_value FROM plugin_2_meta m LEFT JOIN plugin_2_topics t ON m.object_id = t.topic_id WHERE t.topic_slug = %s AND m.object_type = %s AND m.meta_key = %s",
     756                "SELECT meta_value FROM " . PLUGINS_TABLE_PREFIX . "meta m LEFT JOIN " . PLUGINS_TABLE_PREFIX . "topics t ON m.object_id = t.topic_id WHERE t.topic_slug = %s AND m.object_type = %s AND m.meta_key = %s",
    757757                $slug, 'bb_topic', 'contributors' ) );
    758758            if ( $contributors ) {
Note: See TracChangeset for help on using the changeset viewer.