mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-24 06:03:49 +00:00
Merge "Avoid connecting to central database when not necessary"
This commit is contained in:
commit
8c00ae5ac8
|
@ -242,10 +242,10 @@ class AbuseFilterHooks {
|
|||
if ( $vars->getVar('global_log_ids') ) {
|
||||
$log_ids = $vars->getVar('global_log_ids')->toNative();
|
||||
|
||||
global $wgAbuseFilterCentralDB;
|
||||
$fdb = wfGetDB( DB_MASTER, array(), $wgAbuseFilterCentralDB );
|
||||
|
||||
if ( count($log_ids) ) {
|
||||
global $wgAbuseFilterCentralDB;
|
||||
$fdb = wfGetDB( DB_MASTER, array(), $wgAbuseFilterCentralDB );
|
||||
|
||||
$fdb->update( 'abuse_filter_log',
|
||||
array( 'afl_rev_id' => $revision->getId() ),
|
||||
array( 'afl_id' => $log_ids, 'afl_wiki' => wfWikiId() ),
|
||||
|
|
Loading…
Reference in a new issue