in['repos'], $input->in['path'], $input->in['rev']); // ################################################################### $show['fullchangeset'] = !($input->in['path'] == '' OR $input->in['path'] == '/'); if ($show['fullchangeset']) { $link['changeset'] = ConstructLink('diff', $input->in['repos'], null, $input->in['rev']); } $revision = new Revision($input->in['repos'], $input->in['rev'], $input->in['path']); $revision->getRevisionInfo(); $files = ConstructFileChanges($revision->files, $input->in['repos'], $revision->revision); // ################################################################### $diff = new Diff($lib->run('diff -c' . $revision->revision . ' ' . $lib->arg($repos->fetchPath($input->in['repos']) . '/' . $input->in['path']))); $changes = ''; foreach ($diff->fetch() AS $filename => $file) { $hunktpl = ''; $proplist = ''; if (!$filename) { continue; } if (is_array($file['lines'])) { foreach ($file['lines'] AS $hunk) { $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'; } else if ($line['act'] == '-') { $class = 'diff_del'; } else { $class = 'diff_norm'; } $line['line_clean'] = FormatCode($line['line']); eval('$lines .= "' . $template->fetch('diff_line') . '";'); } eval('$hunktpl .= "' . $template->fetch('diff_hunk') . '";'); } } if (is_array($file['props'])) { $show['props'] = true; foreach ($file['props'] AS $name => $values) { // modified if (isset($values['add']) AND isset($values['del'])) { $data = sprintf(_('Property %1$s changed from %2$s to %3$s'), $name, $values['del'], $values['add']); } // added else if (isset($values['add'])) { $data = sprintf(_('Property %1$s set to %2$s'), $name, $values['add']); } // removed else if (isset($values['del'])) { $data = sprintf(_('Property %1$s deleted'), $name); } eval('$proplist .= "' . $template->fetch('property') . '";'); } } eval('$changes .= "' . $template->fetch('diff_file') . '";'); } // ################################################################### eval('$template->flush("' . $template->fetch('diff') . '");'); /*=====================================================================*\ || ################################################################### || # $HeadURL$ || # $Id$ || ################################################################### \*=====================================================================*/ ?>