Really show the desired number of lines per hit.
authorZheng Zhu <zhengzhu@users.mediawiki.org>
Thu, 25 Nov 2004 03:04:50 +0000 (03:04 +0000)
committerZheng Zhu <zhengzhu@users.mediawiki.org>
Thu, 25 Nov 2004 03:04:50 +0000 (03:04 +0000)
includes/SpecialSearch.php

index ad3600e..a503e07 100644 (file)
@@ -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 ) {