Cache templates
[viewsvn.git] / view.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 'view'
15 );
16
17 require_once('./global.php');
18
19 $navbar = $viewsvn->paths->construct_breadcrumb($path);
20
21 // ###################################################################
22
23 $link['log'] = $viewsvn->paths->out('log.php' . $viewsvn->paths->fetch_rev_str(), $path);
24
25 $show['head'] = ($viewsvn->svn->common->fetch_head_rev($path) != $viewsvn->paths->fetch_rev_num() AND $viewsvn->paths->fetch_rev_num() != 'HEAD');
26 if ($show['head'])
27 {
28 $link['gohead'] = $viewsvn->paths->out('browse.php' . $viewsvn->paths->fetch_rev_str(false, 'HEAD'), $path);
29 $link['diffhead'] = $viewsvn->paths->out('diff.php' . $viewsvn->paths->fetch_rev_str(true, 'HEAD', $viewsvn->paths->fetch_rev_num()), $path);
30 }
31
32 $show['prev'] = (($prev = $viewsvn->svn->common->fetch_prev_rev($path, $viewsvn->paths->fetch_rev_num())) != -1 ? true : false);
33 if ($show['prev'])
34 {
35 $link['diffprev'] = $viewsvn->paths->out('diff.php' . $viewsvn->paths->fetch_rev_str(true, $viewsvn->paths->fetch_rev_num(), $prev), $path);
36 }
37
38 // ###################################################################
39
40 $logmsg = $viewsvn->svn->common->fetch_log($path, $viewsvn->paths->fetch_rev_num());
41 unset($logmsg['files']);
42
43 $logmsg = print_r($logmsg, true);
44
45 $catdata = $viewsvn->svn->format(implode("\n", $viewsvn->svn->cat($repos, $relpath, $viewsvn->paths->fetch_rev_num())));
46
47 // ###################################################################
48
49 eval('$template->flush("' . $template->fetch('view') . '");');
50
51 /*=====================================================================*\
52 || ###################################################################
53 || # $HeadURL$
54 || # $Id$
55 || ###################################################################
56 \*=====================================================================*/
57 ?>