From: Zheng Zhu Date: Thu, 25 Nov 2004 03:04:50 +0000 (+0000) Subject: Really show the desired number of lines per hit. X-Git-Tag: 1.5.0alpha1~1247 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=20f00fa6daefa154fd696bdbd61f818c1c2895ff;p=lhc%2Fweb%2Fwiklou.git Really show the desired number of lines per hit. --- diff --git a/includes/SpecialSearch.php b/includes/SpecialSearch.php index ad3600eb3c..a503e07b02 100644 --- a/includes/SpecialSearch.php +++ b/includes/SpecialSearch.php @@ -321,12 +321,11 @@ class SpecialSearch { if ( 0 == $contextlines ) { break; } - --$contextlines; ++$lineno; if ( ! preg_match( $pat1, $line, $m ) ) { continue; } - + --$contextlines; $pre = $wgContLang->truncate( $m[1], -$contextchars, '...' ); if ( count( $m ) < 3 ) {