+ // Note: can't use func_get_args() directly as second or later item in
+ // a parameter list until PHP 5.3 or you get a fatal error.
+ // Works fine as the first parameter, which appears elsewhere in the
+ // code base. Sighhhh.
+ $args = func_get_args();
+ $message = call_user_func_array( array( $this->getContext(), 'msg' ), $args );
+ // RequestContext passes context to wfMessage, and the language is set from
+ // the context, but setting the language for Message class removes the
+ // interface message status, which breaks for example usernameless gender
+ // invokations. Restore the flag when not including special page in content.
+ if ( $this->including() ) {
+ $message->setInterfaceMessageFlag( false );
+ }
+ return $message;
+ }
+
+ /**
+ * Adds RSS/atom links
+ *
+ * @param $params array
+ */
+ protected function addFeedLinks( $params ) {
+ global $wgFeedClasses;
+
+ $feedTemplate = wfScript( 'api' ) . '?';
+
+ foreach ( $wgFeedClasses as $format => $class ) {
+ $theseParams = $params + array( 'feedformat' => $format );
+ $url = $feedTemplate . wfArrayToCGI( $theseParams );
+ $this->getOutput()->addFeedLink( $format, $url );
+ }