Show found instance count

Now showing number of times our find string is found in a file
This commit is contained in:
Matt Pass
2012-09-08 15:05:30 +01:00
parent c9aca08d4e
commit dcf2571437

View File

@@ -108,7 +108,7 @@ if (startTab!=top.ICEcoder.selectedTab) {
}
if (!$rFile && !$bFile) {
$ret .= "<a href=\\\"javascript:top.ICEcoder.openFile('".$fullPath."');top.ICEcoder.showHide('hide',top.document.getElementById('blackMask'))\\\">";
$ret .= str_replace($base,"",$fullPath)."</a><div id=\\\"foundCount".$r."\\\">Found X times</div>";
$ret .= str_replace($base,"",$fullPath)."</a><div id=\\\"foundCount".$r."\\\">Found ".substr_count(strtolower(file_get_contents($fullPath)),$q)." times</div>";
if (isset($_GET['replace'])) {
$ret .= "<div class=\\\"replace\\\" id=\\\"replace\\\" onClick=\\\"replaceInFileSingle('".$fullPath."');this.style.display=\'none\'\\\">replace</div>";
};