-if ( !defined('WP_ALLOW_REPAIR') ) {
- echo '<p>'.__('To allow use of this page to automatically repair database problems, please add the following line to your wp-config.php file. Once this line is added to your config, reload this page.')."</p><code>define('WP_ALLOW_REPAIR', true);</code>";
-} elseif ( isset($_GET['repair']) ) {
- check_admin_referer('repair_db');
-
- if ( 2 == $_GET['repair'] )
- $optimize = true;
- else
- $optimize = false;
-
+if ( ! defined( 'WP_ALLOW_REPAIR' ) ) {
+ echo '<p>' . __( 'To allow use of this page to automatically repair database problems, please add the following line to your <code>wp-config.php</code> file. Once this line is added to your config, reload this page.' ) . "</p><code>define('WP_ALLOW_REPAIR', true);</code>";
+} elseif ( isset( $_GET['repair'] ) ) {
+ $optimize = 2 == $_GET['repair'];