| 1 | Index: repair.php |
|---|
| 2 | =================================================================== |
|---|
| 3 | --- repair.php (revision 12600) |
|---|
| 4 | +++ repair.php (working copy) |
|---|
| 5 | @@ -18,8 +18,8 @@ |
|---|
| 6 | |
|---|
| 7 | <?php |
|---|
| 8 | |
|---|
| 9 | -if ( !defined('WP_ALLOW_REPAIR') ) { |
|---|
| 10 | - _e("<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>"); |
|---|
| 11 | +if ( !defined('WP_ALLOW_REPAIR') && !current_user_can('manage_options') ) { |
|---|
| 12 | + _e("<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>.<p>Another option is to log in as administrator and run this check again.</p>"); |
|---|
| 13 | } elseif ( isset($_GET['repair']) ) { |
|---|
| 14 | $problems = array(); |
|---|
| 15 | check_admin_referer('repair_db'); |
|---|
| 16 | @@ -72,7 +72,7 @@ |
|---|
| 17 | $problem_output[] = "$table: $problem"; |
|---|
| 18 | echo '<textarea name="errors" id="errors" rows="20" cols="60">' . format_to_edit(implode("\n", $problem_output)) . '</textarea>'; |
|---|
| 19 | } else { |
|---|
| 20 | - _e("<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>"); |
|---|
| 21 | + _e("<p>Repairs complete. Please remove the following line from wp-config.php, in case you have included it, to prevent this page from being used by unauthorized users.</p><code>define('WP_ALLOW_REPAIR', true);</code>"); |
|---|
| 22 | } |
|---|
| 23 | } else { |
|---|
| 24 | if ( isset($_GET['referrer']) && 'is_blog_installed' == $_GET['referrer'] ) |
|---|