Thread:Project:Support desk/How to hide "View History" button for unlogged users?/reply (20)

Remove the "public" word and try again. Sorry, I don't have PHP nor a MediaWiki installation at hand to test my code.

And the most correct way to do it is what I said. You shouldn't alter core MediaWiki files for this since on next upgrade you'll lost all modifications.