Change $bad and return false to override. If an image is "bad", it is not
rendered inline in wiki pages or galleries in category pages.
+'BeforeDisplayNoArticleText': before displaying noarticletext or noarticletext-nopermission
+at Article::showMissingArticle()
+
+$article: article object
+
'BeforeInitialize': before anything is initialized in MediaWiki::performRequest()
&$title: Title being used for request
$unused: null
'msgKey' => array( 'moveddeleted-notice' ) )
);
+ if ( !$this->mPage->hasViewableContent() && $wgSend404Code ) {
+ // If there's no backing content, send a 404 Not Found
+ // for better machine handling of broken links.
+ $wgRequest->response()->header( "HTTP/1.1 404 Not Found" );
+ }
+
+ $hookResult = wfRunHooks( 'BeforeDisplayNoArticleText', array( $this ) );
+
+ if ( ! $hookResult ) {
+ return;
+ }
+
# Show error message
$oldid = $this->getOldID();
if ( $oldid ) {
}
$text = "<div class='noarticletext'>\n$text\n</div>";
- if ( !$this->mPage->hasViewableContent() && $wgSend404Code ) {
- // If there's no backing content, send a 404 Not Found
- // for better machine handling of broken links.
- $wgRequest->response()->header( "HTTP/1.1 404 Not Found" );
- }
-
$wgOut->addWikiText( $text );
}