Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't assume wp_ is the prefix #2385

Merged
merged 1 commit into from
Oct 8, 2014
Merged

Conversation

jamesgol
Copy link
Contributor

@jamesgol jamesgol commented Oct 8, 2014

Fixes #2306

I did some grepping around and didn't really see any other cases like this

pglewis added a commit that referenced this pull request Oct 8, 2014
Don't assume wp_ is the prefix
@pglewis pglewis merged commit 0d67039 into pods-framework:2.x Oct 8, 2014
@sc0ttkclark
Copy link
Member

Was this from encountering a problem? WP itself uses wp_[0-9]*_capabilities for it's capabilities serialized array for user meta. I once had it using $wpdb for prefixing, but it was reported broken and we found that to be the cause. We should just double check inside WP core what it does, if it's using prefix properly there.

@pglewis
Copy link
Contributor

pglewis commented Oct 8, 2014

@sc0ttkclark: Issue #2306 was referenced here

@sc0ttkclark
Copy link
Member

Do we need $wpdb->base_prefix here then?

@jamesgol
Copy link
Contributor Author

jamesgol commented Oct 8, 2014

After doing the 2.x fix I saw in 3.0 that it was using $wpdb->base_prefix. When I looked at the value in xdebug they contained the same setup on my test. I couldn't really find a definitive answer on when to use base_prefix vs prefix.

http://codex.wordpress.org/Writing_a_Plugin
says to use $wpdb->prefix

@sc0ttkclark
Copy link
Member

Needs to be base_prefix in our usage here, it is certainly confusing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Non wp_ table prefix -> user relation by role broken
4 participants