Index: wp-includes/wp-db.php
===================================================================
--- wp-includes/wp-db.php	(revision 17501)
+++ wp-includes/wp-db.php	(working copy)
@@ -55,103 +55,101 @@
 	 * Whether to show SQL/DB errors
 	 *
 	 * @since 0.71
-	 * @access private
 	 * @var bool
 	 */
-	var $show_errors = false;
+	private $show_errors = false;
 
 	/**
 	 * Whether to suppress errors during the DB bootstrapping.
 	 *
-	 * @access private
 	 * @since 2.5.0
 	 * @var bool
 	 */
-	var $suppress_errors = false;
+	private $suppress_errors = false;
 
 	/**
 	 * The last error during query.
 	 *
 	 * @see get_last_error()
 	 * @since 2.5.0
-	 * @access private
 	 * @var string
 	 */
-	var $last_error = '';
+	private $last_error = '';
 
 	/**
 	 * Amount of queries made
 	 *
 	 * @since 1.2.0
-	 * @access private
 	 * @var int
 	 */
-	var $num_queries = 0;
+	private $num_queries = 0;
 
 	/**
 	 * Count of rows returned by previous query
 	 *
 	 * @since 1.2.0
-	 * @access private
 	 * @var int
 	 */
-	var $num_rows = 0;
+	private $num_rows = 0;
 
 	/**
 	 * Count of affected rows by previous query
 	 *
 	 * @since 0.71
-	 * @access private
 	 * @var int
 	 */
-	var $rows_affected = 0;
+	private $rows_affected = 0;
 
 	/**
 	 * The ID generated for an AUTO_INCREMENT column by the previous query (usually INSERT).
 	 *
 	 * @since 0.71
-	 * @access public
 	 * @var int
 	 */
-	var $insert_id = 0;
+	public $insert_id = 0;
 
 	/**
 	 * Saved result of the last query made
 	 *
 	 * @since 1.2.0
-	 * @access private
 	 * @var array
 	 */
-	var $last_query;
+	private $last_query;
 
 	/**
 	 * Results of the last query made
 	 *
 	 * @since 1.0.0
-	 * @access private
 	 * @var array|null
 	 */
-	var $last_result;
+	private $last_result;
 
 	/**
 	 * Saved info on the table column
 	 *
 	 * @since 1.2.0
-	 * @access private
 	 * @var array
 	 */
-	var $col_info;
+	private $col_info;
 
 	/**
 	 * Saved queries that were executed
 	 *
 	 * @since 1.5.0
-	 * @access private
 	 * @var array
 	 */
-	var $queries;
+	private $queries;
 
 	/**
+	 * Timer start value, for debugging purposes.
+	 *
+	 * @since 1.5.0
+	 * @var float
+	 * @see wpdb::timer_start()
+	 */
+	private $time_start;
+
+	/**
 	 * WordPress table prefix
 	 *
 	 * You can set this to have multiple WordPress installations
@@ -160,46 +158,43 @@
 	 *
 	 * @since 0.71
 	 * @access private
+	 * @todo see http://core.trac.wordpress.org/ticket/16756
 	 * @var string
 	 */
-	var $prefix = '';
+	public $prefix = '';
 
 	/**
 	 * Whether the database queries are ready to start executing.
 	 *
 	 * @since 2.5.0
-	 * @access private
 	 * @var bool
 	 */
-	var $ready = false;
+	private $ready = false;
 
 	/**
 	 * {@internal Missing Description}}
 	 *
 	 * @since 3.0.0
-	 * @access public
 	 * @var int
 	 */
-	var $blogid = 0;
+	public $blogid = 0;
 
 	/**
 	 * {@internal Missing Description}}
 	 *
 	 * @since 3.0.0
-	 * @access public
 	 * @var int
 	 */
-	var $siteid = 0;
+	public $siteid = 0;
 
 	/**
 	 * List of WordPress per-blog tables
 	 *
 	 * @since 2.5.0
-	 * @access private
 	 * @see wpdb::tables()
 	 * @var array
 	 */
