construct_breadcrumb();
// ###################################################################
$link['log'] = $controller->href_compound('log.php');
// ###################################################################
if (isset($viewsvn->in['rev']))
{
$high = Paths::fetch_rev_num(false);
}
else
{
$revs = Paths::fetch_rev_num(true);
$high = $revs['high'];
$low = $revs['low'];
}
if ($high == 'HEAD')
{
$high = $controller->cachev->fetch_head_revision();
}
if ($low == 0)
{
$low = $controller->cachev->fetch_prev_revision($high);
$low = $low['revision'];
}
// ###################################################################
$show['fullchangeset'] = (Paths::is_root_path($controller->path) ? false : true);
if ($show['fullchangeset'])
{
$link['changeset'] = $controller->href_struct('diff.php' . Paths::fetch_rev_str(true, $high, $low), '');
}
$log = $controller->cachev->fetch_revision($high);
$log['message_clean'] = SVNCommon::format_log_message($log['message']);
$log['date'] = SVNCommon::format_date_string($log['dateline']);
$files = SVNCommon::construct_file_changes($log['files'], $controller->repos, $high);
// ###################################################################
$diff = new SVNDiff($controller, $low, $high);
$isdir = (bool)$controller->cachev->isdir();
$changes = '';
foreach ($diff->fetch() AS $filename => $file)
{
$hunktpl = '';
$proplist = '';
if (!$filename)
{
continue;
}
$props = $file['props'];
$show['props'] = (bool)$props;
unset($file['props']);
foreach ($file AS $hunk)
{
$lines = '';
foreach ($hunk AS $key => $line)
{
$show['hunk'] = false;
if ($key == 'hunk' AND isset($line['old']))
{
$filepath = ($isdir ? $controller->path . $filename : $controller->path);
$rlow = $controller->href_struct('view.php' . Paths::fetch_rev_str(false, $low), $filepath);
$rhigh = $controller->href_struct('view.php' . Paths::fetch_rev_str(false, $high), $filepath);
$show['hunk'] = true;
}
else
{
if ($line['act'] == '+')
{
$class = 'diff_add';
}
else if ($line['act'] == '-')
{
$class = 'diff_del';
}
else
{
$class = 'diff_norm';
}
$line['line_clean'] = SVNCommon::format($line['line']);
}
eval('$lines .= "' . $template->fetch('diff_line') . '";');
}
eval('$hunktpl .= "' . $template->fetch('diff_hunk') . '";');
}
foreach ($props AS $name => $values)
{
// modified
if (isset($values['add']) AND isset($values['del']))
{
$data = sprintf($lang->string('Property %1$s changed from %2$s to %3$s'), $name, $values['del'], $values['add']);
}
// added
else if (isset($values['add']))
{
$data = sprintf($lang->string('Property %1$s set to %2$s'), $name, $values['add']);
}
// removed
else if (isset($values['del']))
{
$data = sprintf($lang->string('Property %1$s deleted'), $name);
}
eval('$proplist .= "' . $template->fetch('property') . '";');
}
eval('$changes .= "' . $template->fetch('diff_file') . '";');
}
// ###################################################################
eval('$template->flush("' . $template->fetch('diff') . '");');
/*=====================================================================*\
|| ###################################################################
|| # $HeadURL$
|| # $Id$
|| ###################################################################
\*=====================================================================*/
?>