Revert r97711
authorTimo Tijhof <ttijhof@wikimedia.org>
Sat, 14 Apr 2012 15:08:04 +0000 (17:08 +0200)
committerTimo Tijhof <ttijhof@wikimedia.org>
Wed, 9 May 2012 14:45:39 +0000 (16:45 +0200)
WONTFIX:
 * (bug 30245) Use the correct way to construct a log page title.

 This was previously reverted for 1.19 and now reverting again for
 1.20, only this time proposing it not to be temporary.

 Right now this is already live on 2 wikis and as soon as it goes
 live on a non-English wiki (since English namespace name for Log
 matches the canonical name "Log", and as such causes no breakage yet
 for bots using the IRC feed), as soon as it goes live on a
 non-English wiki it will all log actions that bots are monitoring
 using the irc feed.

 (because no matter which log action is monitored, it all goes
 back to detecting the page title of Special:Log)

 If properly announced ahead of time it could be done, but we don't
 have that time anymore. Perhaps re-try in 1.21 or 1.22, but as far
 as I'm concerned, this bug can be kept WONTFIX as it only affects
 the IRC feed. And it's not worth the loss that will undoubtedly
 result from breaking this.
 Theoretically a certain amount of time for the announcement could be
 required, and if the change enables something or fixes a security
 problem, it could be justified, but for this it is just not worth
 it.

 The human-readable output from the API and on Special:Log are fully
 localized and even better so with the rewrite that Niklas did last
 year. The IRC feed however, has little to no gain from this and only
 causes breakages for the the large amount of bot usage from it, of
 which many are no longer maintained and as such will not be fixed,
 no matter how much time it is given. Granted those will probably
 break no matter what at some point, but hopefully we will have
 push notification *with* structured data[2] by that time to
 encourage rewrites of those bots.

Change-Id: I229e345c74b10f4d96b8d2d305b4a7623825b3f6
Links:
 * https://www.mediawiki.org/wiki/Special:Code/MediaWiki/97711
 * https://www.mediawiki.org/wiki/Requests_for_comment/Structured_data_push_notification_support_for_recent_changes

includes/RecentChange.php

index e57efae..fa92954 100644 (file)
@@ -658,7 +658,9 @@ class RecentChange {
                        $wgCanonicalServer, $wgScript;
 
                if( $this->mAttribs['rc_type'] == RC_LOG ) {
-                       $titleObj = SpecialPage::getTitleFor( 'Log', $this->mAttribs['rc_log_type'] );
+                       // Don't use SpecialPage::getTitleFor, backwards compatibility with
+                       // IRC API which expects "Log".
+                       $titleObj = Title::newFromText( 'Log/' . $this->mAttribs['rc_log_type'], NS_SPECIAL );
                } else {
                        $titleObj =& $this->getTitle();
                }