Some patch(s) to hide history and pages diff

There are only 2 files to modify. Once applied the patch, the history of pages will not appear to anonymous users and "Recent changes" page will not show diff links. This patch is tested in Mediawiki 1.15.1.

patch to includes/PageHistory.php

	function history() {
		global $wgUser, $wgOut, $wgRequest, $wgTitle, $wgScript;
 
// begin -->
		if ( ! $wgUser->isAllowed('edit') ) {
			$wgOut->addWikiMsg( 'nohistory' );
			wfProfileOut( __METHOD__ );
			return;
		}
// end <--
 
		/*
		 * Allow client caching.
		 */

patch to includes/ChangesList.php

	protected function insertDiffHist( &$s, &$rc, $unpatrolled ) {
// begin -->
		global $wgUser;
 
		if ( ! $wgUser->isAllowed('edit') ) {
			return null;
		}
// end <--
 
		# Diff link
		if( $rc->mAttribs['rc_type'] == RC_NEW || $rc->mAttribs['rc_type'] == RC_LOG ) {
Retrieved from "http://www.zoros.org/wiki/index.php?title=Mediawiki_hide_history_anonymous_users"