*/
define('WP_REPAIRING', true);
-require_once('../../wp-load.php');
+require_once( dirname( dirname( dirname( __FILE__ ) ) ) . '/wp-load.php' );
header( 'Content-Type: text/html; charset=utf-8' );
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
<head>
+ <meta name="viewport" content="width=device-width" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php _e( 'WordPress › Database Repair' ); ?></title>
<?php
?>
</head>
<body class="wp-core-ui">
-<h1 id="logo"><a href="<?php esc_attr_e( 'http://wordpress.org/' ); ?>"><?php _e( 'WordPress' ); ?></a></h1>
+<h1 id="logo"><a href="<?php echo esc_url( __( 'http://wordpress.org/' ) ); ?>"><?php _e( 'WordPress' ); ?></a></h1>
<?php
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>";
+ 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><p><code>define('WP_ALLOW_REPAIR', true);</code></p>";
} elseif ( isset( $_GET['repair'] ) ) {
$optimize = 2 == $_GET['repair'];
$okay = true;
if ( is_multisite() && ! $wpdb->get_var( "SHOW TABLES LIKE '$wpdb->sitecategories'" ) )
unset( $tables['sitecategories'] );
- $tables = array_merge( $tables, (array) apply_filters( 'tables_to_repair', array() ) ); // Return tables with table prefixes.
+ /**
+ * Filter additional database tables to repair.
+ *
+ * @since 3.0.0
+ *
+ * @param array $tables Array of prefixed table names to be repaired.
+ */
+ $tables = array_merge( $tables, (array) apply_filters( 'tables_to_repair', array() ) );
// Loop over the tables, checking and repairing as needed.
foreach ( $tables as $table ) {
$problem_output .= "$table: $problem\n";
echo '<p><textarea name="errors" id="errors" rows="20" cols="60">' . esc_textarea( $problem_output ) . '</textarea></p>';
} else {
- echo '<p>' . __( 'Repairs complete. Please remove the following line from wp-config.php to prevent this page from being used by unauthorized users.' ) . "</p><code>define('WP_ALLOW_REPAIR', true);</code>";
+ echo '<p>' . __( 'Repairs complete. Please remove the following line from wp-config.php to prevent this page from being used by unauthorized users.' ) . "</p><p><code>define('WP_ALLOW_REPAIR', true);</code></p>";
}
} else {
if ( isset( $_GET['referrer'] ) && 'is_blog_installed' == $_GET['referrer'] )