r61537 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r61536‎ | r61537 | r61538 >
Date:20:47, 26 January 2010
Author:ialex
Status:ok (Comments)
Tags:
Comment:
Follow-up r61021: added some documentation per Tim's request
Modified paths:
  • /trunk/phase3/includes/OutputPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/OutputPage.php
@@ -381,10 +381,17 @@
382382 public function isArticle() { return $this->mIsarticle; }
383383 public function setPrintable() { $this->mPrintable = true; }
384384 public function isPrintable() { return $this->mPrintable; }
385 - public function getFeedAppendQuery() { return $this->mFeedLinksAppendQuery; }
386385 public function disable() { $this->mDoNothing = true; }
387386 public function isDisabled() { return $this->mDoNothing; }
388387
 388+ /**
 389+ * Add or remove feed links in the page header
 390+ * This is mainly kept for backward compatibility, see OutputPage::addFeedLink()
 391+ * for the new version
 392+ * @see addFeedLink()
 393+ *
 394+ * @param $show Boolean: true: add default feeds, false: remove all feeds
 395+ */
389396 public function setSyndicated( $show = true ) {
390397 if ( $show ) {
391398 $this->setFeedAppendQuery( false );
@@ -393,6 +400,15 @@
394401 }
395402 }
396403
 404+ /**
 405+ * Add default feeds to the page header
 406+ * This is mainly kept for backward compatibility, see OutputPage::addFeedLink()
 407+ * for the new version
 408+ * @see addFeedLink()
 409+ *
 410+ * @param $val String: query to append to feed links or false to output
 411+ * default links
 412+ */
397413 public function setFeedAppendQuery( $val ) {
398414 global $wgFeedClasses, $wgAdvertisedFeedTypes;
399415
@@ -407,12 +423,25 @@
408424 }
409425 }
410426
 427+ /**
 428+ * Add a feed link to the page header
 429+ *
 430+ * @param $format String: feed type, should be a key of $wgFeedClasses
 431+ * @param $href String: URL
 432+ */
411433 public function addFeedLink( $format, $href ) {
412434 $this->mFeedLinks[$format] = $href;
413435 }
414436
 437+ /**
 438+ * Return the number of feed links that will be added to the page header
 439+ *
 440+ * @return Boolean
 441+ */
415442 public function isSyndicated() { return count($this->mFeedLinks); }
416443
 444+ public function getFeedAppendQuery() { return $this->mFeedLinksAppendQuery; }
 445+
417446 public function setArticleRelated( $v ) {
418447 $this->mIsArticleRelated = $v;
419448 if ( !$v ) {

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r61021* (bug 21738) Fix for r57119: OutputPage::setSyndicated() now works again (wa...ialex20:23, 13 January 2010

Comments

#Comment by Tim Starling (talk | contribs)   02:34, 29 January 2010

Thanks for that.

Status & tagging log