Manual talk:Hooks/SpecialRecentChangesQuery

From mediawiki.org

The hook parameters should be extended and also pass $query_options to allow a modification. I suggest

function fnMyHook( &$conds, &$tables, &$join_conds, $opts , &$query_options )

--Wikinaut 02:16, 29 January 2010 (UTC)Reply

Fixed in r61670.

Compact view of recent changes: list only the most recent change of a page, suppress older[edit]

See Extension:OnlyRecentRecentChanges.

A long-felt need for my wikis was to suppress the listing of older revisions of a page. Add the following code to your $IP/LocalSettings.php to have any changed page only listed once. --Wikinaut 20:49, 13 February 2010 (UTC) Feedback is welcome.Reply

// see http://www.mediawiki.org/wiki/Manual:Hooks/SpecialRecentChangesQuery
function onlyRecentRecentChanges( &$conds, &$tables, &$join_conds, $opts, &$query_options = array() ) {
	$tables[] = 'page';
	$conds[] = 'rc_this_oldid=page_latest';
        return true;
}
$wgHooks['SpecialRecentChangesQuery'][] = 'onlyRecentRecentChanges';