From: Erik Bernhardson Date: Mon, 24 Mar 2014 22:59:08 +0000 (-0700) Subject: Update IRCLineURL hook to include RecentChange object X-Git-Tag: 1.31.0-rc.0~16428^2 X-Git-Url: http://git.cyclocoop.org/%24href?a=commitdiff_plain;h=eaf4b3eb2b67f15c1cef355be0de50e109a38446;p=lhc%2Fweb%2Fwiklou.git Update IRCLineURL hook to include RecentChange object 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 --- diff --git a/docs/hooks.txt b/docs/hooks.txt index e4037e6a07..3d1ba7e6d3 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -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 diff --git a/includes/rcfeed/IRCColourfulRCFeedFormatter.php b/includes/rcfeed/IRCColourfulRCFeedFormatter.php index 22ddfb8279..c2e5b0300c 100644 --- a/includes/rcfeed/IRCColourfulRCFeedFormatter.php +++ b/includes/rcfeed/IRCColourfulRCFeedFormatter.php @@ -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; }