+
+
+
+
+
+
+load->view ('footer'); ?>
+
+
+
+
+converter->AsciiToHex('.') . $revreq;
+ }
+
+ // print the main anchor for the root folder.
+ // let the anchor text be the project name.
+ print anchor (
+ "code/file/{$project->id}{$revreqroot}",
+ htmlspecialchars($project->name));
+
+ // explode non-root folder parts to anchors
+ $exps = explode ('/', $headpath);
+ $expsize = count($exps);
+ $par = '';
+ for ($i = 1; $i < $expsize; $i++)
+ {
+ print '/';
+ $par .= '/' . $exps[$i];
+ $xpar = $this->converter->AsciiToHex ($par);
+ print anchor (
+ "code/file/{$project->id}/{$xpar}{$revreq}",
+ htmlspecialchars($exps[$i]));
+ }
+
+ if ($headpath != $file['fullpath'])
+ {
+ print ' - ';
+ print htmlspecialchars ($file['fullpath']);
+ }
+?>
+
+
+
+
+ =form_open("code/search/{$project->id}/", 'id="code_search_search_form"')?>
+ =form_hidden ('search_folder', set_value('search_folder', $file['fullpath']), 'id="code_search_search_folder"')?>
+ =form_input ('search_pattern', set_value('search_pattern', ''), 'id="code_search_search_pattern"')?>
+ =form_submit ('search_submit', $this->lang->line('Search'), 'id="code_search_search_submit"')?>
+ |
+ =$this->lang->line('Revision')?>: =$file['created_rev']?>
+
+ =form_close()?>
+
+
+
+
+subversion->getFile ($project->id, $fullpath, $revision);
+ if ($file2 !== FALSE)
+ {
+ if ($file2['type'] == 'file')
+ {
+ $lines = explode ("\n", $file2['content']);
+ //$matchkeys = preg_grep ("/{$pattern}/i", $lines, 0);
+ $matchlines = preg_grep ("/{$pattern}/", $lines, 0);
+ if (count($matchlines) > 0)
+ {
+ $hexpath = $controller->converter->AsciiToHex($fullpath);
+ if ($revision <= 0)
+ {
+ $revreq = '';
+ $revreqroot = '';
+ }
+ else
+ {
+ $revreq = "/{$file2['rev']}";
+ $revreqroot = '/' . $controller->converter->AsciiToHex ('.') . $revreq;
+ }
+
+ print '';
+ print anchor (
+ "code/file/{$project->id}/{$hexpath}{$revreq}",
+ htmlspecialchars($fullpath));
+
+ print ' ';
+ }
+ }
+ else
+ {
+ search_and_show ($controller, $project, $file2, $revision, $pattern);
+ }
+ }
+ }
+ }
+}
+
+$file = $this->subversion->getFile ($project->id, $file['fullpath'], $revision);
+search_and_show ($this, $project, $file, $revision, $pattern);
+?>
+
+
+
+'; + foreach ($matchlines as $linenum => $line) + { + printf ('% 6d: ', $linenum); + print htmlspecialchars($line); + print "\n"; + } + print ''; + + print '