* (bug 6216) The immobile namespace message does not mention the source page
* (bug 7299) Normalize username filter on Special:Newpages
* (bug 7306) RTL text in an LTR wiki breaks appearance of Special:Recentchanges
+* (bug 7312) Don't emit SET NAMES utf8 if connection failed
== Languages updated ==
$success = (bool)$this->mConn;
}
- if ( !$success ) {
+ if ( $success ) {
+ global $wgDBmysql5;
+ if( $wgDBmysql5 ) {
+ // Tell the server we're communicating with it in UTF-8.
+ // This may engage various charset conversions.
+ $this->query( 'SET NAMES utf8' );
+ }
+ } else {
$this->reportConnectionError();
}
- global $wgDBmysql5;
- if( $wgDBmysql5 ) {
- // Tell the server we're communicating with it in UTF-8.
- // This may engage various charset conversions.
- $this->query( 'SET NAMES utf8' );
- }
-
$this->mOpened = $success;
wfProfileOut( __METHOD__ );
return $success;