Created
July 30, 2012 20:25
-
-
Save sdouglas/3209877 to your computer and use it in GitHub Desktop.
Display "View Source" link in MediaWiki for logged out users
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ( !$wgUser->isAllowed('edit') ) { | |
# if ( $wgUser->isAnon() ) { | |
# $this->userNotLoggedInPage(); | |
# return; | |
# } else { | |
# $wgOut->readOnlyPage( $this->mArticle->getContent( true ), true ); | |
# return; | |
# } | |
# Make source available to anon users | |
$wgOut->readOnlyPage( $this->mArticle->getContent( true ), true ); | |
return; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment