| @@ -125,10 +125,8 @@ | ||
| 125 | 125 | |
| 126 | 126 | // auto download / install / activate WPR plugin |
| 127 | 127 | function install_wpr() |
| 128 | 128 | { |
| 129 | - check_ajax_referer('install_wpr'); | |
| 130 | - | |
| 131 | 129 | if (false === current_user_can('administrator')) { |
| 132 | 130 | wp_die('Sorry, you have to be an admin to run this action.'); |
| 133 | 131 | } |
| 134 | 132 | |
| @@ -221,9 +219,9 @@ | ||
| 221 | 219 | |
| 222 | 220 | private function handle_after_reset() |
| 223 | 221 | { |
| 224 | 222 | if (empty($this->request['db-reset-reactivate-theme-data'])) { |
| 225 | - wp_safe_redirect(admin_url()); | |
| 223 | + wp_redirect(admin_url()); | |
| 226 | 224 | exit; |
| 227 | 225 | } |
| 228 | 226 | |
| 229 | 227 | $this->notice_success = __('The selected tables were reset', 'wordpress-database-reset'); |
| @@ -340,9 +338,9 @@ | ||
| 340 | 338 | return array( |
| 341 | 339 | 'confirmAlert' => __('Are you sure you want to continue? There is NO UNDO!', 'wordpress-database-reset'), |
| 342 | 340 | 'selectTable' => __('Select Tables', 'wordpress-database-reset'), |
| 343 | 341 | 'selectOneTable' => __('Please select at least one table to reset.', 'wordpress-database-reset'), |
| 344 | - 'wprInstallUrl' => add_query_arg(array('action' => 'install_wpr', '_wpnonce' => wp_create_nonce('install_wpr')), admin_url('admin.php')), | |
| 342 | + 'wprInstallUrl' => add_query_arg(array('action' => 'install_wpr'), admin_url('admin.php')), | |
| 345 | 343 | 'wprDialogTitle' => '<img alt="WP Reset" title="WP Reset" src="' . plugins_url('assets/images/wp-reset-logo.png', DB_RESET_FILE) . '">', |
| 346 | 344 | ); |
| 347 | 345 | } |
| 348 | 346 | } |