Add "R" to the list of valid stati in SVNLog::process()
[viewsvn.git] / browse.php
1 <?php
2 /*=====================================================================*\
3 || ################################################################### ||
4 || # ViewSVN [#]version[#]
5 || # --------------------------------------------------------------- # ||
6 || # Copyright ©2002-[#]year[#] by Iris Studios, Inc. All Rights Reserved. # ||
7 || # This file may not be reproduced in any way without permission. # ||
8 || # --------------------------------------------------------------- # ||
9 || # User License Agreement at http://www.iris-studios.com/license/ # ||
10 || ################################################################### ||
11 \*=====================================================================*/
12
13 require_once('./global.php');
14
15 $navbar = $viewsvn->paths->construct_breadcrumb($path);
16
17 // ###################################################################
18
19 $link['log'] = $viewsvn->paths->out('log.php' . $viewsvn->paths->fetch_rev_str(), $path);
20
21 $show['head'] = ($viewsvn->svn->common->fetch_head_rev($path) != $viewsvn->paths->fetch_rev_num() AND $viewsvn->paths->fetch_rev_num() != 'HEAD');
22 if ($show['head'])
23 {
24 $link['gohead'] = $viewsvn->paths->out('browse.php' . $viewsvn->paths->fetch_rev_str(false, 'HEAD'), $path);
25 $link['diffhead'] = $viewsvn->paths->out('diff.php' . $viewsvn->paths->fetch_rev_str(true, 'HEAD', $viewsvn->paths->fetch_rev_num()), $path);
26 }
27
28 $show['prev'] = (($prev = $viewsvn->svn->common->fetch_prev_rev($path, $viewsvn->paths->fetch_rev_num())) != -1 ? true : false);
29 if ($show['prev'])
30 {
31 $link['diffprev'] = $viewsvn->paths->out('diff.php' . $viewsvn->paths->fetch_rev_str(true, $viewsvn->paths->fetch_rev_num(), $prev), $path);
32 }
33
34 // ###################################################################
35
36 // #*# finish extracting this tpl
37 echo '<pre>' . print_r($viewsvn->svn->common->fetch_log($path, $viewsvn->paths->fetch_rev_num()), true) . '</pre>';
38
39 $listing = $viewsvn->svn->ls($repos, $relpath, @$viewsvn->in['rev']);
40
41 $nodes = '';
42
43 foreach ($listing AS $item)
44 {
45 if ($item{ strlen($item) - 1 } == '/')
46 {
47 $show['directory'] = true;
48 $browse = $viewsvn->paths->out('browse.php' . $viewsvn->paths->fetch_rev_str(), $path . $item);
49 }
50 else
51 {
52 $show['directory'] = false;
53 $view = $viewsvn->paths->out('log.php' . $viewsvn->paths->fetch_rev_str(), $path . $item);
54 $blame = $viewsvn->paths->out('blame.php' . $viewsvn->paths->fetch_rev_str(), $path . $item);
55 }
56
57 $log = $viewsvn->paths->out('log.php' . $viewsvn->paths->fetch_rev_str(), $path . $item);
58
59 eval('$nodes .= "' . $template->fetch('browse_node') . '";');
60 }
61
62 // ###################################################################
63
64 eval('$template->flush("' . $template->fetch('browse') . '");');
65
66 /*=====================================================================*\
67 || ###################################################################
68 || # $HeadURL$
69 || # $Id$
70 || ###################################################################
71 \*=====================================================================*/
72 ?>