Bug 12768: make hasContraint schema aware. Thanks to Sven Klemm.
authorGreg Sabino Mullane <greg@users.mediawiki.org>
Mon, 4 Feb 2008 16:45:09 +0000 (16:45 +0000)
committerGreg Sabino Mullane <greg@users.mediawiki.org>
Mon, 4 Feb 2008 16:45:09 +0000 (16:45 +0000)
RELEASE-NOTES
includes/DatabasePostgres.php

index 4830788..2fa17f3 100644 (file)
@@ -153,6 +153,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
   and reject interwiki prefixes. PrefixSearch class centralizes this code,
   and the backend part can be overridden by the PrefixSearchBackend hook.
 * (bug 10365) Localization of Special:Version
+* When installing using Postgres, the Pl/Pgsql language is now checked for 
+  and installed when at the superuser level.
 
 === Bug fixes in 1.12 ===
 
@@ -355,6 +357,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * The comment of a time-limited protection now contains the date in the default format
 * (bug 12880) wfLoadExtensionMessages does not use $fallback from MessagesXx.php
 * (bug 12885) Correction for Russian convertPlural function
+* (bug 12768) Make DatabasePostgres->hasContraint() schema aware.
 
 == Parser changes in 1.12 ==
 
index 47d10ae..124f2cd 100644 (file)
@@ -119,7 +119,8 @@ class DatabasePostgres extends Database {
        }
 
        function hasConstraint( $name ) {
-               $SQL = "SELECT 1 FROM pg_catalog.pg_constraint WHERE conname = '" . pg_escape_string( $name ) . "'";
+               global $wgDBmwschema;
+               $SQL = "SELECT 1 FROM pg_catalog.pg_constraint c, pg_catalog.pg_namespace n WHERE c.connamespace = n.oid AND conname = '" . pg_escape_string( $name ) . "' AND n.nspname = '" . pg_escape_string($wgDBmwschema) ."'";
                return $this->numRows($res = $this->doQuery($SQL));
        }