]>
src.bluestatic.org Git - viewsvn.git/blob - blame.php
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(
27 require_once('./global.php');
29 $navbar = $viewsvn->paths
->construct_breadcrumb($viewsvn->paths
->path
, false);
31 // ###################################################################
33 $link['log'] = $viewsvn->paths
->out('log.php' . $viewsvn->paths
->fetch_rev_str(), $viewsvn->paths
->path
);
35 $show['head'] = ($viewsvn->svn
->common
->fetch_head_rev($viewsvn->paths
->path
) != $viewsvn->paths
->fetch_rev_num() AND $viewsvn->paths
->fetch_rev_num() != 'HEAD');
38 $link['gohead'] = $viewsvn->paths
->out('blame.php' . $viewsvn->paths
->fetch_rev_str(false, 'HEAD'), $viewsvn->paths
->path
);
39 $link['diffhead'] = $viewsvn->paths
->out('diff.php' . $viewsvn->paths
->fetch_rev_str(true, 'HEAD', $viewsvn->paths
->fetch_rev_num()), $viewsvn->paths
->path
);
42 $show['prev'] = (($prev = $viewsvn->svn
->common
->fetch_prev_rev($viewsvn->paths
->path
, $viewsvn->paths
->fetch_rev_num())) != -1 ? true : false);
45 $link['diffprev'] = $viewsvn->paths
->out('diff.php' . $viewsvn->paths
->fetch_rev_str(true, $viewsvn->paths
->fetch_rev_num(), $prev), $viewsvn->paths
->path
);
48 // ###################################################################
50 $blame = new SVNBlame($viewsvn->paths
->repos
, $viewsvn->paths
->relpath
, $viewsvn->paths
->fetch_rev_num());
54 foreach ($blame->fetch() AS $entry)
56 $entry['view_link'] = $viewsvn->paths
->out('view.php' . $viewsvn->paths
->fetch_rev_str(false, $entry['rev']), $viewsvn->paths
->path
);
57 $entry['line_clean'] = $viewsvn->svn
->format($entry['line']);
58 eval('$lines .= "' . $template->fetch('blame_line') . '";');
61 // ###################################################################
63 eval('$template->flush("' . $template->fetch('blame') . '");');
65 /*=====================================================================*\
66 || ###################################################################
69 || ###################################################################
70 \*=====================================================================*/