jenkins-bot has submitted this change and it was merged.

Change subject: Rename '$wgStreamLoggers' => '$wgRCEngines'
......................................................................


Rename '$wgStreamLoggers' => '$wgRCEngines'

The name '$wgStreamLoggers' captures the direction in which I'd like to see
this evolve, but for the time being it is a misnomer, giving the false
impression that it is more general than it in fact is. I did not bother
deprecating the old name since it was only merged to master yesterday.

Also renamed: RecentChange::getStreamEngine -> RecentChange::getEngine (for
consistency with the change to the config var name).

Change-Id: I0d7b08e591e897b24528ea0981a6fcb93cfe8831
---
M includes/DefaultSettings.php
M includes/RecentChange.php
2 files changed, 8 insertions(+), 8 deletions(-)

Approvals:
  Parent5446: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php
index 20c72ee..22b7f1e 100644
--- a/includes/DefaultSettings.php
+++ b/includes/DefaultSettings.php
@@ -5470,10 +5470,10 @@
 $wgRCFeeds = array();
 
 /**
- * Used by RecentChange::getStreamEngine to find the correct engine to use for 
a given URI protocol.
+ * Used by RecentChange::getEngine to find the correct engine to use for a 
given URI scheme.
  * Keys are scheme names, values are names of engine classes.
  */
-$wgStreamLoggers = array(
+$wgRCEngines = array(
        'udp' => 'UDPRCFeedEngine',
 );
 
diff --git a/includes/RecentChange.php b/includes/RecentChange.php
index 939e924..45a8fbc 100644
--- a/includes/RecentChange.php
+++ b/includes/RecentChange.php
@@ -317,7 +317,7 @@
                global $wgRCFeeds;
 
                foreach ( $wgRCFeeds as $feed ) {
-                       $engine = self::getStreamEngine( $feed['uri'] );
+                       $engine = self::getEngine( $feed['uri'] );
 
                        if ( isset( $this->mExtras['actionCommentIRC'] ) ) {
                                $actionComment = 
$this->mExtras['actionCommentIRC'];
@@ -342,24 +342,24 @@
        }
 
        /**
-        * Gets the stream engine object for a given URI from $wgStreamLoggers
+        * Gets the stream engine object for a given URI from $wgRCEngines
         *
         * @param $uri string URI to get the engine object for
         * @return object The engine object
         */
-       private static function getStreamEngine( $uri ) {
-               global $wgStreamLoggers;
+       private static function getEngine( $uri ) {
+               global $wgRCEngines;
 
                $scheme = parse_url( $uri, PHP_URL_SCHEME );
                if ( !$scheme ) {
                        throw new MWException( __FUNCTION__ . ": Invalid stream 
logger URI: '$uri'" );
                }
 
-               if ( !isset( $wgStreamLoggers[$scheme] ) ) {
+               if ( !isset( $wgRCEngines[$scheme] ) ) {
                        throw new MWException( __FUNCTION__ . ": Unknown stream 
logger URI scheme: $scheme" );
                }
 
-               return new $wgStreamLoggers[$scheme];
+               return new $wgRCEngines[$scheme];
        }
 
        /**

-- 
To view, visit https://gerrit.wikimedia.org/r/81128
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I0d7b08e591e897b24528ea0981a6fcb93cfe8831
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh <[email protected]>
Gerrit-Reviewer: Alex Monk <[email protected]>
Gerrit-Reviewer: Parent5446 <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to