diff --git a/b2.php b/b2.php
index 13718d9f40..f0b8de0a88 100644
--- a/b2.php
+++ b/b2.php
@@ -18,9 +18,8 @@
-
-
-
+
+
",""); ?>
@@ -39,8 +38,8 @@
-
-
+
+
Powered by Wordpress
diff --git a/b2login.php b/b2login.php
index aa0b55ca82..6f6c9220af 100644
--- a/b2login.php
+++ b/b2login.php
@@ -3,6 +3,7 @@ require('b2config.php');
require_once($abspath.$b2inc.'/b2template.functions.php');
require_once($abspath.$b2inc.'/b2functions.php');
require_once($abspath.$b2inc.'/b2vars.php');
+require_once($abspath.$b2inc.'/wp-db.php');
if (!function_exists('add_magic_quotes')) {
function add_magic_quotes($array) {
diff --git a/blog.header.php b/blog.header.php
index 3f8fc61c20..19a60eddf9 100644
--- a/blog.header.php
+++ b/blog.header.php
@@ -12,6 +12,7 @@ require_once ($curpath.$b2inc.'/b2vars.php');
require_once ($curpath.$b2inc.'/b2functions.php');
require_once ($curpath.$b2inc.'/xmlrpc.inc');
require_once ($curpath.$b2inc.'/xmlrpcs.inc');
+require_once ($curpath.$b2inc.'/wp-db.php');
$b2varstoreset = array('m','p','posts','w','c', 'cat','withcomments','s','search','exact', 'sentence','poststart','postend','preview','debug', 'calendar','page','paged','more','tb', 'pb','author','order','orderby');
diff --git a/wp-admin/b2header.php b/wp-admin/b2header.php
index da9b7d7389..7560d960cb 100644
--- a/wp-admin/b2header.php
+++ b/wp-admin/b2header.php
@@ -7,6 +7,7 @@ require_once($abspath.$b2inc.'/b2vars.php');
require_once($abspath.$b2inc.'/b2functions.php');
require_once($abspath.$b2inc.'/xmlrpc.inc');
require_once($abspath.$b2inc.'/xmlrpcs.inc');
+require_once($abspath.$b2inc.'/wp-db.php');
if (!isset($use_cache)) $use_cache=1;
if (!isset($blogID)) $blog_ID=1;
diff --git a/wp-admin/b2verifauth.php b/wp-admin/b2verifauth.php
index f8ba6e677e..61961536af 100644
--- a/wp-admin/b2verifauth.php
+++ b/wp-admin/b2verifauth.php
@@ -1,6 +1,7 @@