From: Platonides Date: Fri, 5 Nov 2010 23:36:30 +0000 (+0000) Subject: dieout() function already takes into account if a is needed. X-Git-Tag: 1.31.0-rc.0~34052 X-Git-Url: https://git.heureux-cyclage.org/?a=commitdiff_plain;h=4147b8a5bbef20b6b784d6340e800ea1176d32b3;p=lhc%2Fweb%2Fwiklou.git dieout() function already takes into account if a is needed. --- diff --git a/includes/db/DatabaseMssql.php b/includes/db/DatabaseMssql.php index 0087e7407e..aceba9a7d4 100644 --- a/includes/db/DatabaseMssql.php +++ b/includes/db/DatabaseMssql.php @@ -824,7 +824,7 @@ class DatabaseMssql extends DatabaseBase { $res = $this->doQuery( $SQL ); if ( !$res ) { print "FAILED. Make sure that the user " . htmlspecialchars( $wgDBuser ) . " can write to the database\n"; - dieout( "" ); + dieout( "" ); } $this->doQuery( "DROP TABLE $ctest" ); diff --git a/includes/db/DatabasePostgres.php b/includes/db/DatabasePostgres.php index 5d29e25d89..16b558bca8 100644 --- a/includes/db/DatabasePostgres.php +++ b/includes/db/DatabasePostgres.php @@ -234,7 +234,7 @@ class DatabasePostgres extends DatabaseBase { $PGMINVER = '8.1'; if ( $version < $PGMINVER ) { print "FAILED. Required version is $PGMINVER. You have " . htmlspecialchars( $version ) . "\n"; - dieout( '' ); + dieout( '' ); } print 'version ' . htmlspecialchars( $this->numeric_version ) . " is OK.\n"; @@ -251,7 +251,7 @@ class DatabasePostgres extends DatabaseBase { $rows = $this->numRows( $res = $this->doQuery( $SQL ) ); if ( !$rows ) { print '
  • ERROR: Could not read permissions for user "' . htmlspecialchars( $superuser ) . "\"
  • \n"; - dieout( '' ); + dieout( '' ); } $perms = pg_fetch_result( $res, 0, 0 ); @@ -263,7 +263,7 @@ class DatabasePostgres extends DatabaseBase { if ( $perms != 1 && $perms != 3 ) { print '
  • ERROR: the user "' . htmlspecialchars( $superuser ) . '" cannot create other users. '; print 'Please use a different Postgres user.
  • '; - dieout( '' ); + dieout( '' ); } print '
  • Creating user ' . htmlspecialchars( $wgDBuser ) . '...'; $safepass = $this->addQuotes( $wgDBpassword ); @@ -281,7 +281,7 @@ class DatabasePostgres extends DatabaseBase { if ( $perms < 1 ) { print '
  • ERROR: the user "' . htmlspecialchars( $superuser ) . '" cannot create databases. '; print 'Please use a different Postgres user.
  • '; - dieout( '' ); + dieout( '' ); } print '
  • Creating database ' . htmlspecialchars( $wgDBname ) . '...'; $safename = $this->quote_ident( $wgDBname ); @@ -309,7 +309,7 @@ class DatabasePostgres extends DatabaseBase { @$this->mConn = pg_connect( $this->makeConnectionString( $connectVars ) ); if ( !$this->mConn ) { print "FAILED TO CONNECT!
  • "; - dieout( '' ); + dieout( '' ); } print "OK\n"; } @@ -323,7 +323,7 @@ class DatabasePostgres extends DatabaseBase { htmlspecialchars( $wgDBname ) . '".'; print 'Please see this article'; print " for instructions or ask on #postgresql on irc.freenode.net\n"; - dieout( '' ); + dieout( '' ); } print "OK\n"; print '
  • Ensuring that user "' . htmlspecialchars( $wgDBuser ) . @@ -343,7 +343,7 @@ class DatabasePostgres extends DatabaseBase { $result = $this->doQuery( "CREATE SCHEMA $safeschema AUTHORIZATION $safeuser" ); if ( !$result ) { print "FAILED.
  • \n"; - dieout( '' ); + dieout( '' ); } print "OK\n"; } else { @@ -361,7 +361,7 @@ class DatabasePostgres extends DatabaseBase { $res = $this->doQuery( $SQL ); if ( !$res ) { print "FAILED. Could not set rights for the user.\n"; - dieout( '' ); + dieout( '' ); } $this->doQuery( "SET search_path = $safeschema" ); $rows = $this->numRows( $res ); @@ -388,7 +388,7 @@ class DatabasePostgres extends DatabaseBase { print 'FAILED. Make sure tsearch2 is installed. See this article'; print " for instructions.\n"; - dieout( '' ); + dieout( '' ); } print "OK\n"; @@ -406,7 +406,7 @@ class DatabasePostgres extends DatabaseBase { print "FAILED to access " . htmlspecialchars( "pg_ts_$tname" ) . ". Make sure that the user \"". htmlspecialchars( $wgDBuser ) . "\" has SELECT access to all four tsearch2 tables\n"; - dieout( '' ); + dieout( '' ); } } $SQL = "SELECT ts_name FROM $safetsschema.pg_ts_cfg WHERE locale = " . $this->addQuotes( $ctype ) ; @@ -443,7 +443,7 @@ class DatabasePostgres extends DatabaseBase { print 'FAILED. '; print 'Please make sure that the locale in pg_ts_cfg for "default" is set to "' . htmlspecialchars( $ctype ) . "\"\n"; - dieout( '' ); + dieout( '' ); } print 'OK'; } @@ -453,7 +453,7 @@ class DatabasePostgres extends DatabaseBase { $res = $this->doQuery( $SQL ); if ( !$res ) { print 'FAILED. Specifically, "' . htmlspecialchars( $SQL ) . '" did not work.'; - dieout( '' ); + dieout( '' ); } print 'OK'; } @@ -475,7 +475,7 @@ class DatabasePostgres extends DatabaseBase { 'You can try making them the owner of the database, or try creating the schema with a '. 'different user, and then grant access to the "' . htmlspecialchars( $wgDBuser ) . "\" user.\n"; - dieout( '' ); + dieout( '' ); } print "OK\n"; } elseif ( $result != $wgDBuser ) { @@ -492,7 +492,7 @@ class DatabasePostgres extends DatabaseBase { $result = pg_query( $this->mConn, $SQL ); if ( !$result ) { print "FAILED.\n"; - dieout( '' ); + dieout( '' ); } print "OK\n"; // Set for the rest of this session @@ -500,7 +500,7 @@ class DatabasePostgres extends DatabaseBase { $result = pg_query( $this->mConn, $SQL ); if ( !$result ) { print "
  • Failed to set timezone
  • \n"; - dieout( '' ); + dieout( '' ); } print '
  • Setting the datestyle to ISO, YMD for user "' . htmlspecialchars( $wgDBuser ) . '" ...'; @@ -508,7 +508,7 @@ class DatabasePostgres extends DatabaseBase { $result = pg_query( $this->mConn, $SQL ); if ( !$result ) { print "FAILED.
  • \n"; - dieout( '' ); + dieout( '' ); } print "OK\n"; // Set for the rest of this session @@ -516,7 +516,7 @@ class DatabasePostgres extends DatabaseBase { $result = pg_query( $this->mConn, $SQL ); if ( !$result ) { print "
  • Failed to set datestyle
  • \n"; - dieout( '' ); + dieout( '' ); } // Fix up the search paths if needed @@ -532,7 +532,7 @@ class DatabasePostgres extends DatabaseBase { $result = pg_query( $this->mConn, $SQL ); if ( !$result ) { print "FAILED.\n"; - dieout( '' ); + dieout( '' ); } print "OK\n"; // Set for the rest of this session @@ -540,7 +540,7 @@ class DatabasePostgres extends DatabaseBase { $result = pg_query( $this->mConn, $SQL ); if ( !$result ) { print "
  • Failed to set search_path
  • \n"; - dieout( '' ); + dieout( '' ); } define( 'POSTGRES_SEARCHPATH', $path ); } @@ -565,12 +565,12 @@ class DatabasePostgres extends DatabaseBase { if ( !$result ) { print 'FAILED. You need to install the language PL/pgSQL in the database ' . htmlspecialchars( $wgDBname ) . ''; - dieout( '' ); + dieout( '' ); } } else { print 'FAILED. You need to install the language PL/pgSQL in the database ' . htmlspecialchars( $wgDBname ) . ''; - dieout( '' ); + dieout( '' ); } } print "OK\n";