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

Introduce `wp db prefix` for getting the `$wpdb->prefix` for a site #22

Merged
merged 8 commits into from Jun 2, 2017

Conversation

2 participants
@greatislander
Contributor

greatislander commented Jun 1, 2017

See #18

@danielbachhuber

This comment has been minimized.

Show comment
Hide comment
@danielbachhuber

danielbachhuber Jun 1, 2017

Member

Thanks for the pull request, @greatislander !

Can you include functional tests for this pull request?

Member

danielbachhuber commented Jun 1, 2017

Thanks for the pull request, @greatislander !

Can you include functional tests for this pull request?

@greatislander

This comment has been minimized.

Show comment
Hide comment
@greatislander

greatislander Jun 1, 2017

Contributor

@danielbachhuber Thanks! I had written the test but didn't add it before committing. Fixed now.

Contributor

greatislander commented Jun 1, 2017

@danielbachhuber Thanks! I had written the test but didn't add it before committing. Fixed now.

Show outdated Hide outdated src/DB_Command.php
@danielbachhuber

This comment has been minimized.

Show comment
Hide comment
@danielbachhuber

danielbachhuber Jun 1, 2017

Member

I had written the test but didn't add it before committing. Fixed now.

In the future, you should probably run your test before pushing it :)

Member

danielbachhuber commented Jun 1, 2017

I had written the test but didn't add it before committing. Fixed now.

In the future, you should probably run your test before pushing it :)

@greatislander

This comment has been minimized.

Show comment
Hide comment
@greatislander

greatislander Jun 1, 2017

Contributor

Clearly I'm still missing something. Closing this for now.

Contributor

greatislander commented Jun 1, 2017

Clearly I'm still missing something. Closing this for now.

@danielbachhuber

This comment has been minimized.

Show comment
Hide comment
@danielbachhuber

danielbachhuber Jun 1, 2017

Member

Clearly I'm still missing something. Closing this for now.

@greatislander It's only a small issue — you need to print the $table_prefix value instead of returning it. See my code comment.

Member

danielbachhuber commented Jun 1, 2017

Clearly I'm still missing something. Closing this for now.

@greatislander It's only a small issue — you need to print the $table_prefix value instead of returning it. See my code comment.

@greatislander

This comment has been minimized.

Show comment
Hide comment
@greatislander

greatislander Jun 1, 2017

Contributor

@danielbachhuber I changed that in aa1290d but the test is still failing locally and in Travis…

Contributor

greatislander commented Jun 1, 2017

@danielbachhuber I changed that in aa1290d but the test is still failing locally and in Travis…

@danielbachhuber

This comment has been minimized.

Show comment
Hide comment
@danielbachhuber

danielbachhuber Jun 1, 2017

Member

Ah, because of #15

If you include @WP_CLI::get_runner()->load_wordpress() in your command, $table_prefix will be populated.

Member

danielbachhuber commented Jun 1, 2017

Ah, because of #15

If you include @WP_CLI::get_runner()->load_wordpress() in your command, $table_prefix will be populated.

@greatislander greatislander reopened this Jun 1, 2017

greatislander added some commits Jun 1, 2017

@greatislander

This comment has been minimized.

Show comment
Hide comment
@greatislander

greatislander Jun 1, 2017

Contributor

Thanks for your patience, @danielbachhuber. This seems to be working as expected now and I've updated docs. Let me know if you need any other changes! 👍

Contributor

greatislander commented Jun 1, 2017

Thanks for your patience, @danielbachhuber. This seems to be working as expected now and I've updated docs. Let me know if you need any other changes! 👍

@danielbachhuber danielbachhuber changed the title from First pass at fixing #18 to Introduce `wp db prefix` for getting the `$table_prefix` for a site Jun 1, 2017

Show outdated Hide outdated src/DB_Command.php
Show outdated Hide outdated src/DB_Command.php

@danielbachhuber danielbachhuber changed the title from Introduce `wp db prefix` for getting the `$table_prefix` for a site to Introduce `wp db prefix` for getting the `$wpdb->prefix` for a site Jun 1, 2017

@danielbachhuber

This comment has been minimized.

Show comment
Hide comment
@danielbachhuber

danielbachhuber Jun 1, 2017

Member

@greatislander Sorry, I misinterpreted the original issue. We should be printing $wpdb->prefix, so the prefix includes the blog id on multisite.

Member

danielbachhuber commented Jun 1, 2017

@greatislander Sorry, I misinterpreted the original issue. We should be printing $wpdb->prefix, so the prefix includes the blog id on multisite.

greatislander added some commits Jun 1, 2017

@danielbachhuber danielbachhuber merged commit f61ef8c into wp-cli:master Jun 2, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@greatislander greatislander deleted the greatislander:issues/18 branch Jun 3, 2017

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