-# 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().
-$wgDatabase = false;
-
-$wgIsMySQL=false;
-$wgIsPg=false;
-
-if ($wgDBtype=="mysql") {
- require_once( "Database.php" );
- $wgIsMySQL=true;
-} elseif ($wgDBtype=="pgsql") {
- require_once( "DatabasePostgreSQL.php" );
- $wgIsPg=true;
-}
-
-
-# Replication is not actually implemented just yet
-# Usually aborts on failure
-# If errors are explicitly ignored, returns success
-function wfQuery( $sql, $db, $fname = "" )
-{
+/**
+ * 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 = '' ) {