summaryrefslogtreecommitdiff
path: root/includes/Metadata.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/Metadata.php')
-rw-r--r--includes/Metadata.php13
1 files changed, 6 insertions, 7 deletions
diff --git a/includes/Metadata.php b/includes/Metadata.php
index 2e4ab94c..e5e3296b 100644
--- a/includes/Metadata.php
+++ b/includes/Metadata.php
@@ -41,14 +41,13 @@ abstract class RdfMetaData {
$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() {