2 /*=====================================================================*\
3 || ###################################################################
4 || # ViewSVN [#]version[#]
5 || # Copyright ©2002-[#]year[#] Iris Studios, Inc.
7 || # This program is free software; you can redistribute it and/or modify
8 || # it under the terms of the GNU General Public License as published by
9 || # the Free Software Foundation; version [#]gpl[#] of the License.
11 || # This program is distributed in the hope that it will be useful, but
12 || # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 || # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
16 || # You should have received a copy of the GNU General Public License along
17 || # with this program; if not, write to the Free Software Foundation, Inc.,
18 || # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
19 || ###################################################################
20 \*=====================================================================*/
22 $fetchtemplates = array(
27 define('SVN', '$Id$');
29 require_once('./global.php');
31 $navbar = ConstructNavbar();
33 // ###################################################################
35 $revision = $headRev = new Revision($input->in
['repos'], $input->in
['rev'], $input->in
['path']);
36 if ($input->in
['rev'])
38 $headRev = new Revision($input->in
['repos'], 0, $input->in
['path']);
39 if ($headRev->revision
!= $revision->revision
)
42 $link['gohead'] = ConstructLink('browse', $input->in
['repos'], $input->in
['path'], 0);
46 if ($revision->revision
- 1 > 0)
49 $link['diff'] = ConstructLink('diff', $input->in
['repos'], $input->in
['path'], $revision->revision
);
52 // ###################################################################
54 $revision->getRevisionInfo();
56 $catdata = $lib->run('cat -r' . $revision->revision
. ' ' . $lib->arg($repos->fetchPath($input->in
['repos']) . $input->in
['path']), true
);
58 // ###################################################################
60 $props = $revision->getPropsForPath($input->in
['path']);
61 $show['props'] = (sizeof($props) > 0);
62 $proplist = FormatPropList($props);
64 // ###################################################################
66 // get language information
67 require_once('./includes/file_types.php');
68 $extension = BSFunctions
::FetchExtension($input->in
['path']);
69 $language = (isset($filetypes["$extension"]) ?
$filetypes["$extension"] : null
);
72 $mtstart = microtime();
73 require_once('./includes/geshi/geshi.php');
74 $geshi = new Geshi($catdata, $language[MIMES_GESHI_LANGUAGE
]);
77 $geshi->enable_classes();
80 $geshi->set_header_type(GESHI_HEADER_DIV
);
83 $urls = (isset($geshi->language_data
['URLS']) ?
array_keys($geshi->language_data
['URLS']) : array());
84 foreach ($urls AS $key)
86 $geshi->set_url_for_keyword_group($key, '');
89 // don't do anything stupid
90 $geshi->set_case_keywords(GESHI_CAPS_NO_CHANGE
);
93 $geshi->set_encoding('UTF-8');
96 $geshi->set_tab_width(5);
99 $catdata = $geshi->parse_code();
101 BSRegister
::Debug("time in GeSHi = " . BSFunctions
::FetchMicrotimeDiff($mtstart));
103 // ###################################################################
105 eval('$template->flush("' . $template->fetch('view') . '");');
107 /*=====================================================================*\
108 || ###################################################################
111 || ###################################################################
112 \*=====================================================================*/