/*=====================================================================*\
|| ###################################################################
|| # ViewSVN [#]version[#]
-|| # Copyright ©2002-[#]year[#] Iris Studios, Inc.
+|| # Copyright ©2002-[#]year[#] Blue Static
|| #
|| # This program is free software; you can redistribute it and/or modify
|| # it under the terms of the GNU General Public License as published by
// ###################################################################
-$show['fullchangeset'] = ($input->in['path'] == '' OR $input->in['path'] == '/');
+$show['fullchangeset'] = !($input->in['path'] == '' OR $input->in['path'] == '/');
if ($show['fullchangeset'])
{
$link['changeset'] = ConstructLink('diff', $input->in['repos'], null, $input->in['rev']);
continue;
}
- $props = $file['props'];
- $show['props'] = (bool)$props;
- unset($file['props']);
-
- foreach ($file AS $hunk)
+ if (is_array($file['lines']))
{
- $lines = '';
- foreach ($hunk AS $key => $line)
+ foreach ($file['lines'] AS $hunk)
{
- $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
+ $lines = '';
+
+ $show['hunk'] = true;
+ $low = $file['revision']['low'];
+ $high = $file['revision']['high'];
+
+ $filename = (preg_match('/' . preg_quote($filename, '/') . '$/', $input->in['path']) ? $input->in['path'] : BSFunctions::FetchSourcePath($input->in['path']) . $filename);
+ $rlow = ConstructLink('view', $input->in['repos'], $filename, $low);
+ $rhigh = ConstructLink('view', $input->in['repos'], $filename, $high);
+ eval('$lines .= "' . $template->fetch('diff_line') . '";');
+
+ foreach ($hunk AS $key => $line)
{
+ $show['hunk'] = false;
if ($line['act'] == '+')
{
$class = 'diff_add';
{
$class = 'diff_norm';
}
-
+
$line['line_clean'] = FormatCode($line['line']);
+
+ eval('$lines .= "' . $template->fetch('diff_line') . '";');
}
-
- eval('$lines .= "' . $template->fetch('diff_line') . '";');
+ eval('$hunktpl .= "' . $template->fetch('diff_hunk') . '";');
}
- eval('$hunktpl .= "' . $template->fetch('diff_hunk') . '";');
}
- if (is_array($props))
+ if (is_array($file['props']))
{
- foreach ($props AS $name => $values)
+ $show['props'] = true;
+ foreach ($file['props'] AS $name => $values)
{
// modified
if (isset($values['add']) AND isset($values['del']))
|| # $Id$
|| ###################################################################
\*=====================================================================*/
-?>
+?>
\ No newline at end of file