Update IRCLineURL hook to include RecentChange object
authorErik Bernhardson <ebernhardson@wikimedia.org>
Mon, 24 Mar 2014 22:59:08 +0000 (15:59 -0700)
committerErik Bernhardson <ebernhardson@wikimedia.org>
Mon, 24 Mar 2014 23:03:21 +0000 (16:03 -0700)
The Flow extension has need to change the url output by
the IRC formatter.  As a temporary fix this allows flow
to conditionally replace the url until RC can be adjusted
to inteligently generate URL's in a cross-extension way.

Change-Id: Ie951e52833a578fecd9423c2e6d3cc10816d7fef

docs/hooks.txt
includes/rcfeed/IRCColourfulRCFeedFormatter.php

index e4037e6..3d1ba7e 100644 (file)
@@ -1441,6 +1441,7 @@ $user: user (object) whose email is being invalidated
 Callee may modify $url and $query, URL will be constructed as $url . $query
 &$url: URL to index.php
 &$query: Query string
+$rc: RecentChange object that triggered url generation
 
 'IsFileCacheable': Override the result of Article::isFileCacheable() (if true)
 $article: article (object) being checked
index 22ddfb8..c2e5b03 100644 (file)
@@ -56,7 +56,7 @@ class IRCColourfulRCFeedFormatter implements RCFeedFormatter {
                                $query .= '&rcid=' . $attribs['rc_id'];
                        }
                        // HACK: We need this hook for WMF's secure server setup
-                       wfRunHooks( 'IRCLineURL', array( &$url, &$query ) );
+                       wfRunHooks( 'IRCLineURL', array( &$url, &$query, $rc ) );
                        $url .= $query;
                }