-# $Id$
-
-# Backwards compatibility wrapper for Database.php
-
-# I imagine this file will eventually become a backwards
-# compatibility wrapper around a load balancer object, and
-# the load balancer will finally call Database, which will
-# represent a single connection
-
-# NB: This file follows a connect on demand scheme. Do
-# not access the $wgDatabase variable directly unless
-# you intend to set it. Use wfGetDB().
-
-$wgIsMySQL=false;
-$wgIsPg=false;
-
-if ($wgDBtype=="mysql") {
- require_once( "Database.php" );
- $wgIsMySQL=true;
-} elseif ($wgDBtype=="pgsql") {
- require_once( "DatabasePostgreSQL.php" );
- $wgIsPg=true;
-}
-
-# Query the database
-# $db: DB_READ = -1 read from slave (or only server)
-# DB_WRITE = -2 write to master (or only server)
-# 0,1,2,... query a database with a specific index
-# Replication is not actually implemented just yet
-# Usually aborts on failure
-# If errors are explicitly ignored, returns success
-function wfQuery( $sql, $db, $fname = "" )
-{
- global $wgDatabase, $wgDBserver, $wgDBuser, $wgDBpassword, $wgDBname,
- $wgDebugDumpSql, $wgBufferSQLResults, $wgIgnoreSQLErrors;
-
+/**
+ * Legacy database functions, for compatibility with pre-1.3 code
+ * NOTE: this file is no longer loaded by default.
+ *
+ */
+
+/**
+ * Usually aborts on failure
+ * If errors are explicitly ignored, returns success
+ * @param $sql String: SQL query
+ * @param $db Mixed: database handler
+ * @param $fname String: name of the php function calling
+ */
+function wfQuery( $sql, $db, $fname = '' ) {