r45624 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r45623‎ | r45624 | r45625 >
Date:00:53, 10 January 2009
Author:tstarling
Status:ok
Tags:
Comment:
* (bug 16937) Show appropriate error message when someone attempts an install on PostgreSQL 7.3 or earlier.
* Fix some issues with the earlier migration of getServerVersion() to numeric only.
Modified paths:
  • /trunk/phase3/config/index.php (modified) (history)
  • /trunk/phase3/includes/db/DatabasePostgres.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/db/DatabasePostgres.php
@@ -1056,7 +1056,13 @@
10571057 */
10581058 function getServerVersion() {
10591059 $versionInfo = pg_version( $this->mConn );
1060 - $this->numeric_version = $versionInfo['server'];
 1060+ if ( isset( $versionInfo['server'] ) ) {
 1061+ $this->numeric_version = $versionInfo['server'];
 1062+ } else {
 1063+ // There's no way to identify the precise version before 7.4, but
 1064+ // it doesn't matter anyway since we're just going to give an error.
 1065+ $this->numeric_version = '7.3 or earlier';
 1066+ }
10611067 return $this->numeric_version;
10621068 }
10631069
Index: trunk/phase3/config/index.php
@@ -894,7 +894,7 @@
895895 continue;
896896 }
897897
898 - print "<li>Connected to $myver";
 898+ print "<li>Connected to {$conf->DBtype} $myver";
899899 if ($conf->DBtype == 'mysql') {
900900 if( version_compare( $myver, "4.0.14" ) < 0 ) {
901901 print "</li>\n";
@@ -945,7 +945,7 @@
946946 $wgDatabase->selectDB( $wgDBname );
947947 }
948948 else if ($conf->DBtype == 'postgres') {
949 - if( version_compare( $myver, "PostgreSQL 8.0" ) < 0 ) {
 949+ if( version_compare( $myver, "8.0" ) < 0 ) {
950950 dieout( "<b>Postgres 8.0 or later is required</b>. Aborting." );
951951 }
952952 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r45629* Tweaked docs...tstarling02:30, 10 January 2009
r50473Proposed fix for bug 16937: pg_version() missing server version due to PHP bug.tstarling11:35, 11 May 2009
r50474* Backported r50473, bug 16937: fixed PostgreSQL installation on Windows, wor...tstarling11:44, 11 May 2009

Status & tagging log