If you're new here and like what you read, please subscribe to my blog feed or sign up for free email updates. Thanks for visiting!
Enter your email address to subscribe:

Disable media warning in MediaWiki

No comment - Post a comment (nofollow disabled)

To disable the message "Warning: This file may contain malicious code, by executing it your system may be compromised.", look for the check at includes/ImagePage.php, specifically for "mediawarning". Around this, you should see the following check:

if ( !$this->displayImg->isSafeFile() ) {
$warning = wfMsgNoTrans( 'mediawarning' );
$wgOut->addWikiText((some HTML text here distributed over a few lines));
} else {

You would like to remove this check; delete the entire thing and also the closing brace of the else's brace in the last line above. In MediaWiki 1.13.2, the if check above starts at line 440.

Like this post? Please help me pay for my Internet access.
email post

Possibly Related Posts

This post has no comment. Add your own!