chrisberthe/wordpress-database-reset — Issue #3: Redirects do not function properly
Author: chrisberthe
Created: 2011-10-23 20:15:39+00:00
State: open

I've been trying to fix a bug where the redirects don't function properly.

On lines 129 - 132, where the wp_redirect functions lie, it should redirect according to whether or not `$this->_reactivate_plugins()` returns true or false - meaning, if the user ticks the checkbox to 'reactivate the plugins after reset', it should redirect to the same page, or if they removed the tick, should disable all plugins and redirect to the dashboard.

You can try the following to see what I mean: Select just one table (terms, for instance) and reset the database. In reality, it should redirect to the same page on success because the wp-reset-check is passed as true (even though that div is hidden, it still passes that value on). But it doesn't redirect to the same page.

The problem lies somewhere in the `_reactivate_plugins()` method - in fact, if you do a `var_dump($wpdb->query($query))` on line 425, as long as you **did not** select the table 'options' in the dropdown, that query will return false (no idea why).

Just thought I would throw this out there - might be something obvious and maybe been looking at my monitor way too long.

Appreciate any help.