-	var $tables = array( 'posts', 'comments', 'links', 'options', 'postmeta',
+	private $tables = array( 'posts', 'comments', 'links', 'options', 'postmeta',
 		'terms', 'term_taxonomy', 'term_relationships', 'commentmeta' );
 
 	/**
@@ -208,113 +203,101 @@
 	 * categories, post2cat, and link2cat were deprecated in 2.3.0, db version 5539
 	 *
 	 * @since 2.9.0
-	 * @access private
 	 * @see wpdb::tables()
 	 * @var array
 	 */
-	var $old_tables = array( 'categories', 'post2cat', 'link2cat' );
+	private $old_tables = array( 'categories', 'post2cat', 'link2cat' );
 
 	/**
 	 * List of WordPress global tables
 	 *
 	 * @since 3.0.0
-	 * @access private
 	 * @see wpdb::tables()
 	 * @var array
 	 */
-	var $global_tables = array( 'users', 'usermeta' );
+	private $global_tables = array( 'users', 'usermeta' );
 
 	/**
 	 * List of Multisite global tables
 	 *
 	 * @since 3.0.0
-	 * @access private
 	 * @see wpdb::tables()
 	 * @var array
 	 */
-	var $ms_global_tables = array( 'blogs', 'signups', 'site', 'sitemeta',
+	private $ms_global_tables = array( 'blogs', 'signups', 'site', 'sitemeta',
 		'sitecategories', 'registration_log', 'blog_versions' );
 
 	/**
 	 * WordPress Comments table
 	 *
 	 * @since 1.5.0
-	 * @access public
 	 * @var string
 	 */
-	var $comments;
+	public $comments;
 
 	/**
 	 * WordPress Comment Metadata table
 	 *
 	 * @since 2.9.0
-	 * @access public
 	 * @var string
 	 */
-	var $commentmeta;
+	public $commentmeta;
 
 	/**
 	 * WordPress Links table
 	 *
 	 * @since 1.5.0
-	 * @access public
 	 * @var string
 	 */
-	var $links;
+	public $links;
 
 	/**
 	 * WordPress Options table
 	 *
 	 * @since 1.5.0
-	 * @access public
 	 * @var string
 	 */
-	var $options;
+	public $options;
 
 	/**
 	 * WordPress Post Metadata table
 	 *
 	 * @since 1.5.0
-	 * @access public
 	 * @var string
 	 */
-	var $postmeta;
+	public $postmeta;
 
 	/**
 	 * WordPress Posts table
 	 *
 	 * @since 1.5.0
-	 * @access public
 	 * @var string
 	 */
-	var $posts;
+	public $posts;
 
 	/**
 	 * WordPress Terms table
 	 *
 	 * @since 2.3.0
-	 * @access public
 	 * @var string
 	 */
-	var $terms;
+	public $terms;
 
 	/**
 	 * WordPress Term Relationships table
 	 *
 	 * @since 2.3.0
-	 * @access public
 	 * @var string
 	 */
-	var $term_relationships;
+	public $term_relationships;
 
 	/**
 	 * WordPress Term Taxonomy table
 	 *
 	 * @since 2.3.0
-	 * @access public
 	 * @var string
 	 */
-	var $term_taxonomy;
+	public $term_taxonomy;
 
 	/*
 	 * Global and Multisite tables
@@ -324,82 +307,73 @@
 	 * WordPress User Metadata table
 	 *
 	 * @since 2.3.0
-	 * @access public
 	 * @var string
 	 */
-	var $usermeta;
+	public $usermeta;
 
 	/**
 	 * WordPress Users table
 	 *
 	 * @since 1.5.0
-	 * @access public
 	 * @var string
 	 */
-	var $users;
+	public $users;
 
 	/**
 	 * Multisite Blogs table
 	 *
 	 * @since 3.0.0
-	 * @access public
 	 * @var string
 	 */
-	var $blogs;
+	public $blogs;
 
 	/**
 	 * Multisite Blog Versions table
 	 *
 	 * @since 3.0.0
-	 * @access public
 	 * @var string
 	 */
-	var $blog_versions;
+	public $blog_versions;
 
 	/**
 	 * Multisite Registration Log table
 	 *
 	 * @since 3.0.0
-	 * @access public
 	 * @var string
 	 */
-	var $registration_log;
+	public $registration_log;
 
 	/**
 	 * Multisite Signups table
 	 *
 	 * @since 3.0.0
-	 * @access public
 	 * @var string
 	 */
-	var $signups;
+	public $signups;
 
 	/**
 	 * Multisite Sites table
 	 *
 	 * @since 3.0.0
-	 * @access public
 	 * @var string
 	 */
-	var $site;
+	public $site;
 
 	/**
 	 * Multisite Sitewide Terms table
 	 *
 	 * @since 3.0.0
-	 * @access public
 	 * @var string
 	 */
-	var $sitecategories;
+	public $sitecategories;
 
 	/**
 	 * Multisite Site Metadata table
 	 *
 	 * @since 3.0.0
-	 * @access public
 	 * @var string
 	 */
-	var $sitemeta;
+	public $sitemeta;
 
 	/**
 	 * Format specifiers for DB columns. Columns not listed here default to %s. Initialized during WP load.
@@ -411,78 +385,54 @@
 	 * @see wpdb:insert()
 	 * @see wpdb:update()
 	 * @see wp_set_wpdb_vars()
-	 * @access public
 	 * @var array
 	 */
-	var $field_types = array();
+	public $field_types = array();
 
 	/**
 	 * Database table columns charset
 	 *
 	 * @since 2.2.0
-	 * @access public
 	 * @var string
 	 */
-	var $charset;
+	public $charset;
 
 	/**
 	 * Database table columns collate
 	 *
 	 * @since 2.2.0
-	 * @access public
 	 * @var string
 	 */
-	var $collate;
+	public $collate;
 
 	/**
 	 * Whether to use mysql_real_escape_string
 	 *
 	 * @since 2.8.0
-	 * @access public
 	 * @var bool
 	 */
-	var $real_escape = false;
+	public $real_escape = false;
 
 	/**
 	 * Database Username
 	 *
 	 * @since 2.9.0
-	 * @access private
 	 * @var string
 	 */
-	var $dbuser;
+	private $dbuser;
 
 	/**
 	 * A textual description of the last query/get_row/get_var call
 	 *
 	 * @since 3.0.0
-	 * @access public
 	 * @var string
 	 */
-	var $func_call;
+	public $func_call;
 
 	/**
 	 * Connects to the database server and selects a database
 	 *
-	 * PHP4 compatibility layer for calling the PHP5 constructor.
-	 *
-	 * @uses wpdb::__construct() Passes parameters and returns result
-	 * @since 0.71
-	 *
-	 * @param string $dbuser MySQL database user
-	 * @param string $dbpassword MySQL database password
-	 * @param string $dbname MySQL database name
-	 * @param string $dbhost MySQL database host
-	 */
-	function wpdb( $dbuser, $dbpassword, $dbname, $dbhost ) {
-		return $this->__construct( $dbuser, $dbpassword, $dbname, $dbhost );
-	}
-
-	/**
-	 * Connects to the database server and selects a database
-	 *
-	 * PHP5 style constructor for compatibility with PHP5. Does
-	 * the actual setting up of the class properties and connection
+	 * The actual setting up of the class properties and connection
 	 * to the database.
 	 *
 	 * @link http://core.trac.wordpress.org/ticket/3354
@@ -510,13 +460,15 @@
 	}
 
 	/**
-	 * PHP5 style destructor and will run when database object is destroyed.
+	 * Destructor that will run when database object is destroyed.
 	 *
+	 * Callback of register_shutdown_function
+	 *
 	 * @see wpdb::__construct()
 	 * @since 2.0.8
 	 * @return bool true
 	 */
-	function __destruct() {
+	public function __destruct() {
 		return true;
 	}
 
@@ -525,7 +477,7 @@
 	 *
 	 * @since 3.1.0
 	 */
-	function init_charset() {
+	private function init_charset() {
 		if ( function_exists('is_multisite') && is_multisite() ) {
 			$this->charset = 'utf8';
 			if ( defined( 'DB_COLLATE' ) && DB_COLLATE )
@@ -549,7 +501,7 @@
 	 * @param string   $charset The character set (optional)
 	 * @param string   $collate The collation (optional)
 	 */
-	function set_charset($dbh, $charset = null, $collate = null) {
+	private function set_charset($dbh, $charset = null, $collate = null) {
 		if ( !isset($charset) )
 			$charset = $this->charset;
 		if ( !isset($collate) )
@@ -575,7 +527,7 @@
 	 * @param string $prefix Alphanumeric name for the new prefix.
 	 * @return string|WP_Error Old prefix or WP_Error on error
 	 */
-	function set_prefix( $prefix, $set_table_names = true ) {
+	public function set_prefix( $prefix, $set_table_names = true ) {
 
 		if ( preg_match( '|[^a-z0-9_]|i', $prefix ) )
 			return new WP_Error('invalid_db_prefix', /*WP_I18N_DB_BAD_PREFIX*/'Invalid database prefix'/*/WP_I18N_DB_BAD_PREFIX*/);
@@ -609,12 +561,11 @@
 	 * Sets blog id.
 	 *
 	 * @since 3.0.0
-	 * @access public
 	 * @param int $blog_id
 	 * @param int $site_id Optional.
 	 * @return string previous blog id
 	 */
-	function set_blog_id( $blog_id, $site_id = 0 ) {
+	public function set_blog_id( $blog_id, $site_id = 0 ) {
 		if ( ! empty( $site_id ) )
 			$this->siteid = $site_id;
 
@@ -640,7 +591,7 @@
 	 * @param int $blog_id Optional.
 	 * @return string Blog prefix.
 	 */
-	function get_blog_prefix( $blog_id = null ) {
+	public function get_blog_prefix( $blog_id = null ) {
 		if ( is_multisite() ) {
 			if ( null === $blog_id )
 				$blog_id = $this->blogid;
@@ -681,7 +632,7 @@
 	 * @param int $blog_id Optional. The blog_id to prefix. Defaults to wpdb::$blogid. Used only when prefix is requested.
 	 * @return array Table names. When a prefix is requested, the key is the unprefixed table name.
 	 */
-	function tables( $scope = 'all', $prefix = true, $blog_id = 0 ) {
+	public function tables( $scope = 'all', $prefix = true, $blog_id = 0 ) {
 		switch ( $scope ) {
 			case 'all' :
 				$tables = array_merge( $this->global_tables, $this->tables );
@@ -743,7 +694,7 @@
 	 * @param resource $dbh Optional link identifier.
 	 * @return null Always null.
 	 */
-	function select( $db, $dbh = null) {
+	private function select( $db, $dbh = null) {
 		if ( is_null($dbh) )
 			$dbh = $this->dbh;
 
@@ -766,12 +717,11 @@
 	 *
 	 * @see addslashes()
 	 * @since 2.8.0
-	 * @access private
 	 *
 	 * @param string $string
 	 * @return string
 	 */
-	function _weak_escape( $string ) {
+	private function _weak_escape( $string ) {
 		return addslashes( $string );
 	}
 
@@ -781,12 +731,11 @@
 	 * @see mysql_real_escape_string()
 	 * @see addslashes()
 	 * @since 2.8.0
-	 * @access private
 	 *
 	 * @param  string $string to escape
 	 * @return string escaped
 	 */
-	function _real_escape( $string ) {
+	private function _real_escape( $string ) {
 		if ( $this->dbh && $this->real_escape )
 			return mysql_real_escape_string( $string, $this->dbh );
 		else
@@ -799,12 +748,11 @@
 	 * @uses wpdb::_escape()
 	 * @uses wpdb::_real_escape()
 	 * @since  2.8.0
-	 * @access private
 	 *
 	 * @param  string|array $data
 	 * @return string|array escaped
 	 */
-	function _escape( $data ) {
+	private function _escape( $data ) {
 		if ( is_array( $data ) ) {
 			foreach ( (array) $data as $k => $v ) {
 				if ( is_array($v) )
@@ -828,7 +776,7 @@
 	 * @param string|array $data to escape
 	 * @return string|array escaped as query safe string
 	 */
-	function escape( $data ) {
+	public function escape( $data ) {
 		if ( is_array( $data ) ) {
 			foreach ( (array) $data as $k => $v ) {
 				if ( is_array( $v ) )
@@ -851,7 +799,7 @@
 	 * @param string $string to escape
 	 * @return void
 	 */
-	function escape_by_ref( &$string ) {
+	public function escape_by_ref( &$string ) {
 		$string = $this->_real_escape( $string );
 	}
 
@@ -891,7 +839,7 @@
 	 * @return null|false|string Sanitized query string, null if there is no query, false if there is an error and string
 	 * 	if there was something to prepare
 	 */
-	function prepare( $query = null ) { // ( $query, *$args )
+	public function prepare( $query = null ) { // ( $query, *$args )
 		if ( is_null( $query ) )
 			return;
 
@@ -916,7 +864,7 @@
 	 * @param string $str The error to display
 	 * @return bool False if the showing of errors is disabled.
 	 */
-	function print_error( $str = '' ) {
+	private function print_error( $str = '' ) {
 		global $EZSQL_ERROR;
 
 		if ( !$str )
@@ -973,7 +921,7 @@
 	 * @param bool $show Whether to show or hide errors
 	 * @return bool Old value for showing errors.
 	 */
-	function show_errors( $show = true ) {
+	public function show_errors( $show = true ) {
 		$errors = $this->show_errors;
 		$this->show_errors = $show;
 		return $errors;
@@ -989,7 +937,7 @@
 	 *
 	 * @return bool Whether showing of errors was active
 	 */
-	function hide_errors() {
+	public function hide_errors() {
 		$show = $this->show_errors;
 		$this->show_errors = false;
 		return $show;
@@ -1006,7 +954,7 @@
 	 * @param bool $suppress Optional. New value. Defaults to true.
 	 * @return bool Old value
 	 */
-	function suppress_errors( $suppress = true ) {
+	public function suppress_errors( $suppress = true ) {
 		$errors = $this->suppress_errors;
 		$this->suppress_errors = (bool) $suppress;
 		return $errors;
@@ -1018,7 +966,7 @@
 	 * @since 0.71
 	 * @return void
 	 */
-	function flush() {
+	private function flush() {
 		$this->last_result = array();
 		$this->col_info    = null;
 		$this->last_query  = null;
@@ -1075,7 +1023,7 @@
 	 * @param string $query Database query
 	 * @return int|false Number of rows affected/selected or false on error
 	 */
-	function query( $query ) {
+	public function query( $query ) {
 		if ( ! $this->ready )
 			return false;
 
@@ -1157,7 +1105,7 @@
 	 * 	A format is one of '%d', '%s' (decimal number, string). If omitted, all values in $data will be treated as strings unless otherwise specified in wpdb::$field_types.
 	 * @return int|false The number of rows inserted, or false on error.
 	 */
-	function insert( $table, $data, $format = null ) {
+	public function insert( $table, $data, $format = null ) {
 		return $this->_insert_replace_helper( $table, $data, $format, 'INSERT' );
 	}
 
@@ -1180,7 +1128,7 @@
 	 * 	A format is one of '%d', '%s' (decimal number, string). If omitted, all values in $data will be treated as strings unless otherwise specified in wpdb::$field_types.
 	 * @return int|false The number of rows affected, or false on error.
 	 */
-	function replace( $table, $data, $format = null ) {
+	public function replace( $table, $data, $format = null ) {
 		return $this->_insert_replace_helper( $table, $data, $format, 'REPLACE' );
 	}
 
@@ -1189,7 +1137,6 @@
 	 *
 	 * Runs an insert or replace query based on $type argument.
 	 *
-	 * @access private
 	 * @since 3.0.0
 	 * @see wpdb::prepare()
 	 * @see wpdb::$field_types
@@ -1201,7 +1148,7 @@
 	 * 	A format is one of '%d', '%s' (decimal number, string). If omitted, all values in $data will be treated as strings unless otherwise specified in wpdb::$field_types.
 	 * @return int|false The number of rows affected, or false on error.
 	 */
-	function _insert_replace_helper( $table, $data, $format = null, $type = 'INSERT' ) {
+	private function _insert_replace_helper( $table, $data, $format = null, $type = 'INSERT' ) {
 		if ( ! in_array( strtoupper( $type ), array( 'REPLACE', 'INSERT' ) ) )
 			return false;
 		$formats = $format = (array) $format;
@@ -1241,7 +1188,7 @@
 	 * @param array|string $format_where Optional. An array of formats to be mapped to each of the values in $where. If string, that format will be used for all of the items in $where.  A format is one of '%d', '%s' (decimal number, string).  If omitted, all values in $where will be treated as strings.
 	 * @return int|false The number of rows updated, or false on error.
 	 */
-	function update( $table, $data, $where, $format = null, $where_format = null ) {
+	public function update( $table, $data, $where, $format = null, $where_format = null ) {
 		if ( ! is_array( $data ) || ! is_array( $where ) )
 			return false;
 
@@ -1286,7 +1233,7 @@
 	 * @param int $y Optional. Row of value to return.  Indexed from 0.
 	 * @return string|null Database query result (as string), or null on failure
 	 */
-	function get_var( $query = null, $x = 0, $y = 0 ) {
+	public function get_var( $query = null, $x = 0, $y = 0 ) {
 		$this->func_call = "\$db->get_var(\"$query\", $x, $y)";
 		if ( $query )
 			$this->query( $query );
@@ -1313,7 +1260,7 @@
 	 * @param int $y Optional. Row to return. Indexed from 0.
 	 * @return mixed Database query result in format specifed by $output or null on failure
 	 */
-	function get_row( $query = null, $output = OBJECT, $y = 0 ) {
+	public function get_row( $query = null, $output = OBJECT, $y = 0 ) {
 		$this->func_call = "\$db->get_row(\"$query\",$output,$y)";
 		if ( $query )
 			$this->query( $query );
@@ -1347,7 +1294,7 @@
 	 * @param int $x Optional. Column to return. Indexed from 0.
 	 * @return array Database query result. Array indexed from 0 by SQL result row number.
 	 */
-	function get_col( $query = null , $x = 0 ) {
+	public function get_col( $query = null , $x = 0 ) {
 		if ( $query )
 			$this->query( $query );
 
@@ -1372,7 +1319,7 @@
 	 * 	With OBJECT_K, return an associative array of row objects keyed by the value of each row's first column's value.  Duplicate keys are discarded.
 	 * @return mixed Database query results
 	 */
-	function get_results( $query = null, $output = OBJECT ) {
+	public function get_results( $query = null, $output = OBJECT ) {
 		$this->func_call = "\$db->get_results(\"$query\", $output)";
 
 		if ( $query )
@@ -1420,7 +1367,7 @@
 	 * @param int $col_offset Optional. 0: col name. 1: which table the col's in. 2: col's max length. 3: if the col is numeric. 4: col's type
 	 * @return mixed Column Results
 	 */
-	function get_col_info( $info_type = 'name', $col_offset = -1 ) {
+	public function get_col_info( $info_type = 'name', $col_offset = -1 ) {
 		if ( $this->col_info ) {
 			if ( $col_offset == -1 ) {
 				$i = 0;
@@ -1443,7 +1390,7 @@
 	 *
 	 * @return true
 	 */
-	function timer_start() {
+	private function timer_start() {
 		$mtime            = explode( ' ', microtime() );
 		$this->time_start = $mtime[1] + $mtime[0];
 		return true;
@@ -1456,7 +1403,7 @@
 	 *
 	 * @return int Total time spent on the query, in milliseconds
 	 */
-	function timer_stop() {
+	private function timer_stop() {
 		$mtime      = explode( ' ', microtime() );
 		$time_end   = $mtime[1] + $mtime[0];
 		$time_total = $time_end - $this->time_start;
@@ -1474,7 +1421,7 @@
 	 * @param string $error_code Optional. A Computer readable string to identify the error.
 	 * @return false|void
 	 */
-	function bail( $message, $error_code = '500' ) {
+	private function bail( $message, $error_code = '500' ) {
 		if ( !$this->show_errors ) {
 			if ( class_exists( 'WP_Error' ) )
 				$this->error = new WP_Error($error_code, $message);
@@ -1494,7 +1441,7 @@
 	 *
 	 * @return WP_Error
 	 */
-	function check_database_version() {
+	public function check_database_version() {
 		global $wp_version, $required_mysql_version;
 		// Make sure the server has the required MySQL version
 		if ( version_compare($this->db_version(), $required_mysql_version, '<') )
@@ -1510,7 +1457,7 @@
 	 *
 	 * @return bool True if collation is supported, false if version does not
 	 */
-	function supports_collation() {
+	public function supports_collation() {
 		return $this->has_cap( 'collation' );
 	}
 
@@ -1523,7 +1470,7 @@
 	 * @param string $db_cap the feature
 	 * @return bool
 	 */
-	function has_cap( $db_cap ) {
+	public function has_cap( $db_cap ) {
 		$version = $this->db_version();
 
 		switch ( strtolower( $db_cap ) ) {
@@ -1548,7 +1495,7 @@
 	 *
 	 * @return string The name of the calling function
 	 */
-	function get_caller() {
+	private function get_caller() {
 		$trace  = array_reverse( debug_backtrace() );
 		$caller = array();
 
@@ -1568,7 +1515,7 @@
 	 *
 	 * @return false|string false on failure, version number on success
 	 */
-	function db_version() {
+	public function db_version() {
 		return preg_replace( '/[^0-9.].*/', '', mysql_get_server_info( $this->dbh ) );
 	}
 }
