X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Finstaller%2FPostgresInstaller.php;h=16b47e2869dd3deb202522746320adfe6ab58f2b;hb=f1907d3f012cf3ae4b56e256fb71cc04b5ec33ee;hp=1a3fb104f6758ce490b05bcc7d61d47c850d3bb1;hpb=237d3271fd313ebe09858a5c442a91216a7b61cf;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/installer/PostgresInstaller.php b/includes/installer/PostgresInstaller.php index 1a3fb104f6..16b47e2869 100644 --- a/includes/installer/PostgresInstaller.php +++ b/includes/installer/PostgresInstaller.php @@ -46,7 +46,8 @@ class PostgresInstaller extends DatabaseInstaller { '_InstallUser' => 'postgres', ]; - public $minimumVersion = '8.3'; + public static $minimumVersion = '9.2'; + protected static $notMiniumumVerisonMessage = 'config-postgres-old'; public $maxRoleSearchDepth = 5; protected $pgConns = []; @@ -124,8 +125,9 @@ class PostgresInstaller extends DatabaseInstaller { // Check version $version = $conn->getServerVersion(); - if ( version_compare( $version, $this->minimumVersion ) < 0 ) { - return Status::newFatal( 'config-postgres-old', $this->minimumVersion, $version ); + $status = static::meetsMinimumRequirement( $conn->getServerVersion() ); + if ( !$status->isOK() ) { + return $status; } $this->setVar( 'wgDBuser', $this->getVar( '_InstallUser' ) ); @@ -150,7 +152,7 @@ class PostgresInstaller extends DatabaseInstaller { /** * Open a PG connection with given parameters * @param string $user User name - * @param string $password Password + * @param string $password * @param string $dbName Database name * @param string $schema Database schema * @return Status @@ -637,7 +639,7 @@ class PostgresInstaller extends DatabaseInstaller { public function setupPLpgSQL() { // Connect as the install user, since it owns the database and so is - // the user that needs to run "CREATE LANGAUGE" + // the user that needs to run "CREATE LANGUAGE" $status = $this->getPgConnection( 'create-schema' ); if ( !$status->isOK() ) { return $status;