Making WordPress.org

Changeset 4945


Ignore:
Timestamp:
02/19/2017 09:06:01 PM (8 years ago)
Author:
coffee2code
Message:

Support Forums, User Badges: Replace hardcoded database prefix for plugin tables with PLUGINS_TABLE_PREFIX.

Props SergeyBiryukov.
Fixes #2514.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-bbp-user-badges/inc/class-plugin.php

    r4291 r4945  
    354354                // Get users who have commit access.
    355355                $authors = $wpdb->get_col( $wpdb->prepare(
    356                     "SELECT user FROM plugin_2_svn_access WHERE `path` = %s",
     356                    "SELECT user FROM " . PLUGINS_TABLE_PREFIX . "svn_access WHERE `path` = %s",
    357357                    '/' . $slug
    358358                ) );
     
    396396                // TODO: Change this when the Plugin Directory switches over to WordPress.
    397397                $contributors = $wpdb->get_var( $wpdb->prepare(
    398                     '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',
     398                    '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',
    399399                    $slug,
    400400                    'bb_topic',
Note: See TracChangeset for help on using the changeset viewer.