in['repos'], $input->in['rev'], $input->in['path']); if ($input->in['rev']) { $headRev = new Revision($input->in['repos'], 0, $input->in['path']); if ($headRev->revision != $revision->revision) { $show['head'] = true; $link['gohead'] = ConstructLink('view', $input->in['repos'], $input->in['path'], 0); } } if ($revision->revision - 1 > 0) { $show['diff'] = true; $link['diff'] = ConstructLink('diff', $input->in['repos'], $input->in['path'], $revision->revision); } $link['log'] = ConstructLink('log', $input->in['repos'], $input->in['path'], 0); // ################################################################### $revision->getRevisionInfo(); $catdata = $lib->run('cat -r' . $revision->revision . ' ' . $lib->arg($repos->fetchPath($input->in['repos']) . $input->in['path']), true); // ################################################################### $props = $revision->getPropsForPath($input->in['path']); $show['props'] = (sizeof($props) > 0); $proplist = FormatPropList($props); // ################################################################### // get language information require_once('./includes/file_types.php'); $extension = BSFunctions::FetchExtension($input->in['path']); $language = (isset($filetypes["$extension"]) ? $filetypes["$extension"] : null); // initialize GeSHi $mtstart = microtime(); require_once('./includes/geshi/geshi.php'); $geshi = new Geshi($catdata, $language[MIMES_GESHI_LANGUAGE]); // use CSS $geshi->enable_classes(); // header $geshi->set_header_type(GESHI_HEADER_DIV); // disable links $urls = (isset($geshi->language_data['URLS']) ? array_keys($geshi->language_data['URLS']) : array()); foreach ($urls AS $key) { $geshi->set_url_for_keyword_group($key, ''); } // don't do anything stupid $geshi->set_case_keywords(GESHI_CAPS_NO_CHANGE); // encoding $geshi->set_encoding('UTF-8'); // tab width $geshi->set_tab_width(5); // parse the code $catdata = $geshi->parse_code(); BSRegister::Debug("time in GeSHi = " . BSFunctions::FetchMicrotimeDiff($mtstart)); // ################################################################### eval('$template->flush("' . $template->fetch('view') . '");'); /*=====================================================================*\ || ################################################################### || # $HeadURL$ || # $Id$ || ################################################################### \*=====================================================================*/ ?>