--- func.php.orig Sun Feb 20 21:50:06 2005 +++ func.php Mon May 16 14:33:50 2005 @@ -187,6 +187,7 @@ $pages = array(); $non_list_pattern = '/' . $non_list . '/'; + $count = 0; foreach ($_pages as $page) { if ($page == $whatsnew || (! $search_non_list && preg_match($non_list_pattern, $page))) continue; @@ -196,17 +197,20 @@ $source = get_source(); // 検索対象ページ内容を空に。 } else { $source = get_source($page); + $count++; } if (! $non_format) array_unshift($source, $page); // ページ名も検索対象に $b_match = FALSE; + $lines = array(); foreach ($keys as $key) { $tmp = preg_grep('/' . $key . '/', $source); $b_match = ! empty($tmp); + $lines += $tmp; if ($b_match xor $b_type) break; } - if ($b_match) $pages[$page] = get_filetime($page); + if ($b_match) $pages[$page] = array(get_filetime($page), $lines); } if ($non_format) return array_keys($pages); @@ -217,13 +221,19 @@ ksort($pages); $retval = '' . "\n";