Localisation updates from http://translatewiki.net.
[lhc/web/wiklou.git] / includes / installer / PostgresInstaller.php
index 544fe85..3ac2b3a 100644 (file)
@@ -2,6 +2,21 @@
 /**
  * PostgreSQL-specific installer.
  *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
  * @file
  * @ingroup Deployment
  */
@@ -45,7 +60,7 @@ class PostgresInstaller extends DatabaseInstaller {
                        $this->getTextBox( 'wgDBserver', 'config-db-host', array(), $this->parent->getHelpBox( 'config-db-host-help' ) ) .
                        $this->getTextBox( 'wgDBport', 'config-db-port' ) .
                        Html::openElement( 'fieldset' ) .
-                       Html::element( 'legend', array(), wfMsg( 'config-db-wiki-settings' ) ) .
+                       Html::element( 'legend', array(), wfMessage( 'config-db-wiki-settings' )->text() ) .
                        $this->getTextBox( 'wgDBname', 'config-db-name', array(), $this->parent->getHelpBox( 'config-db-name-help' ) ) .
                        $this->getTextBox( 'wgDBmwschema', 'config-db-schema', array(), $this->parent->getHelpBox( 'config-db-schema-help' ) ) .
                        Html::closeElement( 'fieldset' ) .
@@ -431,10 +446,6 @@ class PostgresInstaller extends DatabaseInstaller {
                $conn = $status->value;
 
                $dbName = $this->getVar( 'wgDBname' );
-               //$schema = $this->getVar( 'wgDBmwschema' );
-               //$user = $this->getVar( 'wgDBuser' );
-               //$safeschema = $conn->addIdentifierQuotes( $schema );
-               //$safeuser = $conn->addIdentifierQuotes( $user );
 
                $exists = $conn->selectField( '"pg_catalog"."pg_database"', '1',
                        array( 'datname' => $dbName ), __METHOD__ );
@@ -466,14 +477,8 @@ class PostgresInstaller extends DatabaseInstaller {
                        }
                }
 
-               // If we created a user, alter it now to search the new schema by default
-               if ( $this->getVar( '_CreateDBAccount' ) ) {
-                       $conn->query( "ALTER ROLE $safeuser SET search_path = $safeschema, public",
-                               __METHOD__ );
-               }
-
                // Select the new schema in the current connection
-               $conn->query( "SET search_path = $safeschema" );
+               $conn->determineCoreSchema( $schema );
                return Status::newGood();
        }
 
@@ -493,10 +498,8 @@ class PostgresInstaller extends DatabaseInstaller {
                }
                $conn = $status->value;
 
-               //$schema = $this->getVar( 'wgDBmwschema' );
                $safeuser = $conn->addIdentifierQuotes( $this->getVar( 'wgDBuser' ) );
                $safepass = $conn->addQuotes( $this->getVar( 'wgDBpassword' ) );
-               //$safeschema = $conn->addIdentifierQuotes( $schema );
 
                // Check if the user already exists
                $userExists = $conn->roleExists( $this->getVar( 'wgDBuser' ) );
@@ -553,7 +556,7 @@ class PostgresInstaller extends DatabaseInstaller {
                 */
                $conn = $status->value;
 
-               if( $conn->tableExists( 'user' ) ) {
+               if( $conn->tableExists( 'archive' ) ) {
                        $status->warning( 'config-install-tables-exist' );
                        $this->enableLB();
                        return $status;