]> src.bluestatic.org Git - viewsvn.git/blob - browse.php
Don't return 'min' index on fetch_diff_extent()
[viewsvn.git] / browse.php
1 <?php
2 /*=====================================================================*\
3 || ###################################################################
4 || # ViewSVN [#]version[#]
5 || # Copyright ©2002-[#]year[#] Iris Studios, Inc.
6 || #
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.
10 || #
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
14 || # more details.
15 || #
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 \*=====================================================================*/
21
22 $fetchtemplates = array(
23 'browse_node',
24 'browse'
25 );
26
27 require_once('./global.php');
28
29 $navbar = $viewsvn->paths->construct_breadcrumb($path);
30
31 // ###################################################################
32
33 $link['log'] = $viewsvn->paths->out('log.php' . $viewsvn->paths->fetch_rev_str(), $path);
34
35 $show['head'] = ($viewsvn->svn->common->fetch_head_rev($path) != $viewsvn->paths->fetch_rev_num() AND $viewsvn->paths->fetch_rev_num() != 'HEAD');
36 if ($show['head'])
37 {
38 $link['gohead'] = $viewsvn->paths->out('browse.php' . $viewsvn->paths->fetch_rev_str(false, 'HEAD'), $path);
39 $link['diffhead'] = $viewsvn->paths->out('diff.php' . $viewsvn->paths->fetch_rev_str(true, 'HEAD', $viewsvn->paths->fetch_rev_num()), $path);
40 }
41
42 $show['prev'] = (($prev = $viewsvn->svn->common->fetch_prev_rev($path, $viewsvn->paths->fetch_rev_num())) != -1 ? true : false);
43 if ($show['prev'])
44 {
45 $link['diffprev'] = $viewsvn->paths->out('diff.php' . $viewsvn->paths->fetch_rev_str(true, $viewsvn->paths->fetch_rev_num(), $prev), $path);
46 }
47
48 // ###################################################################
49
50 $revinfo = $viewsvn->svn->common->fetch_log($path, $viewsvn->paths->fetch_rev_num());
51
52 $revinfo['message_clean'] = nl2br(htmlspecialchars($revinfo['message']));
53
54 $listing = $viewsvn->svn->ls($repos, $relpath, $viewsvn->paths->fetch_rev_num());
55
56 $nodes = '';
57
58 foreach ($listing AS $item)
59 {
60 if ($item{ strlen($item) - 1 } == '/')
61 {
62 $show['directory'] = true;
63 $browse = $viewsvn->paths->out('browse.php' . $viewsvn->paths->fetch_rev_str(), $path . $item);
64 }
65 else
66 {
67 $show['directory'] = false;
68 $view = $viewsvn->paths->out('view.php' . $viewsvn->paths->fetch_rev_str(), $path . $item);
69 $blame = $viewsvn->paths->out('blame.php' . $viewsvn->paths->fetch_rev_str(), $path . $item);
70 }
71
72 $log = $viewsvn->paths->out('log.php' . $viewsvn->paths->fetch_rev_str(), $path . $item);
73
74 eval('$nodes .= "' . $template->fetch('browse_node') . '";');
75 }
76
77 // ###################################################################
78
79 eval('$template->flush("' . $template->fetch('browse') . '");');
80
81 /*=====================================================================*\
82 || ###################################################################
83 || # $HeadURL$
84 || # $Id$
85 || ###################################################################
86 \*=====================================================================*/
87 ?>