Index: trunk/phase3/includes/OutputPage.php |
— | — | @@ -381,10 +381,17 @@ |
382 | 382 | public function isArticle() { return $this->mIsarticle; } |
383 | 383 | public function setPrintable() { $this->mPrintable = true; } |
384 | 384 | public function isPrintable() { return $this->mPrintable; } |
385 | | - public function getFeedAppendQuery() { return $this->mFeedLinksAppendQuery; } |
386 | 385 | public function disable() { $this->mDoNothing = true; } |
387 | 386 | public function isDisabled() { return $this->mDoNothing; } |
388 | 387 | |
| 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 | + */ |
389 | 396 | public function setSyndicated( $show = true ) { |
390 | 397 | if ( $show ) { |
391 | 398 | $this->setFeedAppendQuery( false ); |
— | — | @@ -393,6 +400,15 @@ |
394 | 401 | } |
395 | 402 | } |
396 | 403 | |
| 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 | + */ |
397 | 413 | public function setFeedAppendQuery( $val ) { |
398 | 414 | global $wgFeedClasses, $wgAdvertisedFeedTypes; |
399 | 415 | |
— | — | @@ -407,12 +423,25 @@ |
408 | 424 | } |
409 | 425 | } |
410 | 426 | |
| 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 | + */ |
411 | 433 | public function addFeedLink( $format, $href ) { |
412 | 434 | $this->mFeedLinks[$format] = $href; |
413 | 435 | } |
414 | 436 | |
| 437 | + /** |
| 438 | + * Return the number of feed links that will be added to the page header |
| 439 | + * |
| 440 | + * @return Boolean |
| 441 | + */ |
415 | 442 | public function isSyndicated() { return count($this->mFeedLinks); } |
416 | 443 | |
| 444 | + public function getFeedAppendQuery() { return $this->mFeedLinksAppendQuery; } |
| 445 | + |
417 | 446 | public function setArticleRelated( $v ) { |
418 | 447 | $this->mIsArticleRelated = $v; |
419 | 448 | if ( !$v ) { |