* Constructor
* @param $article Article object
*/
- public function __construct( Article $article ) {
+ public function __construct( Page $article ) {
$this->mArticle = $article;
}
$rdftype = wfNegotiateType( wfAcceptToPrefs( $httpaccept ), wfAcceptToPrefs( self::RDF_TYPE_PREFS ) );
if( !$rdftype ){
- wfHttpError( 406, 'Not Acceptable', wfMsg( 'notacceptable' ) );
- return false;
- } else {
- $wgOut->disable();
- $wgRequest->response()->header( "Content-type: {$rdftype}; charset=utf-8" );
- $wgOut->sendCacheControl();
- return true;
+ throw new HttpError( 406, wfMessage( 'notacceptable' ) );
}
+
+ $wgOut->disable();
+ $wgRequest->response()->header( "Content-type: {$rdftype}; charset=utf-8" );
+ $wgOut->sendCacheControl();
+ return true;
}
protected function reallyFullUrl() {
protected function basics() {
global $wgLanguageCode, $wgSitename;
- $this->element( 'title', $this->mArticle->mTitle->getText() );
+ $this->element( 'title', $this->mArticle->getTitle()->getText() );
$this->pageOrString( 'publisher', wfMsg( 'aboutpage' ), $wgSitename );
$this->element( 'language', $wgLanguageCode );
$this->element( 'type', 'Text' );