rdbms: Fix debug toolbar query tab when $wgDebugLogFile is not set

If $wgDebugLogFile was not set or empty and $wgDebugDumpSql
was set to false, the query tab would be empty.

Setting DBO_DEBUG whenever the toolbar is shown to enable query
logging.

Bug: T241516
Change-Id: I0c4f6c1a49341929b7ecad749a02c541daaa238a
This commit is contained in:
Holger Knust 2020-03-24 11:11:36 -04:00 committed by Krinkle
parent 5e1e15e2e5
commit 7cc16da556

View file

@ -54,6 +54,7 @@ abstract class MWLBFactory {
'DBuser',
'DebugDumpSql',
'DebugLogFile',
'DebugToolbar',
'ExternalServers',
'SQLiteDataDir',
'SQLMode',
@ -197,7 +198,10 @@ abstract class MWLBFactory {
}
$flags = $server['flags'] ?? DBO_DEFAULT;
if ( $options->get( 'DebugDumpSql' ) || $options->get( 'DebugLogFile' ) ) {
if ( $options->get( 'DebugDumpSql' )
|| $options->get( 'DebugLogFile' )
|| $options->get( 'DebugToolbar' )
) {
$flags |= DBO_DEBUG;
}
$server['flags'] = $flags;