OSDN Git Service

BugTrack/692 Show page contents in search result - search2 plugin
[pukiwiki/pukiwiki.git] / lib / func.php
index 716243f..9536393 100644 (file)
@@ -346,8 +346,8 @@ function do_search($word, $type = 'AND', $non_format = FALSE, $base = '')
 
                // Search for page contents
                foreach ($keys as $key) {
-                       $lines = remove_author_lines(get_source($page, TRUE, FALSE));
-                       $b_match = preg_match($key, join('', $lines));
+                       $body = get_source($page, TRUE, TRUE, TRUE);
+                       $b_match = preg_match($key, remove_author_header($body));
                        if ($b_type xor $b_match) break; // OR
                }
                if ($b_match) continue;