Author: bebraw
Description:
initial patch
As far as I know there is no way to modify revision texts passed to the difference engine. This hook, attached to the entry, provides a simple solution to the problem. It implements RevisionsBeforeDiff hook that can be used as follows:
...
$wgHooks['RevisionsBeforeDiff'][] = 'combineNewRevisionWithRequest';
function combineNewRevisionWithRequest( &$oldRevText, &$newRevText ) {
if( pageIsEditable() ) {
global $wgTitle; $editPage = getEditPage($wgTitle); $newRevText = renderProperties($editPage) . $newRevText; removeCommentLines($oldRevText); removeCommentLines($newRevText);
}
return true;
}
...
Even though the code is out of context I hope it manages to convey the idea and the need for this particular feature.
Version: 1.15.x
Severity: enhancement
Attached: