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
);
31 // ###################################################################
33 $node = preg_replace('#(^/|/$)#', '', ($viewsvn->paths
->relpath
== '' ?
$viewsvn->paths
->path
: $viewsvn->paths
->relpath
));
34 $latest = $cachev->fetch_node($node);
36 $link['log'] = $viewsvn->paths
->out('log.php' . $viewsvn->paths
->revstr
, $viewsvn->paths
->path
);
38 $show['head'] = ($latest['revision'] != $viewsvn->paths
->revnum
AND $viewsvn->paths
->revnum
!= 'HEAD');
41 $link['gohead'] = $viewsvn->paths
->out('browse.php' . $viewsvn->paths
->fetch_rev_str(false
, 'HEAD'), $viewsvn->paths
->path
);
42 $link['diffhead'] = $viewsvn->paths
->out('diff.php' . $viewsvn->paths
->fetch_rev_str(true
, 'HEAD', $viewsvn->paths
->revnum
), $viewsvn->paths
->path
);
45 $show['prev'] = false
;
46 //$show['prev'] = (($prev = $cachev->fetch_prev_revision($viewsvn->paths->path, $viewsvn->paths->revnum)) != -1 ? true : false);
49 $link['diffprev'] = $viewsvn->paths
->out('diff.php' . $viewsvn->paths
->fetch_rev_str(true
, $viewsvn->paths
->revnum
, $prev), $viewsvn->paths
->path
);
52 // ###################################################################
54 $revinfo = $cachev->fetch_revision($viewsvn->paths
->revnum
);
55 $revinfo['message_clean'] = $viewsvn->svn
->format_log_message($revinfo['message']);
57 $revinfo['date'] = $viewsvn->svn
->format_date_string($revinfo['dateline']);
59 $listing = $viewsvn->svn
->ls($viewsvn->paths
->repos
, $viewsvn->paths
->relpath
, $viewsvn->paths
->revnum
);
63 foreach ($listing AS $item)
65 if ($item{ strlen($item) - 1 } == '/')
67 $show['directory'] = true
;
68 $browse = $viewsvn->paths
->out('browse.php' . $viewsvn->paths
->revstr
, $viewsvn->paths
->path
. $item);
72 $show['directory'] = false
;
73 $view = $viewsvn->paths
->out('view.php' . $viewsvn->paths
->revstr
, $viewsvn->paths
->path
. $item);
74 $blame = $viewsvn->paths
->out('blame.php' . $viewsvn->paths
->revstr
, $viewsvn->paths
->path
. $item);
77 $log = $viewsvn->paths
->out('log.php' . $viewsvn->paths
->revstr
, $viewsvn->paths
->path
. $item);
79 eval('$nodes .= "' . $template->fetch('browse_node') . '";');
82 // ###################################################################
84 eval('$template->flush("' . $template->fetch('browse') . '");');
86 /*=====================================================================*\
87 || ###################################################################
90 || ###################################################################
91 \*=====================================================================*/