Opened 11 years ago
Closed 11 years ago
#24462 closed defect (bug) (fixed)
ms_not_installed() does not report that wp_site does not exist
Reported by: | creativeinfusion | Owned by: | nacin |
---|---|---|---|
Milestone: | 3.6 | Priority: | normal |
Severity: | trivial | Version: | 3.0 |
Component: | Multisite | Keywords: | has-patch commit |
Focuses: | Cc: |
Description
ms_not_installed() does not report that $wpdb->site does not exist due to a logic error introduced in [14317]
if ( !$wpdb->get_var( "SHOW TABLES LIKE '$wpdb->site'" ) )
$msg .= '<p>' . sprintf( /*WP_I18N_TABLES_MISSING_LONG*/'<strong>Database tables are missing.</strong> This means that MySQL is not running, WordPress was not installed properly, or someone deleted <code>%s</code>. You really <em>should</em> look at your database now.'/*/WP_I18N_TABLES_MISSING_LONG*/, $wpdb->site ) . '</p>';
else
$msg .= '<p>' . sprintf( /*WP_I18N_NO_SITE_FOUND*/'<strong>Could Not Find Site!</strong> Searched for table <em>%1$s</em> in <code>%2$s</code>. Is that right?'/*/WP_I18N_NO_SITE_FOUND*/, $domain . $path, DB_NAME, $wpdb->blogs ) . '</p>';
became
if ( false && !$wpdb->get_var( "SHOW TABLES LIKE '$wpdb->site'" ) )
$msg .= '<p>' . sprintf( /*WP_I18N_TABLES_MISSING_LONG*/'<strong>Database tables are missing.</strong> This means that MySQL is not running, WordPress was not installed properly, or someone deleted <code>%s</code>. You really should look at your database now.'/*/WP_I18N_TABLES_MISSING_LONG*/, $wpdb->site ) . '</p>';
else
$msg .= '<p>' . sprintf( /*WP_I18N_NO_SITE_FOUND*/'<strong>Could not find site <code>%1$s</code>.</strong> Searched for table <code>%2$s</code> in <code>%3$s</code>. Is that right?'/*/WP_I18N_NO_SITE_FOUND*/, rtrim( $domain . $path, '/' ), DB_NAME, $wpdb->blogs ) . '</p>';
Suggest removal of extraneous "false" (i.e. revert that line) or just remove the redundant code.
Attachments (1)
Change History (3)
Note: See
TracTickets for help on using
tickets.
That looks like debug cruft.