Skip to content
Browse files

No need for this class variable any longer

  • Loading branch information...
1 parent 0c179ee commit d52a0e1a97705941995d2a84d7355c6ac59ac13a @chrisberthe committed Oct 25, 2011
Showing with 3 additions and 8 deletions.
  1. +3 −8 wp-reset.php
View
11 wp-reset.php
@@ -19,11 +19,6 @@ class cb_wp_reset
private $_nonce = 'wp-reset-nonce';
/**
- * Plugins to reactivate
- */
- private $_active_plugins;
-
- /**
* Tables to preserve
*/
private $_tables;
@@ -97,7 +92,7 @@ function wp_reset_init()
// Grab the currently active plugins
if ( isset($_POST['wp-reset-check']) && $_POST['wp-reset-check'] == 'true' )
{
- $this->_active_plugins = $wpdb->get_var($wpdb->prepare("SELECT option_value FROM $wpdb->options WHERE option_name = %s", 'active_plugins'));
+ $active_plugins = $wpdb->get_var($wpdb->prepare("SELECT option_value FROM $wpdb->options WHERE option_name = %s", 'active_plugins'));
}
// Run through the database columns and drop all the tables
@@ -124,9 +119,9 @@ function wp_reset_init()
$this->_backup_tables($backup_tables, 'reset');
}
- if ( ! empty($this->_active_plugins) )
+ if ( ! empty($active_plugins) )
{
- $wpdb->update($wpdb->options, array('option_value' => $this->_active_plugins), array('option_name' => 'active_plugins'));
+ $wpdb->update($wpdb->options, array('option_value' => $active_plugins), array('option_name' => 'active_plugins'));
wp_redirect(admin_url($pagenow) . '?page=wp-reset&reset=success'); exit();
}

0 comments on commit d52a0e1

Please sign in to comment.
Something went wrong with that request. Please try again.