r61021 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r61020‎ | r61021 | r61022 >
Date:20:23, 13 January 2010
Author:ialex
Status:ok (Comments)
Tags:
Comment:
* (bug 21738) Fix for r57119: OutputPage::setSyndicated() now works again (was breaking Special:RecentChanges' feeds, ...)
Modified paths:
  • /trunk/phase3/includes/OutputPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/OutputPage.php
@@ -393,7 +393,13 @@
394394 public function disable() { $this->mDoNothing = true; }
395395 public function isDisabled() { return $this->mDoNothing; }
396396
397 - public function setSyndicated( $show = true ) { $this->mShowFeedLinks = $show; }
 397+ public function setSyndicated( $show = true ) {
 398+ if ( $show ) {
 399+ $this->setFeedAppendQuery( false );
 400+ } else {
 401+ $this->mFeedLinks = array();
 402+ }
 403+ }
398404
399405 public function setFeedAppendQuery( $val ) {
400406 global $wgFeedClasses;
@@ -401,7 +407,9 @@
402408 $this->mFeedLinks = array();
403409
404410 foreach( $wgFeedClasses as $type => $class ) {
405 - $query = "feed=$type&".$val;
 411+ $query = "feed=$type";
 412+ if ( is_string( $val ) )
 413+ $query .= '&' . $val;
406414 $this->mFeedLinks[$type] = $this->getTitle()->getLocalURL( $query );
407415 }
408416 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r61537Follow-up r61021: added some documentation per Tim's requestialex20:47, 26 January 2010

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r57119Re-work feed exposure system....werdna17:35, 30 September 2009

Comments

#Comment by Tim Starling (talk | contribs)   03:21, 26 January 2010

Needs documentation.

Status & tagging log