Skip to content

Commit

Permalink
Merge pull request #7185 from pods-framework/feature/7181-wpdb-prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
sc0ttkclark authored Sep 28, 2023
2 parents 3fc2258 + e5cd028 commit 7c6bb84
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions classes/fields/pick.php
Original file line number Diff line number Diff line change
Expand Up @@ -2872,13 +2872,7 @@ public function get_object_data( $object_params = null ) {
continue;
}

$prefix = $wpdb->base_prefix;

if ( is_multisite() && ! is_main_site() ) {
$prefix .= get_current_blog_id() . '_';
}

$where[] = $prefix . 'capabilities.meta_value LIKE "%\"' . pods_sanitize_like( $role ) . '\"%"';
$where[] = $wpdb->prefix . 'capabilities.meta_value LIKE "%\"' . pods_sanitize_like( $role ) . '\"%"';
}

if ( ! empty( $where ) ) {
Expand Down

0 comments on commit 7c6bb84

Please sign in to comment.