* include required Database object (according to database type)
authorDomas Mituzas <midom@users.mediawiki.org>
Wed, 9 Jun 2004 16:13:04 +0000 (16:13 +0000)
committerDomas Mituzas <midom@users.mediawiki.org>
Wed, 9 Jun 2004 16:13:04 +0000 (16:13 +0000)
* define wgIsMySQL and wgIsPg global variables

includes/DatabaseFunctions.php

index 90bb40f..6244ea7 100644 (file)
@@ -1,4 +1,5 @@
 <?php
+# $Id$
 
 # Backwards compatibility wrapper for Database.php
 
 # not access the $wgDatabase variable directly unless
 # you intend to set it. Use wfGetDB().
 
-require_once( "Database.php" );
+$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)