Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




ms_not_installed [ WordPress Function ]

ms_not_installed ( No parameters )
Access:
  • private
Defined at:



Displays a failure message.

Used when a blog's tables do not exist. Checks for a missing $wpdb->site table as well.

Source


<?php
function ms_not_installed() {
    global 
$wpdb$domain$path;

    
wp_load_translations_early();

    
$title __'Error establishing database connection' );
    
$msg  '<h1>' $title '</h1>';
    if ( ! 
is_admin() )
        die( 
$msg );
    
$msg .= '<p>' __'If your site does not display, please contact the owner of this network.' ) . '';
    
$msg .= ' ' __'If you are the owner of this network please check that MySQL is running properly and all tables are error free.' ) . '</p>';
    if ( 
false && !$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->blogsDB_NAME ) . '</p>';
    
$msg .= '<p><strong>' __'What do I do now?' ) . '</strong> ';
    
$msg .= __'Read the <a target="_blank" href="http://codex.wordpress.org/Debugging_a_WordPress_Network">bug report</a> page. Some of the guidelines there may help you figure out what went wrong.' );
    
$msg .= ' ' __'If you&#8217;re still stuck with this message, then check that your database contains the following tables:' ) . '</p><ul>';
    foreach ( 
$wpdb->tables('global') as $t => $table ) {
        if ( 
'sitecategories' == $t )
            continue;
        
$msg .= '<li>' $table '</li>';
    }
    
$msg .= '</ul>';

    
wp_die$msg$title );
}
?>

Examples [ wp-snippets.com ]

Google Arama Sonuçlarý

Dahasý ...

Kullanýcý Tartýþmalarý [ wordpress.org ]

- Bulunamadý -

Yeni bir konu yaz ...

0 User Note(s)

Henüz yok. Ýlk sen ol!

Yeni Ekle ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics