Merging the updates from the GeSHi vendor to the trunk
[viewsvn.git] / log.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 'log_node',
24 'log'
25 );
26
27 define('SVN', '$Id$');
28
29 require_once('./global.php');
30
31 $navbar = ConstructNavbar();
32
33 // ###################################################################
34
35 $logs = BSXml::Parse($lib->run('log --xml ' . $lib->arg($repos->fetchPath($input->in['repos']) . '/' . $input->in['path']), true));
36
37 $nodes = '';
38
39 BSXml::UnifyNode($logs['log']['logentry']);
40
41 foreach ($logs['log']['logentry'] AS $index => $log)
42 {
43 $log['author'] = $log['author']['value'];
44 $log['date'] = FormatSvnDate($log['date']['value']);
45 $log['message_clean'] = FormatLogMessage($log['msg']['value']);
46
47 $link['view'] = ConstructLink('view', $input->in['repos'], $input->in['path'], $log['revision']);
48 $link['blame'] = ConstructLink('blame', $input->in['repos'], $input->in['path'], $log['revision']);
49 $link['diff'] = ConstructLink('diff', $input->in['repos'], $input->in['path'], $log['revision']);
50
51 eval('$nodes .= "' . $template->fetch('log_node') . '";');
52 }
53
54 // ###################################################################
55
56 eval('$template->flush("' . $template->fetch('log') . '");');
57
58 /*=====================================================================*\
59 || ###################################################################
60 || # $HeadURL$
61 || # $Id$
62 || ###################################################################
63 \*=====================================================================*/
64 ?>