PluginProbe
Database Reset / 3.21
Database Reset v3.21
2.3.2 3.0 3.0.1 3.0.2 3.1 3.15 3.16 3.17 3.18 3.19 3.20 3.21 3.22 3.23 3.24 3.25 trunk 1.0 1.2 1.2.1 1.2.2 1.3 1.4 2.0 2.1 All 27 releases
← All changes | class-db-reset-admin.php +5 -7 trunk3.21 View file →
@@ -18,9 +18,9 @@
18 18 {
19 19 $this->resetter = new DB_Resetter();
20 20 $this->version = $version;
21 21
22 - $this->set_request($_REQUEST); //phpcs:ignore
22 + $this->set_request($_REQUEST);
23 23 $this->set_view_variables();
24 24 }
25 25
26 26 private function set_request(array $request)
@@ -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
@@ -149,9 +147,9 @@
149 147 }
150 148 </style>';
151 149
152 150 echo '<div style="margin: 20px; color:#444;">';
153 - echo 'If things are not done in a minute <a target="_parent" href="' . esc_url(admin_url('plugin-install.php?s=wp-reset&tab=search&type=term')) . '">install the plugin manually via Plugins page</a><br><br>';
151 + echo 'If things are not done in a minute <a target="_parent" href="' . admin_url('plugin-install.php?s=wp-reset&tab=search&type=term') . '">install the plugin manually via Plugins page</a><br><br>';
154 152 echo 'Starting ...<br><br>';
155 153
156 154 wp_cache_flush();
157 155 $upgrader = new Plugin_Upgrader();
@@ -176,9 +174,9 @@
176 174 echo '<script>setTimeout(function() { top.location = "tools.php?page=wp-reset"; }, 1000);</script>';
177 175 echo '<br>If you are not redirected in a few seconds - <a href="tools.php?page=wp-reset" target="_parent">click here</a>.';
178 176 }
179 177 } else {
180 - echo 'Could not install WP Reset. You\'ll have to <a target="_parent" href="' . esc_url(admin_url('plugin-install.php?s=wp-reset&tab=search&type=term')) . '">download and install manually</a>.';
178 + echo 'Could not install WP Reset. You\'ll have to <a target="_parent" href="' . admin_url('plugin-install.php?s=wp-reset&tab=search&type=term') . '">download and install manually</a>.';
181 179 }
182 180
183 181 echo '</div>';
184 182 } // install_wpr
@@ -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 }