From 83fb7043911a60352c6780e9774188174c700a14 Mon Sep 17 00:00:00 2001 From: DannyS712 Date: Mon, 18 May 2020 06:46:43 +0000 Subject: [PATCH] ApiThank: Send thanks logs to CheckUser when extension is enabled Bug: T252226 Change-Id: Ifff1ca8071e0df161f7f212303469498340dd625 --- .phan/config.php | 2 ++ includes/ApiThank.php | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/.phan/config.php b/.phan/config.php index 856e90d1..7f7c0f37 100644 --- a/.phan/config.php +++ b/.phan/config.php @@ -8,6 +8,7 @@ $cfg['directory_list'] = array_merge( '../../extensions/Echo', '../../extensions/Flow', '../../extensions/MobileFrontend', + '../../extensions/CheckUser', ] ); @@ -17,6 +18,7 @@ $cfg['exclude_analysis_directory_list'] = array_merge( '../../extensions/Echo', '../../extensions/Flow', '../../extensions/MobileFrontend', + '../../extensions/CheckUser', ] ); diff --git a/includes/ApiThank.php b/includes/ApiThank.php index eea25a6a..9e99711f 100644 --- a/includes/ApiThank.php +++ b/includes/ApiThank.php @@ -107,6 +107,11 @@ abstract class ApiThank extends ApiBase { $logEntry->setTarget( $target ); $logId = $logEntry->insert(); $logEntry->publish( $logId, 'udp' ); + + if ( ExtensionRegistry::getInstance()->isLoaded( 'CheckUser' ) ) { + $recentChange = $logEntry->getRecentChange(); + CheckUserHooks::updateCheckUserData( $recentChange ); + } } public function needsToken() {