Legoktm has uploaded a new change for review.
https://gerrit.wikimedia.org/r/156233
Change subject: Add UserMerge support
......................................................................
Add UserMerge support
Change-Id: Iceb4b8d2fd53c50ed00a4aab9bc374f4bb716466
---
M Echo.php
M Hooks.php
2 files changed, 18 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo
refs/changes/33/156233/1
diff --git a/Echo.php b/Echo.php
index a24f0c3..f5cca0b 100644
--- a/Echo.php
+++ b/Echo.php
@@ -162,6 +162,9 @@
$wgHooks['UserClearNewTalkNotification'][] =
'EchoHooks::onUserClearNewTalkNotification';
$wgHooks['ParserTestTables'][] = 'EchoHooks::onParserTestTables';
+// Extension:UserMerge support
+$wgHooks['UserMergeAccountFields'][] = 'EchoHooks::onUserMergeAccountFields';
+
// Exception
$wgAutoloadClasses['EchoCatchableFatalErrorException'] = $dir .
'includes/exception/CatchableFatalErrorException.php';
diff --git a/Hooks.php b/Hooks.php
index 3043c07..95d3048 100644
--- a/Hooks.php
+++ b/Hooks.php
@@ -1007,4 +1007,19 @@
return false;
}
+ /**
+ * For integration with the UserMerge extension.
+ *
+ * @param array $updateFields
+ * @return bool
+ */
+ public static function onUserMergeAccountFields( &$updateFields ) {
+ // array( tableName, idField, textField )
+ $updateFields[] = array( 'echo_event', 'event_agent_id' );
+ $updateFields[] = array( 'echo_notification',
'notification_user' );
+ $updateFields[] = array( 'echo_email_batch', 'eeb_user_id' );
+ $updateFields[] = array( 'echo_target_page', 'etp_user' );
+
+ return true;
+ }
}
--
To view, visit https://gerrit.wikimedia.org/r/156233
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iceb4b8d2fd53c50ed00a4aab9bc374f4bb716466
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Legoktm <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits