- if ( ! $wpdb->get_var( "SHOW TABLES LIKE '$wpdb->site'" ) )
- $msg .= '<p>' . sprintf( __( '<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.' ), $wpdb->site ) . '</p>';
- else
- $msg .= '<p>' . sprintf( __( '<strong>Could not find site <code>%1$s</code>.</strong> Searched for table <code>%2$s</code> in database <code>%3$s</code>. Is that right?' ), rtrim( $domain . $path, '/' ), $wpdb->blogs, DB_NAME ) . '</p>';
+ $query = $wpdb->prepare( "SHOW TABLES LIKE %s", $wpdb->esc_like( $wpdb->site ) );
+ if ( ! $wpdb->get_var( $query ) ) {
+ $msg .= '<p>' . sprintf(
+ /* translators: %s: table name */
+ __( '<strong>Database tables are missing.</strong> This means that MySQL is not running, WordPress was not installed properly, or someone deleted %s. You really should look at your database now.' ),
+ '<code>' . $wpdb->site . '</code>'
+ ) . '</p>';
+ } else {
+ $msg .= '<p>' . sprintf(
+ /* translators: 1: site url, 2: table name, 3: database name */
+ __( '<strong>Could not find site %1$s.</strong> Searched for table %2$s in database %3$s. Is that right?' ),
+ '<code>' . rtrim( $domain . $path, '/' ) . '</code>',
+ '<code>' . $wpdb->blogs . '</code>',
+ '<code>' . DB_NAME . '</code>'
+ ) . '</p>';
+ }