public function msg( /* $args */ ) {
return call_user_func_array( 'wfMessage', func_get_args() )->title( $this->getFullTitle() );
}
+
+ /**
+ * Adds RSS/atom links
+ *
+ * @param $params array
+ */
+ protected function addFeedLinks( $params ) {
+ global $wgFeedClasses, $wgOut;
+
+ $feedTemplate = wfScript( 'api' ) . '?';
+
+ foreach( $wgFeedClasses as $format => $class ) {
+ $theseParams = $params + array( 'feedformat' => $format );
+ $url = $feedTemplate . wfArrayToCGI( $theseParams );
+ $wgOut->addFeedLink( $format, $url );
+ }
+ }
}
/**
}
// Add RSS/atom links
- global $wgFeedClasses;
- $apiParams = array( 'action' => 'feedcontributions', 'user' => $wgUser->getName() );
- $feedTemplate = wfScript( 'api' ) . '?';
-
- foreach( $wgFeedClasses as $format => $class ) {
- $theseParams = $apiParams + array( 'feedformat' => $format );
- $url = $feedTemplate . wfArrayToCGI( $theseParams );
- $wgOut->addFeedLink( $format, $url );
- }
+ $this->addFeedLinks( array( 'action' => 'feedcontributions', 'user' => $wgUser->getName() ) );
if ( wfRunHooks( 'SpecialContributionsBeforeMainOutput', array( $id ) ) ) {
$wgUser->saveSettings();
}
- global $wgFeedClasses;
- $apiParams = array( 'action' => 'feedwatchlist', 'allrev' => 'allrev',
- 'wlowner' => $wgUser->getName(), 'wltoken' => $wlToken );
- $feedTemplate = wfScript( 'api' ) . '?';
-
- foreach( $wgFeedClasses as $format => $class ) {
- $theseParams = $apiParams + array( 'feedformat' => $format );
- $url = $feedTemplate . wfArrayToCGI( $theseParams );
- $wgOut->addFeedLink( $format, $url );
- }
+ $this->addFeedLinks( array( 'action' => 'feedwatchlist', 'allrev' => 'allrev',
+ 'wlowner' => $wgUser->getName(), 'wltoken' => $wlToken ) );
$skin = $this->getSkin();
$wgOut->setRobotPolicy( 'noindex,nofollow' );