r50473 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r50472‎ | r50473 | r50474 >
Date:11:35, 11 May 2009
Author:tstarling
Status:deferred
Tags:
Comment:
Proposed fix for bug 16937: pg_version() missing server version due to PHP bug.
Modified paths:
  • /trunk/phase3/includes/db/DatabasePostgres.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/db/DatabasePostgres.php
@@ -1076,12 +1076,15 @@
10771077 */
10781078 function getServerVersion() {
10791079 $versionInfo = pg_version( $this->mConn );
1080 - if ( isset( $versionInfo['server'] ) ) {
 1080+ if ( version_compare( $versionInfo['client'], '7.4.0', 'lt' ) ) {
 1081+ // Old client, abort install
 1082+ $this->numeric_version = '7.3 or earlier';
 1083+ } elseif ( isset( $versionInfo['server'] ) ) {
 1084+ // Normal client
10811085 $this->numeric_version = $versionInfo['server'];
10821086 } else {
1083 - // There's no way to identify the precise version before 7.4, but
1084 - // it doesn't matter anyway since we're just going to give an error.
1085 - $this->numeric_version = '7.3 or earlier';
 1087+ // Bug 16937: broken pgsql extension from PHP<5.3
 1088+ $this->numeric_version = pg_parameter_status( $this->mConn, 'server_version' );
10861089 }
10871090 return $this->numeric_version;
10881091 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r50474* Backported r50473, bug 16937: fixed PostgreSQL installation on Windows, wor...tstarling11:44, 11 May 2009

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r45624* (bug 16937) Show appropriate error message when someone attempts an install...tstarling00:53, 10 January 2009

Status & tagging log