ApiThank: Send thanks logs to CheckUser when extension is enabled

Bug: T252226
Change-Id: Ifff1ca8071e0df161f7f212303469498340dd625
This commit is contained in:
DannyS712 2020-05-18 06:46:43 +00:00 committed by Legoktm
parent dbb7897f08
commit 83fb704391
2 changed files with 7 additions and 0 deletions

View file

@ -8,6 +8,7 @@ $cfg['directory_list'] = array_merge(
'../../extensions/Echo', '../../extensions/Echo',
'../../extensions/Flow', '../../extensions/Flow',
'../../extensions/MobileFrontend', '../../extensions/MobileFrontend',
'../../extensions/CheckUser',
] ]
); );
@ -17,6 +18,7 @@ $cfg['exclude_analysis_directory_list'] = array_merge(
'../../extensions/Echo', '../../extensions/Echo',
'../../extensions/Flow', '../../extensions/Flow',
'../../extensions/MobileFrontend', '../../extensions/MobileFrontend',
'../../extensions/CheckUser',
] ]
); );

View file

@ -107,6 +107,11 @@ abstract class ApiThank extends ApiBase {
$logEntry->setTarget( $target ); $logEntry->setTarget( $target );
$logId = $logEntry->insert(); $logId = $logEntry->insert();
$logEntry->publish( $logId, 'udp' ); $logEntry->publish( $logId, 'udp' );
if ( ExtensionRegistry::getInstance()->isLoaded( 'CheckUser' ) ) {
$recentChange = $logEntry->getRecentChange();
CheckUserHooks::updateCheckUserData( $recentChange );
}
} }
public function needsToken() { public function needsToken() {