paths->construct_breadcrumb($path); // ################################################################### $link['log'] = $viewsvn->paths->out('log.php' . $viewsvn->paths->fetch_rev_str(), $path); $show['head'] = ($viewsvn->svn->common->fetch_head_rev($path) != $viewsvn->paths->fetch_rev_num() AND $viewsvn->paths->fetch_rev_num() != 'HEAD'); if ($show['head']) { $link['gohead'] = $viewsvn->paths->out('browse.php' . $viewsvn->paths->fetch_rev_str(false, 'HEAD'), $path); $link['diffhead'] = $viewsvn->paths->out('diff.php' . $viewsvn->paths->fetch_rev_str(true, 'HEAD', $viewsvn->paths->fetch_rev_num()), $path); } $show['prev'] = (($prev = $viewsvn->svn->common->fetch_prev_rev($path, $viewsvn->paths->fetch_rev_num())) != -1 ? true : false); if ($show['prev']) { $link['diffprev'] = $viewsvn->paths->out('diff.php' . $viewsvn->paths->fetch_rev_str(true, $viewsvn->paths->fetch_rev_num(), $prev), $path); } // ################################################################### $logmsg = $viewsvn->svn->common->fetch_log($path, $viewsvn->paths->fetch_rev_num()); unset($logmsg['files']); $logmsg['message_clean'] = nl2br(htmlspecialchars($logmsg['message'])); $catdata = $data = implode("\n", $viewsvn->svn->cat($repos, $relpath, $viewsvn->paths->fetch_rev_num())); $f = fopen(($name = '/tmp/enscript-write-viewsvn-temp-' . time()), 'w'); fwrite($f, $catdata); fclose($f); $catdata = implode("\n", $viewsvn->shell->exec($viewsvn->paths->enscript . ' --color -h -q --language=html -p - --pretty-print=html ' . $name)); $colors = array( 'comment' => 'B22222', 'keyword' => '5F9EA0', 'type' => '228B22', 'string' => 'BC8F8F', 'func' => '0000FF', 'prep' => 'B8860B', 'lang' => 'A020F0', 'var' => 'DA706D' ); foreach ($colors AS $class => $color) { $catdata = preg_replace('##i', '', $catdata); } $catdata = preg_replace('##i', '', $catdata); $catdata = preg_replace('#<(/?)b>#i', '<\1strong>', $catdata); $catdata = substr($catdata, strpos($catdata, ''), strpos($catdata, '') - strpos($catdata, '')); unlink($name); // ################################################################### eval('$template->flush("' . $template->fetch('view') . '");'); /*=====================================================================*\ || ################################################################### || # $HeadURL$ || # $Id$ || ################################################################### \*=====================================================================*/ ?>