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 require_once('./global.php');
29 $navbar = $controller->construct_breadcrumb();
31 // ###################################################################
33 //$node = preg_replace('#(^/|/$)#', '', ($viewsvn->paths->relpath == '' ? $viewsvn->paths->path : $viewsvn->paths->relpath));
34 $latest = $controller->cachev
->fetch_node();
36 $link['log'] = $controller->href_compound('log.php');
38 $show['head'] = ($latest['revision'] != $controller->revnum
AND $controller->revnum
!= 'HEAD');
41 $link['gohead'] = $controller->href_compound('browse.php', null
, Paths
::fetch_rev_str(false
, 'HEAD'));
42 $link['diffhead'] = $controller->href_compound('diff.php', null
, Paths
::fetch_rev_str(true
, 'HEAD', $controller->revnum
));
45 $show['prev'] = ($controller->cachev
->fetch_prev_revision($controller->revnum
) != -1);
48 $link['diffprev'] = $controller->href_compound('diff.php', null
, Paths
::fetch_rev_str(false
, $controller->revnum
));
51 // ###################################################################
53 $revinfo = $controller->cachev
->fetch_revision($latest['revision']);
55 $revinfo['message_clean'] = SVNCommon
::format_log_message($revinfo['message']);
56 $revinfo['date'] = SVNCommon
::format_date_string($revinfo['dateline']);
58 $listing = $controller->library
->command('ls');
62 foreach ($listing AS $item)
64 if ($item{ strlen($item) - 1 } == '/')
66 $show['directory'] = true
;
67 $browse = $controller->href_compound('browse.php', $item);
71 $show['directory'] = false
;
72 $view = $controller->href_compound('view.php', $item);
73 $blame = $controller->href_compound('blame.php', $item);
76 $log = $controller->href_compound('log.php', $item);
78 eval('$nodes .= "' . $template->fetch('browse_node') . '";');
81 // ###################################################################
83 eval('$template->flush("' . $template->fetch('browse') . '");');
85 /*=====================================================================*\
86 || ###################################################################
89 || ###################################################################
90 \*=====================================================================*/