Replace wgShowExceptionDetails with wgShowDBErrorBacktrace on db errors