No need to up file type again
No need to up file type again

--- a/include/display.git_search_files.php
+++ b/include/display.git_search_files.php
@@ -9,7 +9,6 @@
 
 require_once('defs.constants.php');
 require_once('util.highlight.php');
-require_once('util.file_type.php');
 require_once('gitutil.git_filesearch.php');
 require_once('gitutil.git_read_commit.php');
 
@@ -88,8 +87,7 @@
 		else
 			$tpl->assign("filename",$file);
 		$tpl->assign("hash",$data['hash']);
-		$type = file_type($data['mode']);
-		if ($type == "directory")
+		if ($data['type'] == "tree")
 			$tpl->assign("tree",TRUE);
 		if (isset($data['lines'])) {
 			$matches = array();

--- a/include/gitutil.git_filesearch.php
+++ b/include/gitutil.git_filesearch.php
@@ -44,7 +44,7 @@
 		$fname = trim($regs[4]);
 		if (isset($matches[$fname])) {
 			$matches[$fname]['hash'] = $regs[3];
-			$matches[$fname]['mode'] = $regs[1];
+			$matches[$fname]['type'] = $regs[2];
 		} else {
 			if ($case)
 				$ret = ereg("^([0-9]+) (.+) ([0-9a-fA-F]{40})\t(.*" . quotemeta($search) . ".*)",$line,$regs);
@@ -54,7 +54,7 @@
 				$fname = trim($regs[4]);
 				$matches[$fname] = array();
 				$matches[$fname]['hash'] = $regs[3];
-				$matches[$fname]['mode'] = $regs[1];
+				$matches[$fname]['type'] = $regs[2];
 			}
 		}
 	 }

comments