]> src.bluestatic.org Git - viewsvn.git/blob - log.php
Adding body elements
[viewsvn.git] / log.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 $fetchtemplates = array(
14 'log_prop',
15 'log_node',
16 'log'
17 );
18
19 require_once('./global.php');
20
21 $navbar = $viewsvn->paths->construct_breadcrumb($path, false);
22
23 // ###################################################################
24
25 // this is NOT supposed to allow for revision ranges
26 $logs = new SVNLog($repos, $relpath, 0, $viewsvn->paths->fetch_rev_num());
27
28 $isdir = $viewsvn->svn->common->isdir($path);
29
30 $nodes = '';
31
32 foreach ($logs->fetch() AS $log)
33 {
34 $props = '';
35
36 $prev = $viewsvn->svn->common->fetch_prev_rev($path, $log['rev']);
37
38 $link['view'] = (!$isdir ? $viewsvn->paths->out('view.php' . $viewsvn->paths->fetch_rev_str(false, $log['rev']), $path) : '');
39 $link['blame'] = $viewsvn->paths->out('blame.php' . $viewsvn->paths->fetch_rev_str(false, $log['rev']), $path);
40
41 $show['diffhead'] = $viewsvn->svn->common->fetch_head_rev($path) != $log['rev'];
42 if ($show['diffhead'])
43 {
44 $link['diffhead'] = $viewsvn->paths->out('diff.php' . $viewsvn->paths->fetch_rev_str(true, 'HEAD', $log['rev']), $path);
45 }
46
47 $show['diffprev'] = $prev != -1;
48 if ($show['diffprev'])
49 {
50 $link['diffprev'] = $viewsvn->paths->out('diff.php' . $viewsvn->paths->fetch_rev_str(true, $log['rev'], $prev), $path);
51 }
52
53 foreach ($log AS $key => $val)
54 {
55 if ($key != 'files')
56 {
57 $val = $viewsvn->svn->format($val);
58 eval('$props .= "' . $template->fetch('log_prop') . '";');
59 }
60 }
61
62 eval('$nodes .= "' . $template->fetch('log_node') . '";');
63 }
64
65 // ###################################################################
66
67 eval('$template->flush("' . $template->fetch('log') . '");');
68
69 /*=====================================================================*\
70 || ###################################################################
71 || # $HeadURL$
72 || # $Id$
73 || ###################################################################
74 \*=====================================================================*/
75 ?>