Extension:Approved Revs/MediaWiki search patch

If you have Approved Revs 0.6.2 or later, MediaWiki search will correctly find pages based on the text in their approved revision. However, if you're using MediaWiki 1.19 or earlier (or a pre-release version of MediaWiki 1.20), the results will not be fully displayed correctly for pages whose approved revision is not their latest. To get the results displayed correctly, you will probably need to apply a small patch onto the MediaWiki code. This patch depends on your version of MediaWiki; below are the two options.

MediaWiki 1.16 - 1.19
In the file includes/search/SearchEngine.php, in the function initFromTitle, change the line: to:

MediaWiki 1.20 (pre-release versions)
In the file includes/search/SearchEngine.php, in the function initFromTitle, around line 760, change the lines: to: