2 /*=====================================================================*\
3 || ###################################################################
4 || # ViewSVN [#]version[#]
5 || # Copyright ©2002-[#]year[#] Iris Studios, Inc.
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.
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
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 \*=====================================================================*/
22 $fetchtemplates = array(
29 define('SVN', '$Id$');
31 require_once('./global.php');
33 $navbar = ConstructNavbar();
35 $paginate = BSRegister
::LoadModule('Pagination');
37 function _PageBitCallback($baselink, $nolink, $number, $paginator)
39 eval('$data = "' . BSRegister
::Get('template')->fetch('pagenav_bit') . '";');
43 function _PageNavCallback($baselink, $nextpage, $prevpage, $show, $pagebits, $paginator)
45 eval('$data = "' . BSRegister
::Get('template')->fetch('pagenav') . '";');
49 $paginate->setPageLinks(2);
50 $paginate->setPageVar('p');
51 $paginate->setMaxPerPage(20);
52 $paginate->setDefaultPerPage(20);
53 $paginate->setBitProcessor('_PageBitCallback');
54 $paginate->setNavigatorProcessor('_PageNavCallback');
55 $paginate->processIncomingData();
57 // ###################################################################
59 $logs = BSXml
::Parse($lib->run('log --xml ' . $lib->arg($repos->fetchPath($input->in
['repos']) . '/' . $input->in
['path']), true
));
63 BSXml
::UnifyNode($logs['log']['logentry']);
65 $paginate->setTotal(sizeof($logs['log']['logentry']));
66 $paginate->splitPages();
68 for ($i = $paginate->fetchLimit() - $paginate->getPerPage(); $i < $paginate->fetchLimit($paginate->getPage()); $i++
)
70 $log = $logs['log']['logentry'][$i];
72 $log['author'] = $log['author']['value'];
73 $log['date'] = FormatSvnDate($log['date']['value']);
74 $log['message_clean'] = FormatLogMessage($log['msg']['value']);
76 $link['view'] = ConstructLink('view', $input->in
['repos'], $input->in
['path'], $log['revision']);
77 $link['blame'] = ConstructLink('blame', $input->in
['repos'], $input->in
['path'], $log['revision']);
78 $link['diff'] = ConstructLink('diff', $input->in
['repos'], $input->in
['path'], $log['revision']);
80 eval('$nodes .= "' . $template->fetch('log_node') . '";');
83 $pagenav = $paginate->constructPageNav(ConstructLink('log', $input->in
['repos'], $input->in
['path'], 0) . '&', false
);
85 // ###################################################################
87 eval('$template->flush("' . $template->fetch('log') . '");');
89 /*=====================================================================*\
90 || ###################################################################
93 || ###################################################################
94 \*=====================================================================*/