[Mediawiki-l] Search fix: secondary search
John Andrews
john at tensilica.com
Mon Nov 29 18:53:40 UTC 2004
The help for search says this regarding secondary search:
Oddly, sometimes no context is shown.
We (Christian Zankel) seem to have fixed this by applying the
following diff to mediawiki-1.3.8/includes/SearchEngine.php:
402a403
> --$contextlines;
408d408
< --$contextlines;
Resulting in code that looks like this:
foreach ( $lines as $line ) {
if ( 0 == $contextlines ) {
break;
}
++$lineno;
if ( ! preg_match( $pat1, $line, $m ) ) {
continue;
}
--$contextlines; # <<<<==== Moved past continue.
$pre = $wgLang->truncate( $m[1], -$contextchars, "..." );
JA
More information about the MediaWiki-l
mailing list