summaryrefslogtreecommitdiffstats
path: root/wpmu-settings.php
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2006-06-29 14:07:09 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2006-06-29 14:07:09 +0000
commit612ac61042f48d88a1828f584d850e1a237dd593 (patch)
treeec54e5d152956dbd270aaa6ed77d87fdaa45b6ca /wpmu-settings.php
parenta09981a5000dc0f77780c9aaeec634a240941a47 (diff)
downloadwordpress-mu-612ac61042f48d88a1828f584d850e1a237dd593.tar.gz
wordpress-mu-612ac61042f48d88a1828f584d850e1a237dd593.tar.xz
wordpress-mu-612ac61042f48d88a1828f584d850e1a237dd593.zip
Improve the error message shown on bad installs
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@616 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wpmu-settings.php')
-rw-r--r--wpmu-settings.php48
1 files changed, 28 insertions, 20 deletions
diff --git a/wpmu-settings.php b/wpmu-settings.php
index eb7e16c..31c8d83 100644
--- a/wpmu-settings.php
+++ b/wpmu-settings.php
@@ -131,27 +131,35 @@ if( $current_blog->spam == '1' ) {
}
function is_installed() {
- global $wpdb, $domain, $path;
+ global $wpdb, $domain, $path;
$base = stripslashes( $base );
- if( defined( "WP_INSTALLING" ) == false ) {
- $check = $wpdb->get_results( "SELECT * FROM $wpdb->site" );
- if( $check == false ) {
- $msg = '<strong>Database Tables Missing.</strong><br /> The table <em>' . DB_NAME . '::' . $wpdb->site . '</em> is missing. Delete the .htaccess file and run the installer again!<br />';
- } else {
- $msg = '<strong>Could Not Find Blog!</strong><br />';
- $msg .= "Searched for <em>" . $domain . $path . "</em> in " . DB_NAME . "::" . $wpdb->blogs . " table. Is that right?<br />";
- }
- $msg .= "Please check that your database contains the following tables:<ul>
- <li> $wpdb->blogs </li>
- <li> $wpdb->users </li>
- <li> $wpdb->usermeta </li>
- <li> $wpdb->site </li>
- <li> $wpdb->sitemeta </li>
- <li> $wpdb->sitecategories </li>
- </ul>";
- $msg .= "If you suspect a problem please report it to <a href='http://mu.wordpress.org/forums/'>support forums</a>!";
- die( "<h1>Fatal Error</h1> " . $msg );
- }
+ if( defined( "WP_INSTALLING" ) == false ) {
+ $check = $wpdb->get_results( "SELECT * FROM $wpdb->site" );
+ if( $check == false ) {
+ $msg = '<strong>Database Tables Missing.</strong><br /> The table <em>' . DB_NAME . '::' . $wpdb->site . '</em> is missing. Delete the .htaccess file and run the installer again!<br />';
+ } else {
+ $msg = '<strong>Could Not Find Blog!</strong><br />';
+ $msg .= "Searched for <em>" . $domain . $path . "</em> in " . DB_NAME . "::" . $wpdb->blogs . " table. Is that right?<br />";
+ }
+ $msg .= "<br />\n<h1>What do I do now?</h1>";
+ $msg .= "Read the <a target='_blank' href='http://trac.mu.wordpress.org/wiki/DebuggingWpmu'>bug report</a> page. Some of the guidelines there may help you figure out what went wrong.<br />";
+ $msg .= "If you're still stuck with this message, then check that your database contains the following tables:<ul>
+ <li> $wpdb->blogs </li>
+ <li> $wpdb->users </li>
+ <li> $wpdb->usermeta </li>
+ <li> $wpdb->site </li>
+ <li> $wpdb->sitemeta </li>
+ <li> $wpdb->sitecategories </li>
+ </ul>";
+ $msg .= "If you suspect a problem please report it to <a href='http://mu.wordpress.org/forums/'>support forums</a> but follow the <a href='http://trac.mu.wordpress.org/wiki/DebuggingWpmu'>guidelines</a>!<br /><br />";
+ if( is_file( 'release-info.txt' ) ) {
+ $msg .= 'Your bug report must include the following text: "';
+ $info = file( 'release-info.txt' );
+ $msg .= $info[ 4 ] . '"';
+ }
+
+ die( "<h1>Fatal Error</h1> " . $msg );
+ }
}
$table_prefix = $table_prefix . $blog_id . '_';