]>
src.bluestatic.org Git - viewsvn.git/blob - log.php
2 /*=====================================================================*\
3 || ###################################################################
4 || # ViewSVN [#]version[#]
5 || # Copyright ©2002-[#]year[#] Blue Static
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 $i = $paginate->fetchLimit() - $paginate->getPerPage();
69 $i = ($i <= 0 ? 0: $i);
70 for (; $i < $paginate->fetchLimit($paginate->getPage()); $i++)
73 $log = $logs['log
']['logentry
'][$i];
75 $log['author
'] = $log['author
']['value
'];
76 $log['date
'] = FormatSvnDate($log['date
']['value
']);
77 $log['message_clean
'] = FormatLogMessage($log['msg
']['value
']);
79 $link['view
'] = ConstructLink('view
', $input->in['repos
'], $input->in['path
'], $log['revision
']);
80 $link['blame
'] = ConstructLink('blame
', $input->in['repos
'], $input->in['path
'], $log['revision
']);
81 $link['diff
'] = ConstructLink('diff
', $input->in['repos
'], $input->in['path
'], $log['revision
']);
83 eval('$nodes .= "' . $template->fetch('log_node') . '";');
86 $pagenav = $paginate->constructPageNav(ConstructLink('log
', $input->in['repos
'], $input->in['path
'], 0) . '&
;', false);
88 // ###################################################################
90 eval('$template->flush("' . $template->fetch('log') . '");');
92 /*=====================================================================*\
93 || ###################################################################
96 || ###################################################################
97 \*=====================================================================*/