+
+if ( !defined('LANGDIR') ) {
+ if ( file_exists(ABSPATH . 'wp-content/languages') && @is_dir(ABSPATH . 'wp-content/languages') )
+ define('LANGDIR', 'wp-content/languages'); // no leading slash, no trailing slash
+ else
+ define('LANGDIR', WPINC . '/languages'); // no leading slash, no trailing slash
+}
+
+if ( !defined('PLUGINDIR') )
+ define('PLUGINDIR', 'wp-content/plugins'); // no leading slash, no trailing slash
+
+require (ABSPATH . WPINC . '/compat.php');
+require (ABSPATH . WPINC . '/functions.php');
+
+if ( file_exists(ABSPATH . 'wp-content/db.php') )
+ require_once (ABSPATH . 'wp-content/db.php');
+else
+ require_once (ABSPATH . WPINC . '/wp-db.php');
+
+if ( !empty($wpdb->error) )
+ dead_db();
+
+// $table_prefix is deprecated as of 2.1
+$wpdb->prefix = $table_prefix;
+
+if ( preg_match('|[^a-z0-9_]|i', $wpdb->prefix) && !file_exists(ABSPATH . 'wp-content/db.php') )
+ wp_die("<strong>ERROR</strong>: <code>$table_prefix</code> in <code>wp-config.php</code> can only contain numbers, letters, and underscores.");