Reedy has uploaded a new change for review.
https://gerrit.wikimedia.org/r/92461
Change subject: Update CentralAuth recent change notification code
......................................................................
Update CentralAuth recent change notification code
Bug: 56284
Change-Id: Ie52858f07994c6dbb37a2cffc12edfd9fb6c87b3
---
M CentralAuth.php
M CentralAuthUser.php
2 files changed, 16 insertions(+), 11 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralAuth
refs/changes/61/92461/1
diff --git a/CentralAuth.php b/CentralAuth.php
index 3f08459..6ac3614 100644
--- a/CentralAuth.php
+++ b/CentralAuth.php
@@ -178,10 +178,9 @@
$wgCentralAuthCreateOnView = false;
/**
- * Settings for sending the CentralAuth events to the RC-to-UDP system
+ * Array of settings for sending the CentralAuth events to the RC Feeds
*/
-$wgCentralAuthUDPAddress = false;
-$wgCentralAuthNew2UDPPrefix = '';
+$wgCentralAuthRC = array();
/**
* List of local pages global users may edit while being globally locked.
diff --git a/CentralAuthUser.php b/CentralAuthUser.php
index f51dbe5..efc17ce 100644
--- a/CentralAuthUser.php
+++ b/CentralAuthUser.php
@@ -1386,11 +1386,17 @@
}
$this->invalidateCache();
- global $wgCentralAuthUDPAddress, $wgCentralAuthNew2UDPPrefix;
- if ( $wgCentralAuthUDPAddress ) {
- $userpage = Title::makeTitleSafe( NS_USER, $this->mName
);
- RecentChange::sendToUDP( self::getIRCLine( $userpage,
$wikiID ),
- $wgCentralAuthUDPAddress,
$wgCentralAuthNew2UDPPrefix );
+ global $wgCentralAuthRC;
+
+ $userpage = Title::makeTitleSafe( NS_USER, $this->mName );
+ $line = self::getIRCLine( $userpage, $wikiID );
+
+ foreach ( $wgCentralAuthRC as $rc ) {
+ /**
+ * @var $engine RCFeedEngine
+ */
+ $engine = new $rc['formatter'];
+ $engine->send( $rc, $line );
}
}
@@ -1401,10 +1407,10 @@
* @return string
*/
protected static function getIRCLine( $userpage, $wikiID ) {
- $title = RecentChange::cleanupForIRC(
$userpage->getPrefixedText() );
- $wikiID = RecentChange::cleanupForIRC( $wikiID );
+ $title = IRCColourfulRCFeedFormatter::cleanupForIRC(
$userpage->getPrefixedText() );
+ $wikiID = IRCColourfulRCFeedFormatter::cleanupForIRC( $wikiID );
$url = $userpage->getCanonicalURL();
- $user = RecentChange::cleanupForIRC( $userpage->getText() );
+ $user = IRCColourfulRCFeedFormatter::cleanupForIRC(
$userpage->getText() );
# see http://www.irssi.org/documentation/formats for some
colour codes. prefix is \003,
# no colour (\003) switches back to the term default
$fullString = "\00314[[\00307$title\00314]]\0034@$wikiID\00310
" .
--
To view, visit https://gerrit.wikimedia.org/r/92461
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie52858f07994c6dbb37a2cffc12edfd9fb6c87b3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralAuth
Gerrit-Branch: master
Gerrit-Owner: Reedy <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits