[wp-trac] [WordPress Trac] #24462: ms_not_installed() does not report that wp_site does not exist
WordPress Trac
noreply at wordpress.org
Thu May 30 11:30:12 UTC 2013
#24462: ms_not_installed() does not report that wp_site does not exist
------------------------------+-----------------------------
Reporter: creativeinfusion | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Multisite | Version: 3.0
Severity: trivial | Keywords:
------------------------------+-----------------------------
ms_not_installed() does not report that $wpdb->site does not exist due to
a logic error introduced in [14317]
{{{
#!php
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
{{{
#!php
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.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/24462>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list