Changeset 5827 for trunk/src/includes/admin/admin.php
- Timestamp:
- 07/14/2015 12:31:42 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/admin/admin.php
r5809 r5827 693 693 */ 694 694 public function suggest_topic() { 695 global $wpdb;696 695 697 696 // Bail early if no request … … 710 709 // Try to get some topics 711 710 $topics = get_posts( array( 712 's' => $wpdb->esc_like( $_REQUEST['q'] ),711 's' => bbp_db()->esc_like( $_REQUEST['q'] ), 713 712 'post_type' => bbp_get_topic_post_type() 714 713 ) ); … … 729 728 */ 730 729 public function suggest_user() { 731 global $wpdb;732 730 733 731 // Bail early if no request … … 746 744 // Try to get some users 747 745 $users_query = new WP_User_Query( array( 748 'search' => '*' . $wpdb->esc_like( $_REQUEST['q'] ) . '*',746 'search' => '*' . bbp_db()->esc_like( $_REQUEST['q'] ) . '*', 749 747 'fields' => array( 'ID', 'user_nicename' ), 750 748 'search_columns' => array( 'ID', 'user_nicename', 'user_email' ), … … 948 946 * @since bbPress (r3689) 949 947 * 950 * @global WPDB $wpdb951 948 * @uses get_blog_option() 952 949 * @uses wp_remote_get() … … 995 992 * @since bbPress (r3689) 996 993 * 997 * @global WPDB $wpdb998 994 * @uses get_blog_option() 999 995 * @uses wp_remote_get() 1000 996 */ 1001 997 public static function network_update_screen() { 1002 global $wpdb;998 $bbp_db = bbp_db(); 1003 999 1004 1000 // Get action … … 1019 1015 1020 1016 // Get blogs 5 at a time 1021 $blogs = $ wpdb->get_results( "SELECT * FROM {$wpdb->blogs} WHERE site_id = '{$wpdb->siteid}' AND spam = '0' AND deleted = '0' AND archived = '0' ORDER BY registered DESC LIMIT {$n}, 5", ARRAY_A );1017 $blogs = $bbp_db->get_results( "SELECT * FROM {$bbp_db->blogs} WHERE site_id = '{$bbp_db->siteid}' AND spam = '0' AND deleted = '0' AND archived = '0' ORDER BY registered DESC LIMIT {$n}, 5", ARRAY_A ); 1022 1018 1023 1019 // No blogs so all done!
Note: See TracChangeset
for help on using the changeset viewer.