]> scripts.mit.edu Git - autoinstallsdev/mediawiki.git/blobdiff - maintenance/updaters.inc
MediaWiki 1.16.3
[autoinstallsdev/mediawiki.git] / maintenance / updaters.inc
index 81c260fcb7c620de2dcaa464d547bc235fc9f5e9..594d4d78592374f05c23c6292fb640e820972995 100644 (file)
@@ -1520,6 +1520,8 @@ function do_postgres_updates() {
        else {
                $search_path = $conf['search_path'];
        }
+
+       $safeuser = $wgDatabase->quote_ident($wgDBuser);
        if( strpos( $search_path, $wgDBmwschema ) === false ) {
                wfOut( "Adding in schema \"$wgDBmwschema\" to search_path for user \"$wgDBuser\"\n" );
                $search_path = "$wgDBmwschema, $search_path";
@@ -1530,7 +1532,7 @@ function do_postgres_updates() {
        }
        $search_path = str_replace( ', ,', ',', $search_path);
        if( array_key_exists( 'search_path', $conf ) === false || $search_path != $conf['search_path'] ) {
-               $wgDatabase->doQuery( "ALTER USER $wgDBuser SET search_path = $search_path" );
+               $wgDatabase->doQuery( "ALTER USER $safeuser SET search_path = $search_path" );
                $wgDatabase->doQuery( "SET search_path = $search_path" );
        }
        else {
@@ -1546,7 +1548,7 @@ function do_postgres_updates() {
                $value = $goodconf[$key];
                if( !array_key_exists( $key, $conf ) or $conf[$key] !== $value ) {
                        wfOut( "Setting $key to '$value' for user \"$wgDBuser\"\n" );
-                       $wgDatabase->doQuery( "ALTER USER $wgDBuser SET $key = '$value'" );
+                       $wgDatabase->doQuery( "ALTER USER $safeuser SET $key = '$value'" );
                        $wgDatabase->doQuery( "SET $key = '$value'" );
                }
                else {
@@ -1970,8 +1972,8 @@ function do_postgres_updates() {
                        'ctype' => 'U',
                        'mw_version' => $wgVersion,
                        'pg_version' => $version,
-                       'sql_version' => '$LastChangedRevision: 62877 $',
-                       'sql_date' => '$LastChangedDate: 2010-02-24 01:13:36 +1100 (Wed, 24 Feb 2010) $',
+                       'sql_version' => '$LastChangedRevision: 84593 $',
+                       'sql_date' => '$LastChangedDate: 2011-03-23 23:14:46 +1100 (Wed, 23 Mar 2011) $',
                ) );
        return;
 }