From: Greg Sabino Mullane Date: Tue, 3 Apr 2007 22:15:30 +0000 (+0000) Subject: Enforce a consistent datestyle, just in case. X-Git-Tag: 1.31.0-rc.0~53482 X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=347bf78ab638b8deb2d062c318167e727f876b31;p=lhc%2Fweb%2Fwiklou.git Enforce a consistent datestyle, just in case. --- diff --git a/includes/DatabasePostgres.php b/includes/DatabasePostgres.php index 87e8d80bed..c280f487c8 100644 --- a/includes/DatabasePostgres.php +++ b/includes/DatabasePostgres.php @@ -427,6 +427,22 @@ class DatabasePostgres extends Database { dieout(""); } + print "
  • Setting the datestyle to ISO, YMD for user \"$user\" ..."; + $SQL = "ALTER USER $safeuser SET datestyle = 'ISO, YMD'"; + $result = pg_query($this->mConn, $SQL); + if (!$result) { + print "FAILED.
  • \n"; + dieout(""); + } + print "OK\n"; + ## Set for the rest of this session + $SQL = "SET datestyle = 'ISO, YMD'"; + $result = pg_query($this->mConn, $SQL); + if (!$result) { + print "
  • Failed to set datestyle
  • \n"; + dieout(""); + } + ## Fix up the search paths if needed print "
  • Setting the search path for user \"$user\" ..."; $path = $this->quote_ident($wgDBmwschema);