Don't strip whitespace from rss
Don't strip whitespace from rss

<?php <?php
/* /*
* display.git_tag.php * display.git_tag.php
* gitphp: A PHP git repository browser * gitphp: A PHP git repository browser
* Component: Display - tag * Component: Display - tag
* *
* Copyright (C) 2009 Christopher Han <xiphux@gmail.com> * Copyright (C) 2009 Christopher Han <xiphux@gmail.com>
*/ */
   
require_once('util.date_str.php'); require_once('util.date_str.php');
require_once('gitutil.git_read_tag.php'); require_once('gitutil.git_read_tag.php');
require_once('gitutil.git_read_head.php'); require_once('gitutil.git_read_head.php');
   
function git_tag($projectroot, $project, $hash) function git_tag($projectroot, $project, $hash)
{ {
global $tpl; global $tpl;
   
$head = git_read_head($projectroot . $project); $head = git_read_head($projectroot . $project);
$tpl->clear_all_assign(); $tpl->clear_all_assign();
$tpl->assign("project",$project); $tpl->assign("project",$project);
$tpl->assign("head",$head); $tpl->assign("head",$head);
$tpl->display("tag_nav.tpl"); $tpl->assign("hash", $hash);
   
$tag = git_read_tag($projectroot . $project, $hash); $tag = git_read_tag($projectroot . $project, $hash);
   
$tpl->clear_all_assign(); $tpl->assign("tag",$tag);
$tpl->assign("project", $project);  
$tpl->assign("hash", $hash);  
$tpl->assign("title",$tag['name']);  
$tpl->assign("type",$tag['type']);  
$tpl->assign("object",$tag['object']);  
if (isset($tag['author'])) { if (isset($tag['author'])) {
$tpl->assign("author",$tag['author']);  
$ad = date_str($tag['epoch'],$tag['tz']); $ad = date_str($tag['epoch'],$tag['tz']);
$tpl->assign("adrfc2822",$ad['rfc2822']); $tpl->assign("datedata",$ad);
$tpl->assign("adhourlocal",$ad['hour_local']);  
$tpl->assign("adminutelocal",$ad['minute_local']);  
$tpl->assign("adtzlocal",$ad['tz_local']);  
} }
$tpl->assign("comment",$tag['comment']); $tpl->display("tag.tpl");
$tpl->display("tag_data.tpl");  
} }
   
?> ?>
   
<?php <?php
/* /*
* display.git_tags.php * display.git_tags.php
* gitphp: A PHP git repository browser * gitphp: A PHP git repository browser
* Component: Display - tags * Component: Display - tags
* *
* Copyright (C) 2008 Christopher Han <xiphux@gmail.com> * Copyright (C) 2008 Christopher Han <xiphux@gmail.com>
*/ */
   
require_once('gitutil.git_read_head.php'); require_once('gitutil.git_read_head.php');
require_once('gitutil.git_read_refs.php'); require_once('gitutil.git_read_refs.php');
   
function git_tags($projectroot,$project) function git_tags($projectroot,$project)
{ {
global $tpl; global $tpl;
$head = git_read_head($projectroot . $project); $head = git_read_head($projectroot . $project);
$tpl->clear_all_assign(); $tpl->clear_all_assign();
$tpl->assign("project",$project); $tpl->assign("project",$project);
$tpl->assign("head",$head); $tpl->assign("head",$head);
$tpl->display("tags_nav.tpl");  
$tpl->display("tags_header.tpl");  
$taglist = git_read_refs($projectroot, $project, "refs/tags"); $taglist = git_read_refs($projectroot, $project, "refs/tags");
if (isset($taglist) && (count($taglist) > 0)) { if (isset($taglist) && (count($taglist) > 0)) {
$alternate = FALSE; $tpl->assign("taglist",$taglist);
foreach ($taglist as $i => $entry) {  
$tpl->clear_all_assign();  
if ($alternate)  
$tpl->assign("class","dark");  
else  
$tpl->assign("class","light");  
$alternate = !$alternate;  
$tpl->assign("project",$project);  
$tpl->assign("age",$entry['age']);  
$tpl->assign("name",$entry['name']);  
$tpl->assign("reftype",$entry['reftype']);  
$tpl->assign("refid",$entry['refid']);  
$tpl->assign("id",$entry['id']);  
$tpl->assign("type",$entry['type']);  
if (isset($entry['comment']) && isset($entry['comment'][0]))  
$tpl->assign("comment",$entry['comment'][0]);  
$tpl->display("tags_item.tpl");  
}  
} }
$tpl->clear_all_assign(); $tpl->display("tags.tpl");
$tpl->display("tags_footer.tpl");  
} }
   
?> ?>
   
<?php <?php
/* /*
* display.git_tree.php * display.git_tree.php
* gitphp: A PHP git repository browser * gitphp: A PHP git repository browser
* Component: Display - tree * Component: Display - tree
* *
* Copyright (C) 2008 Christopher Han <xiphux@gmail.com> * Copyright (C) 2008 Christopher Han <xiphux@gmail.com>
*/ */
   
require_once('util.mode_str.php'); require_once('util.mode_str.php');
require_once('gitutil.git_read_head.php'); require_once('gitutil.git_read_head.php');
require_once('gitutil.git_get_hash_by_path.php'); require_once('gitutil.git_get_hash_by_path.php');
require_once('gitutil.git_ls_tree.php'); require_once('gitutil.git_ls_tree.php');
require_once('gitutil.read_info_ref.php'); require_once('gitutil.read_info_ref.php');
require_once('gitutil.git_read_commit.php'); require_once('gitutil.git_read_commit.php');
require_once('gitutil.git_path_trees.php'); require_once('gitutil.git_path_trees.php');
   
function git_tree($projectroot,$project,$hash,$file,$hashbase) function git_tree($projectroot,$project,$hash,$file,$hashbase)
{ {
global $tpl; global $tpl;
if (!isset($hash)) { if (!isset($hash)) {
$hash = git_read_head($projectroot . $project); $hash = git_read_head($projectroot . $project);
if (isset($file)) if (isset($file))
$hash = git_get_hash_by_path($projectroot . $project, ($hashbase?$hashbase:$hash),$file,"tree"); $hash = git_get_hash_by_path($projectroot . $project, ($hashbase?$hashbase:$hash),$file,"tree");
if (!isset($hashbase)) if (!isset($hashbase))
$hashbase = $hash; $hashbase = $hash;
} }
$lsout = git_ls_tree($projectroot . $project, $hash, TRUE); $lsout = git_ls_tree($projectroot . $project, $hash, TRUE);
$refs = read_info_ref($projectroot . $project); $refs = read_info_ref($projectroot . $project);
$tpl->clear_all_assign(); $tpl->clear_all_assign();
  $tpl->assign("project",$project);
  $tpl->assign("hash",$hash);
  if (isset($hashbase))
  $tpl->assign("hashbase",$hashbase);
if (isset($hashbase) && ($co = git_read_commit($projectroot . $project, $hashbase))) { if (isset($hashbase) && ($co = git_read_commit($projectroot . $project, $hashbase))) {
$basekey = $hashbase; $basekey = $hashbase;
$tpl->assign("hashbase",$hashbase); $tpl->assign("fullnav",TRUE);
$tpl->assign("project",$project);  
$tpl->assign("title",$co['title']); $tpl->assign("title",$co['title']);
if (isset($refs[$hashbase])) if (isset($refs[$hashbase]))
$tpl->assign("hashbaseref",$refs[$hashbase]); $tpl->assign("hashbaseref",$refs[$hashbase]);
$tpl->display("tree_nav.tpl");  
} else {  
$tpl->assign("hash",$hash);  
$tpl->display("tree_emptynav.tpl");  
} }
$tpl->clear_all_assign();  
$tpl->assign("project",$project);  
$tpl->assign("hashbase",$hashbase);  
$paths = git_path_trees($projectroot . $project, $hashbase, $file); $paths = git_path_trees($projectroot . $project, $hashbase, $file);
$tpl->assign("paths",$paths); $tpl->assign("paths",$paths);
$tpl->display("tree_filelist_header.tpl");  
   
  if (isset($file))
  $tpl->assign("base",$file . "/");
   
  $treelines = array();
$tok = strtok($lsout,"\0"); $tok = strtok($lsout,"\0");
$alternate = FALSE;  
while ($tok !== false) { while ($tok !== false) {
if (ereg("^([0-9]+) (.+) ([0-9a-fA-F]{40})\t(.+)$",$tok,$regs)) { if (ereg("^([0-9]+) (.+) ([0-9a-fA-F]{40})\t(.+)$",$tok,$regs)) {
$tpl->clear_all_assign(); $treeline = array();
if ($alternate) $treeline["filemode"] = mode_str($regs[1]);
$tpl->assign("class","dark"); $treeline["type"] = $regs[2];
else $treeline["hash"] = $regs[3];
$tpl->assign("class","light"); $treeline["name"] = $regs[4];
$alternate = !$alternate; $treelines[] = $treeline;
$tpl->assign("filemode",mode_str($regs[1]));  
$tpl->assign("type",$regs[2]);  
$tpl->assign("hash",$regs[3]);  
$tpl->assign("name",$regs[4]);  
$tpl->assign("project",$project);  
if (isset($file))  
$tpl->assign("base",$file . "/");  
if (isset($basekey))  
$tpl->assign("hashbase",$basekey);  
$tpl->display("tree_filelist_item.tpl");  
} }
$tok = strtok("\0"); $tok = strtok("\0");
} }
  $tpl->assign("treelines",$treelines);
$tpl->clear_all_assign(); $tpl->display("tree.tpl");
$tpl->display("tree_filelist_footer.tpl");  
} }
   
?> ?>
   
file:a/index.php -> file:b/index.php
<?php <?php
/* /*
* index.php * index.php
* gitphp: A PHP git repository browser * gitphp: A PHP git repository browser
* Component: Index script * Component: Index script
* *
* Copyright (C) 2006 Christopher Han <xiphux@gmail.com> * Copyright (C) 2006 Christopher Han <xiphux@gmail.com>
*/ */
ob_start(); ob_start();
   
/* /*
* Version * Version
*/ */
include_once('include/version.php'); include_once('include/version.php');
   
/* /*
* Constants * Constants
*/ */
require_once('include/defs.constants.php'); require_once('include/defs.constants.php');
   
/* /*
* Configuration * Configuration
*/ */
require_once('config/gitphp.conf.php'); require_once('config/gitphp.conf.php');
   
/* /*
* Instantiate Smarty * Instantiate Smarty
*/ */
require_once($gitphp_conf['smarty_prefix'] . "Smarty.class.php"); require_once($gitphp_conf['smarty_prefix'] . "Smarty.class.php");
$tpl =& new Smarty; $tpl =& new Smarty;
if (isset($_GET['a']) && if (isset($_GET['a']) &&
($_GET['a'] != "commitdiff_plain") && ($_GET['a'] != "commitdiff_plain") &&
($_GET['a'] != "blob_plain") && ($_GET['a'] != "blob_plain") &&
($_GET['a'] != "blobdiff_plain") && ($_GET['a'] != "blobdiff_plain") &&
  ($_GET['a'] != "rss") &&
($_GET['a'] != "opml")) { ($_GET['a'] != "opml")) {
$tpl->load_filter('output','trimwhitespace'); $tpl->load_filter('output','trimwhitespace');
} }
   
   
$rss_link = FALSE; $rss_link = FALSE;
$suppress_headers = FALSE; $suppress_headers = FALSE;
   
ob_start(); ob_start();
if (isset($_GET['a']) && $_GET['a'] == "opml") { if (isset($_GET['a']) && $_GET['a'] == "opml") {
$suppress_headers = TRUE; $suppress_headers = TRUE;
require_once('include/display.git_opml.php'); require_once('include/display.git_opml.php');
git_opml($gitphp_conf['projectroot'],$git_projects); git_opml($gitphp_conf['projectroot'],$git_projects);
} else if (isset($_GET['a']) && $_GET['a'] == "project_index") { } else if (isset($_GET['a']) && $_GET['a'] == "project_index") {
$suppress_headers = TRUE; $suppress_headers = TRUE;
require_once('include/display.git_project_index.php'); require_once('include/display.git_project_index.php');
git_project_index($gitphp_conf['projectroot'],$git_projects); git_project_index($gitphp_conf['projectroot'],$git_projects);
} else if (isset($_GET['p'])) { } else if (isset($_GET['p'])) {
if (!is_dir($gitphp_conf['projectroot'] . $_GET['p'])) if (!is_dir($gitphp_conf['projectroot'] . $_GET['p']))
echo "No such directory"; echo "No such directory";
else if (!is_file($gitphp_conf['projectroot'] . $_GET['p'] . "/HEAD")) else if (!is_file($gitphp_conf['projectroot'] . $_GET['p'] . "/HEAD"))
echo "No such project"; echo "No such project";
else { else {
$rss_link = TRUE; $rss_link = TRUE;
if (!isset($_GET['a'])) { if (!isset($_GET['a'])) {
require_once('include/display.git_summary.php'); require_once('include/display.git_summary.php');
git_summary($gitphp_conf['projectroot'],$_GET['p']); git_summary($gitphp_conf['projectroot'],$_GET['p']);
} else { } else {
switch ($_GET['a']) { switch ($_GET['a']) {
case "summary": case "summary":
require_once('include/display.git_summary.php'); require_once('include/display.git_summary.php');
git_summary($gitphp_conf['projectroot'],$_GET['p']); git_summary($gitphp_conf['projectroot'],$_GET['p']);
break; break;
case "tree": case "tree":
require_once('include/display.git_tree.php'); require_once('include/display.git_tree.php');
git_tree($gitphp_conf['projectroot'], $_GET['p'], (isset($_GET['h']) ? $_GET['h'] : NULL), (isset($_GET['f']) ? $_GET['f'] : NULL), (isset($_GET['hb']) ? $_GET['hb'] : NULL)); git_tree($gitphp_conf['projectroot'], $_GET['p'], (isset($_GET['h']) ? $_GET['h'] : NULL), (isset($_GET['f']) ? $_GET['f'] : NULL), (isset($_GET['hb']) ? $_GET['hb'] : NULL));
break; break;
case "shortlog": case "shortlog":
require_once('include/display.git_shortlog.php'); require_once('include/display.git_shortlog.php');
git_shortlog($gitphp_conf['projectroot'],$_GET['p'],(isset($_GET['h']) ? $_GET['h'] : NULL), (isset($_GET['pg']) ? $_GET['pg'] : NULL)); git_shortlog($gitphp_conf['projectroot'],$_GET['p'],(isset($_GET['h']) ? $_GET['h'] : NULL), (isset($_GET['pg']) ? $_GET['pg'] : NULL));
break; break;
case "log": case "log":
require_once('include/display.git_log.php'); require_once('include/display.git_log.php');
git_log($gitphp_conf['projectroot'],$_GET['p'], (isset($_GET['h']) ? $_GET['h'] : NULL), (isset($_GET['pg']) ? $_GET['pg'] : NULL)); git_log($gitphp_conf['projectroot'],$_GET['p'], (isset($_GET['h']) ? $_GET['h'] : NULL), (isset($_GET['pg']) ? $_GET['pg'] : NULL));
break; break;
case "commit": case "commit":
require_once('include/display.git_commit.php'); require_once('include/display.git_commit.php');
git_commit($gitphp_conf['projectroot'],$_GET['p'],$_GET['h']); git_commit($gitphp_conf['projectroot'],$_GET['p'],$_GET['h']);
break; break;
case "commitdiff": case "commitdiff":
require_once('include/display.git_commitdiff.php'); require_once('include/display.git_commitdiff.php');
git_commitdiff($gitphp_conf['projectroot'],$_GET['p'],$_GET['h'], (isset($_GET['hp']) ? $_GET['hp'] : NULL)); git_commitdiff($gitphp_conf['projectroot'],$_GET['p'],$_GET['h'], (isset($_GET['hp']) ? $_GET['hp'] : NULL));
break; break;
case "commitdiff_plain": case "commitdiff_plain":
$suppress_headers = TRUE; $suppress_headers = TRUE;
require_once('include/display.git_commitdiff_plain.php'); require_once('include/display.git_commitdiff_plain.php');
git_commitdiff_plain($gitphp_conf['projectroot'],$_GET['p'],$_GET['h'],(isset($_GET['hp']) ? $_GET['hp'] : NULL)); git_commitdiff_plain($gitphp_conf['projectroot'],$_GET['p'],$_GET['h'],(isset($_GET['hp']) ? $_GET['hp'] : NULL));
break; break;
case "heads": case "heads":
require_once('include/display.git_heads.php'); require_once('include/display.git_heads.php');
git_heads($gitphp_conf['projectroot'],$_GET['p']); git_heads($gitphp_conf['projectroot'],$_GET['p']);
break; break;
case "tags": case "tags":
require_once('include/display.git_tags.php'); require_once('include/display.git_tags.php');
git_tags($gitphp_conf['projectroot'],$_GET['p']); git_tags($gitphp_conf['projectroot'],$_GET['p']);
break; break;
case "rss": case "rss":
$suppress_headers = TRUE; $suppress_headers = TRUE;
require_once('include/display.git_rss.php'); require_once('include/display.git_rss.php');
git_rss($gitphp_conf['projectroot'],$_GET['p']); git_rss($gitphp_conf['projectroot'],$_GET['p']);
break; break;
case "blob": case "blob":
require_once('include/display.git_blob.php'); require_once('include/display.git_blob.php');
git_blob($gitphp_conf['projectroot'],$_GET['p'], (isset($_GET['h']) ? $_GET['h'] : NULL), (isset($_GET['f']) ? $_GET['f'] : NULL), (isset($_GET['hb']) ? $_GET['hb'] : NULL)); git_blob($gitphp_conf['projectroot'],$_GET['p'], (isset($_GET['h']) ? $_GET['h'] : NULL), (isset($_GET['f']) ? $_GET['f'] : NULL), (isset($_GET['hb']) ? $_GET['hb'] : NULL));
break; break;
case "blob_plain": case "blob_plain":
$suppress_headers = TRUE; $suppress_headers = TRUE;
require_once('include/display.git_blob_plain.php'); require_once('include/display.git_blob_plain.php');
git_blob_plain($gitphp_conf['projectroot'],$_GET['p'],$_GET['h'],(isset($_GET['f']) ? $_GET['f'] : NULL)); git_blob_plain($gitphp_conf['projectroot'],$_GET['p'],$_GET['h'],(isset($_GET['f']) ? $_GET['f'] : NULL));
break; break;
case "blobdiff": case "blobdiff":
require_once('include/display.git_blobdiff.php'); require_once('include/display.git_blobdiff.php');
git_blobdiff($gitphp_conf['projectroot'],$_GET['p'],$_GET['h'],$_GET['hb'],$_GET['hp'],(isset($_GET['f']) ? $_GET['f'] : NULL)); git_blobdiff($gitphp_conf['projectroot'],$_GET['p'],$_GET['h'],$_GET['hb'],$_GET['hp'],(isset($_GET['f']) ? $_GET['f'] : NULL));
break; break;
case "blobdiff_plain": case "blobdiff_plain":
$suppress_headers = TRUE; $suppress_headers = TRUE;
require_once('include/display.git_blobdiff_plain.php'); require_once('include/display.git_blobdiff_plain.php');
git_blobdiff_plain($gitphp_conf['projectroot'],$_GET['p'],$_GET['h'],$_GET['hb'],$_GET['hp'], (isset($_GET['f']) ? $_GET['f'] : NULL)); git_blobdiff_plain($gitphp_conf['projectroot'],$_GET['p'],$_GET['h'],$_GET['hb'],$_GET['hp'], (isset($_GET['f']) ? $_GET['f'] : NULL));
break; break;
case "snapshot": case "snapshot":
$suppress_headers = TRUE; $suppress_headers = TRUE;
require_once('include/display.git_snapshot.php'); require_once('include/display.git_snapshot.php');
git_snapshot($gitphp_conf['projectroot'],$_GET['p'], (isset($_GET['h']) ? $_GET['h'] : NULL)); git_snapshot($gitphp_conf['projectroot'],$_GET['p'], (isset($_GET['h']) ? $_GET['h'] : NULL));
break; break;
case "history": case "history":
require_once('include/display.git_history.php'); require_once('include/display.git_history.php');
git_history($gitphp_conf['projectroot'],$_GET['p'], (isset($_GET['h']) ? $_GET['h'] : NULL),$_GET['f']); git_history($gitphp_conf['projectroot'],$_GET['p'], (isset($_GET['h']) ? $_GET['h'] : NULL),$_GET['f']);
break; break;
case "search": case "search":
if (isset($_GET['st']) && ($_GET['st'] == 'file')) { if (isset($_GET['st']) && ($_GET['st'] == 'file')) {
require_once('include/display.git_search_files.php'); require_once('include/display.git_search_files.php');
git_search_files($gitphp_conf['projectroot'],$_GET['p'],(isset($_GET['h']) ? $_GET['h'] : NULL),(isset($_GET['s']) ? $_GET['s'] : NULL),(isset($_GET['pg']) ? $_GET['pg'] : 0)); git_search_files($gitphp_conf['projectroot'],$_GET['p'],(isset($_GET['h']) ? $_GET['h'] : NULL),(isset($_GET['s']) ? $_GET['s'] : NULL),(isset($_GET['pg']) ? $_GET['pg'] : 0));
} else { } else {
require_once('include/display.git_search.php'); require_once('include/display.git_search.php');
git_search($gitphp_conf['projectroot'],$_GET['p'],(isset($_GET['h']) ? $_GET['h'] : NULL),(isset($_GET['s']) ? $_GET['s'] : NULL),(isset($_GET['st']) ? $_GET['st'] : "commit"),(isset($_GET['pg']) ? $_GET['pg'] : 0)); git_search($gitphp_conf['projectroot'],$_GET['p'],(isset($_GET['h']) ? $_GET['h'] : NULL),(isset($_GET['s']) ? $_GET['s'] : NULL),(isset($_GET['st']) ? $_GET['st'] : "commit"),(isset($_GET['pg']) ? $_GET['pg'] : 0));
} }
break; break;
case "tag": case "tag":
require_once('include/display.git_tag.php'); require_once('include/display.git_tag.php');
git_tag($gitphp_conf['projectroot'],$_GET['p'],$_GET['h']); git_tag($gitphp_conf['projectroot'],$_GET['p'],$_GET['h']);
break; break;
default: default:
echo "Unknown action"; echo "Unknown action";
break; break;
} }
} }
} }
} else { } else {
$tpl->display("hometext.tpl"); $tpl->display("hometext.tpl");
require_once('include/display.git_project_list.php'); require_once('include/display.git_project_list.php');
git_project_list($gitphp_conf['projectroot'],$git_projects,(isset($_GET['o']) ? $_GET['o'] : "project")); git_project_list($gitphp_conf['projectroot'],$git_projects,(isset($_GET['o']) ? $_GET['o'] : "project"));
} }
$main = ob_get_contents(); $main = ob_get_contents();
ob_end_clean(); ob_end_clean();
   
if (!$suppress_headers) { if (!$suppress_headers) {
$tpl->clear_all_assign(); $tpl->clear_all_assign();
$tpl->assign("stylesheet",$gitphp_conf['stylesheet']); $tpl->assign("stylesheet",$gitphp_conf['stylesheet']);
$tpl->assign("version",$gitphp_version); $tpl->assign("version",$gitphp_version);
$title = $gitphp_conf['title']; $title = $gitphp_conf['title'];
if ($rss_link) { if ($rss_link) {
$tpl->assign("rss_link",TRUE); $tpl->assign("rss_link",TRUE);
$tpl->assign("project",$_GET['p']); $tpl->assign("project",$_GET['p']);
$title .= " :: " . $_GET['p']; $title .= " :: " . $_GET['p'];
if (isset($_GET['a'])) { if (isset($_GET['a'])) {
$tpl->assign("action",$_GET['a']); $tpl->assign("action",$_GET['a']);
$title .= "/" . $_GET['a']; $title .= "/" . $_GET['a'];
} }
} }
$tpl->assign("title",$title); $tpl->assign("title",$title);
if (isset($_GET['st'])) if (isset($_GET['st']))
$tpl->assign("searchtype",$_GET['st']); $tpl->assign("searchtype",$_GET['st']);
else else
$tpl->assign("searchtype","commit"); $tpl->assign("searchtype","commit");
if (isset($_GET['s'])) if (isset($_GET['s']))
$tpl->assign("search",$_GET['s']); $tpl->assign("search",$_GET['s']);
if (isset($_GET['hb'])) if (isset($_GET['hb']))
$tpl->assign("hash",$_GET['hb']); $tpl->assign("hash",$_GET['hb']);
else if (isset($_GET['h'])) else if (isset($_GET['h']))
$tpl->assign("hash",$_GET['h']); $tpl->assign("hash",$_GET['h']);
if ($gitphp_conf['search']) if ($gitphp_conf['search'])
$tpl->assign("enablesearch",TRUE); $tpl->assign("enablesearch",TRUE);
if ($gitphp_conf['filesearch']) if ($gitphp_conf['filesearch'])
$tpl->assign("filesearch",TRUE); $tpl->assign("filesearch",TRUE);
$tpl->display("header.tpl"); $tpl->display("header.tpl");
} }
   
echo $main; echo $main;
   
if (!$suppress_headers) { if (!$suppress_headers) {
if ($rss_link) { if ($rss_link) {
$tpl->assign("project",$_GET['p']); $tpl->assign("project",$_GET['p']);
require_once('include/gitutil.git_project_descr.php'); require_once('include/gitutil.git_project_descr.php');
$tpl->assign("descr",git_project_descr($gitphp_conf['projectroot'],$_GET['p'])); $tpl->assign("descr",git_project_descr($gitphp_conf['projectroot'],$_GET['p']));
} }
$tpl->display("footer.tpl"); $tpl->display("footer.tpl");
} }
   
ob_end_flush(); ob_end_flush();
   
?> ?>
   
{* {*
* project.tpl * project.tpl
* gitphp: A PHP git repository browser * gitphp: A PHP git repository browser
* Component: Project template * Component: Project summary template
* *
* Copyright (C) 2009 Christopher Han <xiphux@gmail.com> * Copyright (C) 2009 Christopher Han <xiphux@gmail.com>
*} *}
  {* Nav *}
<div class="page_nav"> <div class="page_nav">
summary | <a href="{$SCRIPT_NAME}?p={$project}&a=shortlog">shortlog</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=log">log</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=commit&h={$head}">commit</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=commitdiff&h={$head}">commitdiff</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=tree">tree</a> summary | <a href="{$SCRIPT_NAME}?p={$project}&a=shortlog">shortlog</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=log">log</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=commit&h={$head}">commit</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=commitdiff&h={$head}">commitdiff</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=tree">tree</a>
<br /><br /> <br /><br />
</div> </div>
<div class="title">&nbsp;</div> <div class="title">&nbsp;</div>
  {* Project brief *}
<table cellspacing="0"> <table cellspacing="0">
<tr><td>description</td><td>{$description}</td></tr> <tr><td>description</td><td>{$description}</td></tr>
<tr><td>owner</td><td>{$owner}</td></tr> <tr><td>owner</td><td>{$owner}</td></tr>
<tr><td>last change</td><td>{$lastchange}</td></tr> <tr><td>last change</td><td>{$lastchange}</td></tr>
</table> </table>
<div> <div>
<a class="title" href="{$SCRIPT_NAME}?p={$project}&a=shortlog">shortlog</a> <a class="title" href="{$SCRIPT_NAME}?p={$project}&a=shortlog">shortlog</a>
</div> </div>
<table cellspacing="0"> <table cellspacing="0">
  {* Recent revisions *}
{section name=rev max=17 loop=$revlist} {section name=rev max=17 loop=$revlist}
{if $smarty.section.rev.index == 16} {if $smarty.section.rev.index == 16}
<tr class="light"> <tr class="light">
<td><a href="{$SCRIPT_NAME}?p={$project}&a=shortlog">...</a></td> <td><a href="{$SCRIPT_NAME}?p={$project}&a=shortlog">...</a></td>
</tr> </tr>
{else} {else}
<tr class="{cycle name=revs values="light,dark"}"> <tr class="{cycle name=revs values="light,dark"}">
<td><i>{$revlist[rev].commitage}</i></td> <td><i>{$revlist[rev].commitage}</i></td>
<td><i>{$revlist[rev].commitauthor}</i></td> <td><i>{$revlist[rev].commitauthor}</i></td>
<td> <td>
<a href="{$SCRIPT_NAME}?p={$project}&a=commit&h={$revlist[rev].commit}" class="list" {if $revlist[rev].title}title="{$revlist[rev].title}"{/if}><b>{$revlist[rev].title_short} <a href="{$SCRIPT_NAME}?p={$project}&a=commit&h={$revlist[rev].commit}" class="list" {if $revlist[rev].title}title="{$revlist[rev].title}"{/if}><b>{$revlist[rev].title_short}
{if $revlist[rev].commitref} {if $revlist[rev].commitref}
<span class="tag">{$revlist[rev].commitref}</span> <span class="tag">{$revlist[rev].commitref}</span>
{/if} {/if}
</b> </b>
</td> </td>
<td class="link"><a href="{$SCRIPT_NAME}?p={$project}&a=commit&h={$revlist[rev].commit}">commit</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=commitdiff&h={$revlist[rev].commit}">commitdiff</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=tree&h={$revlist[rev].commit}&hb={$revlist[rev].commit}">tree</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=snapshot&h={$revlist[rev].commit}">snapshot</a></td> <td class="link"><a href="{$SCRIPT_NAME}?p={$project}&a=commit&h={$revlist[rev].commit}">commit</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=commitdiff&h={$revlist[rev].commit}">commitdiff</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=tree&h={$revlist[rev].commit}&hb={$revlist[rev].commit}">tree</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=snapshot&h={$revlist[rev].commit}">snapshot</a></td>
</tr> </tr>
{/if} {/if}
{/section} {/section}
</table> </table>
{if $taglist} {if $taglist}
  {* Tags *}
<div> <div>
<a href="{$SCRIPT_NAME}?p={$project}&a=tags" class="title">tags</a> <a href="{$SCRIPT_NAME}?p={$project}&a=tags" class="title">tags</a>
</div> </div>
<table cellspacing="0"> <table cellspacing="0">
{section name=tag max=17 loop=$taglist} {section name=tag max=17 loop=$taglist}
<tr class="{cycle name=tags values="light,dark"}"> <tr class="{cycle name=tags values="light,dark"}">
{if $smarty.section.tag.index == 16} {if $smarty.section.tag.index == 16}
<td><a href="{$SCRIPT_NAME}?p={$project}&a=tags">...</a></td> <td><a href="{$SCRIPT_NAME}?p={$project}&a=tags">...</a></td>
{else} {else}
<td><i>{$taglist[tag].age}</i></td> <td><i>{$taglist[tag].age}</i></td>
<td><a href="{$SCRIPT_NAME}?p={$project}&a={$taglist[tag].reftype}&h={$taglist[tag].refid}" class="list"><b>{$taglist[tag].name}</b></a></td> <td><a href="{$SCRIPT_NAME}?p={$project}&a={$taglist[tag].reftype}&h={$taglist[tag].refid}" class="list"><b>{$taglist[tag].name}</b></a></td>
<td> <td>
{if $taglist[tag].comment} {if $taglist[tag].comment}
<a class="list" href="{$SCRIPT_NAME}?p={$project}&a=tag&h={$taglist[tag].id}">{$taglist[tag].comment}</a> <a class="list" href="{$SCRIPT_NAME}?p={$project}&a=tag&h={$taglist[tag].id}">{$taglist[tag].comment}</a>
{/if} {/if}
</td> </td>
<td class="link"> <td class="link">
{if $taglist[tag].type == "tag"} {if $taglist[tag].type == "tag"}
<a href="{$SCRIPT_NAME}?p={$project}&a=tag&h={$taglist[tag].id}">tag</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=tag&h={$taglist[tag].id}">tag</a> |
{/if} {/if}
<a href="{$SCRIPT_NAME}?p={$project}&a={$taglist[tag].reftype}&h={$taglist[tag].refid}">{$taglist[tag].reftype}</a>{if $taglist[tag].reftype == "commit"} | <a href="{$SCRIPT_NAME}?p={$project}&a=shortlog&h=refs/tags/{$taglist[tag].name}">shortlog</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=log&h=refs/tags/{$taglist[tag].name}">log</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=snapshot&h={$taglist[tag].refid}">snapshot</a>{/if} <a href="{$SCRIPT_NAME}?p={$project}&a={$taglist[tag].reftype}&h={$taglist[tag].refid}">{$taglist[tag].reftype}</a>{if $taglist[tag].reftype == "commit"} | <a href="{$SCRIPT_NAME}?p={$project}&a=shortlog&h=refs/tags/{$taglist[tag].name}">shortlog</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=log&h=refs/tags/{$taglist[tag].name}">log</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=snapshot&h={$taglist[tag].refid}">snapshot</a>{/if}
</td> </td>
{/if} {/if}
</tr> </tr>
{/section} {/section}
</table> </table>
{/if} {/if}
{if $headlist} {if $headlist}
  {* Heads *}
<div> <div>
<a href="{$SCRIPT_NAME}?p={$project}&a=heads" class="title">heads</a> <a href="{$SCRIPT_NAME}?p={$project}&a=heads" class="title">heads</a>
</div> </div>
<table cellspacing="0"> <table cellspacing="0">
{section name=head max=17 loop=$headlist} {section name=head max=17 loop=$headlist}
<tr class="{cycle name=heads values="light,dark"}"> <tr class="{cycle name=heads values="light,dark"}">
{if $smarty.section.head.index == 16} {if $smarty.section.head.index == 16}
<td><a href="{$SCRIPT_NAME}?p={$project}&a=heads">...</a></td> <td><a href="{$SCRIPT_NAME}?p={$project}&a=heads">...</a></td>
{else} {else}
<td><i>{$headlist[head].age}</i></td> <td><i>{$headlist[head].age}</i></td>
<td><a href="{$SCRIPT_NAME}?p={$project}&a=shortlog&h=refs/heads/{$headlist[head].name}" class="list"><b>{$headlist[head].name}</b></td> <td><a href="{$SCRIPT_NAME}?p={$project}&a=shortlog&h=refs/heads/{$headlist[head].name}" class="list"><b>{$headlist[head].name}</b></td>
<td class="link"><a href="{$SCRIPT_NAME}?p={$project}&a=shortlog&h=refs/heads/{$headlist[head].name}">shortlog</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=log&h=refs/heads/{$headlist[head].name}">log</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=tree&h=refs/heads/{$headlist[head].name}&hb={$headlist[head].name}">tree</a></td> <td class="link"><a href="{$SCRIPT_NAME}?p={$project}&a=shortlog&h=refs/heads/{$headlist[head].name}">shortlog</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=log&h=refs/heads/{$headlist[head].name}">log</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=tree&h=refs/heads/{$headlist[head].name}&hb={$headlist[head].name}">tree</a></td>
{/if} {/if}
</tr> </tr>
{/section} {/section}
</table> </table>
{/if} {/if}
   
{* {*
* shortlog.tpl * shortlog.tpl
* gitphp: A PHP git repository browser * gitphp: A PHP git repository browser
* Component: Shortlog view template * Component: Shortlog view template
* *
* Copyright (C) 2009 Christopher Han <xiphux@gmail.com> * Copyright (C) 2009 Christopher Han <xiphux@gmail.com>
*} *}
  {* Nav *}
<div class="page_nav"> <div class="page_nav">
<a href="{$SCRIPT_NAME}?p={$project}&a=summary">summary</a> | shortlog | <a href="{$SCRIPT_NAME}?p={$project}&a=log&h={$hash}">log</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=commit&h={$hash}">commit</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=commitdiff&h={$hash}">commitdiff</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=tree&h={$hash}&hb={$hash}">tree</a> <a href="{$SCRIPT_NAME}?p={$project}&a=summary">summary</a> | shortlog | <a href="{$SCRIPT_NAME}?p={$project}&a=log&h={$hash}">log</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=commit&h={$hash}">commit</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=commitdiff&h={$hash}">commitdiff</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=tree&h={$hash}&hb={$hash}">tree</a>
<br /> <br />
{if ($hash != $head) || $page} {if ($hash != $head) || $page}
<a href="{$SCRIPT_NAME}?p={$project}&a=shortlog">HEAD</a> <a href="{$SCRIPT_NAME}?p={$project}&a=shortlog">HEAD</a>
{else} {else}
HEAD HEAD
{/if} {/if}
&sdot; &sdot;
{if $page > 0} {if $page > 0}
<a href="{$SCRIPT_NAME}?p={$project}&a=shortlog&h={$hash}&pg={$page-1}" accesskey="p" title="Alt-p">prev</a> <a href="{$SCRIPT_NAME}?p={$project}&a=shortlog&h={$hash}&pg={$page-1}" accesskey="p" title="Alt-p">prev</a>
{else} {else}
prev prev
{/if} {/if}
&sdot; &sdot;
{if $revlistcount > 100} {if $revlistcount > 100}
<a href="{$SCRIPT_NAME}?p={$project}&a=shortlog&h={$hash}&pg={$page+1}" accesskey="n" title="Alt-n">next</a> <a href="{$SCRIPT_NAME}?p={$project}&a=shortlog&h={$hash}&pg={$page+1}" accesskey="n" title="Alt-n">next</a>
{else} {else}
next next
{/if} {/if}
<br /> <br />
</div> </div>
<div> <div>
<a href="{$SCRIPT_NAME}?p={$project}&a=summary" class="title">&nbsp;</a> <a href="{$SCRIPT_NAME}?p={$project}&a=summary" class="title">&nbsp;</a>
</div> </div>
<table cellspacing="0"> <table cellspacing="0">
  {* Display each log entry *}
{section name=log loop=$commitlines} {section name=log loop=$commitlines}
<tr class="{cycle values="light,dark"}"> <tr class="{cycle values="light,dark"}">
<td title="{$commitlines[log].agestringage}"><i>{$commitlines[log].agestringdate}</i></td> <td title="{$commitlines[log].agestringage}"><i>{$commitlines[log].agestringdate}</i></td>
<td><i>{$commitlines[log].authorname}</i></td> <td><i>{$commitlines[log].authorname}</i></td>
<td> <td>
<a href="{$SCRIPT_NAME}?p={$project}&a=commit&h={$commitlines[log].commit}" class="list" {if $commitlines[log].title}title="{$commitlines[log].title}"{/if}><b>{$commitlines[log].title_short} <a href="{$SCRIPT_NAME}?p={$project}&a=commit&h={$commitlines[log].commit}" class="list" {if $commitlines[log].title}title="{$commitlines[log].title}"{/if}><b>{$commitlines[log].title_short}
{if $commitlines[log].commitref} {if $commitlines[log].commitref}
<span class="tag">{$commitlines[log].commitref}</span> <span class="tag">{$commitlines[log].commitref}</span>
{/if} {/if}
</b> </b>
</td> </td>
<td class="link"><a href="{$SCRIPT_NAME}?p={$project}&a=commit&h={$commitlines[log].commit}">commit</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=commitdiff&h={$commitlines[log].commit}">commitdiff</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=tree&h={$commitlines[log].commit}&hb={$commitlines[log].commit}">tree</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=snapshot&h={$commitlines[log].commit}">snapshot</a> <td class="link"><a href="{$SCRIPT_NAME}?p={$project}&a=commit&h={$commitlines[log].commit}">commit</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=commitdiff&h={$commitlines[log].commit}">commitdiff</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=tree&h={$commitlines[log].commit}&hb={$commitlines[log].commit}">tree</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=snapshot&h={$commitlines[log].commit}">snapshot</a>
</td> </td>
</tr> </tr>
{/section} {/section}
   
{if $revlistcount > 100} {if $revlistcount > 100}
<tr> <tr>
<td><a href="{$SCRIPT_NAME}?p={$project}&a=shortlog&h={$hash}&pg={$page+1}" title="Alt-n">next</a></td> <td><a href="{$SCRIPT_NAME}?p={$project}&a=shortlog&h={$hash}&pg={$page+1}" title="Alt-n">next</a></td>
</tr> </tr>
{/if} {/if}
</table> </table>
   
file:b/templates/tag.tpl (new)
  {*
  * tag.tpl
  * gitphp: A PHP git repository browser
  * Component: Tag view template
  *
  * Copyright (C) 2009 Christopher Han <xiphux@gmail.com>
  *}
  {* Nav *}
  <div class="page_nav">
  <a href="{$SCRIPT_NAME}?p={$project}&a=summary">summary</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=shortlog">shortlog</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=log">log</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=commit&h={$head}">commit</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=commitdiff&h={$head}">commitdiff</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=tree&hb={$head}">tree</a>
  <br /><br />
  </div>
  {* Tag data *}
  <div>
  <a href="{$SCRIPT_NAME}?p={$project}&a=commit&h={$hash}" class="title">{$tag.name}</a>
  </div>
  <div class="title_text">
  <table cellspacing="0">
  <tr>
  <td>object</td>
  <td class="monospace"><a href="{$SCRIPT_NAME}?p={$project}&a={$tag.type}&h={$tag.object}" class="list">{$tag.object}</a></td>
  <td class="link"><a href="{$SCRIPT_NAME}?p={$project}&a={$tag.type}&h={$tag.object}">{$tag.type}</a></td>
  </tr>
  {if $tag.author}
  <tr>
  <td>author</td>
  <td>{$tag.author}</td>
  </tr>
  <tr>
  <td></td>
  <td> {$datedata.rfc2822} ({if $datedata.hour_local < 6}<span class="latenight">{/if}{$datedata.hour_local}:{$datedata.minute_local}{if $datedata.hour_local < 6}</span>{/if} {$datedata.tz_local})
  </td>
  </tr>
  {/if}
  </table>
  </div>
  <div class="page_body">
  {foreach from=$tag.comment item=line}
  {$line}<br />
  {/foreach}
  </div>
 
file:a/templates/tag_data.tpl (deleted)
{*  
* tag_data.tpl  
* gitphp: A PHP git repository browser  
* Component: Tag view data template  
*  
* Copyright (C) 2009 Christopher Han <xiphux@gmail.com>  
*}  
<div>  
<a href="{$SCRIPT_NAME}?p={$project}&a=commit&h={$hash}" class="title">{$title}</a>  
</div>  
<div class="title_text">  
<table cellspacing="0">  
<tr><td>object</td><td class="monospace"><a href="{$SCRIPT_NAME}?p={$project}&a={$type}&h={$object}" class="list">{$object}</a></td><td class="link"><a href="{$SCRIPT_NAME}?p={$project}&a={$type}&h={$object}">{$type}</a></td></tr>  
{if $author}  
<tr><td>author</td><td>{$author}</td></tr>  
<tr><td></td><td> {$adrfc2822} ({if $adhourlocal < 6}<span class="latenight">{/if}{$adhourlocal}:{$adminutelocal}{if $adhourlocal < 6}</span>{/if} {$adtzlocal})  
</td></tr>  
{/if}  
</table>  
</div>  
<div class="page_body">  
{foreach from=$comment item=line}  
{$line}<br />  
{/foreach}  
</div>  
 
file:a/templates/tag_nav.tpl (deleted)
{*  
* tag_nav.tpl  
* gitphp: A PHP git repository browser  
* Component: Tag navbar template  
*  
* Copyright (C) 2009 Christopher Han <xiphux@gmail.com>  
*}  
<div class="page_nav">  
<a href="{$SCRIPT_NAME}?p={$project}&a=summary">summary</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=shortlog">shortlog</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=log">log</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=commit&h={$head}">commit</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=commitdiff&h={$head}">commitdiff</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=tree&hb={$head}">tree</a>  
<br /><br />  
</div>  
 
  {*
  * tags.tpl
  * gitphp: A PHP git repository browser
  * Component: Tag view template
  *
  * Copyright (C) 2009 Christopher Han <xiphux@gmail.com>
  *}
  {* Nav *}
  <div class="page_nav">
  <a href="{$SCRIPT_NAME}?p={$project}&a=summary">summary</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=shortlog">shortlog</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=log">log</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=commit&h={$head}">commit</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=commitdiff&h={$head}">commitdiff</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=tree&hb={$head}">tree</a>
  <br /><br />
  </div>
  <div>
  <a href="{$SCRIPT_NAME}?p={$project}&a=summary" class="title">&nbsp;</a>
  </div>
  {* Display tags *}
  <table cellspacing="0">
  {section name=tag loop=$taglist}
  <tr class="{cycle values="light,dark"}">
  <td><i>{$taglist[tag].age}</i></td>
  <td><a href="{$SCRIPT_NAME}?p={$project}&a={$taglist[tag].reftype}&h={$taglist[tag].refid}" class="list"><b>{$taglist[tag].name}</b></a></td>
  <td>
  {if count($taglist[tag].comment) > 0}
  <a href="{$SCRIPT_NAME}?p={$project}&a=tag&h={$taglist[tag].id}" class="list">{$taglist[tag].comment[0]}</a>
  {/if}
  </td>
  <td class="link">
  {if $taglist[tag].type == "tag"}
  <a href="{$SCRIPT_NAME}?p={$project}&a=tag&h={$taglist[tag].id}">tag</a> |
  {/if}
  <a href="{$SCRIPT_NAME}?p={$project}&a={$taglist[tag].reftype}&h={$taglist[tag].refid}">{$taglist[tag].reftype}</a>
  {if $taglist[tag].reftype == "commit"}
  | <a href="{$SCRIPT_NAME}?p={$project}&a=shortlog&h=refs/tags/{$taglist[tag].name}">shortlog</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=log&h=refs/tags/{$taglist[tag].name}">log</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=snapshot&h={$taglist[tag].refid}">snapshot</a>
  {/if}
  </td>
  </tr>
  {/section}
  </table>
 
{*  
* tags_footer.tpl  
* gitphp: A PHP git repository browser  
* Component: Tag view footer template  
*  
* Copyright (C) 2006 Christopher Han <xiphux@gmail.com>  
*}  
</table>  
 
{*  
* tags_header.tpl  
* gitphp: A PHP git repository browser  
* Component: Tag view header template  
*  
* Copyright (C) 2006 Christopher Han <xiphux@gmail.com>  
*}  
<div><a href="{$SCRIPT_NAME}?p={$project}&a=summary" class="title">&nbsp;</a></div>  
<table cellspacing="0">  
 
file:a/templates/tags_item.tpl (deleted)
{*  
* tags_item.tpl  
* gitphp: A PHP git repository browser  
* Component: Tag view item template  
*  
* Copyright (C) 2006 Christopher Han <xiphux@gmail.com>  
*}  
<tr class="{$class}">  
<td><i>{$age}</i></td>  
<td><a href="{$SCRIPT_NAME}?p={$project}&a={$reftype}&h={$refid}" class="list"><b>{$name}</b></a></td>  
<td>  
{if $comment}  
<a href="{$SCRIPT_NAME}?p={$project}&a=tag&h={$id}" class="list">{$comment}</a>  
{/if}  
</td>  
<td class="link">  
{if $type == "tag"}<a href="{$SCRIPT_NAME}?p={$project}&a=tag&h={$id}">tag</a> | {/if}<a href="{$SCRIPT_NAME}?p={$project}&a={$reftype}&h={$refid}">{$reftype}</a>{if $reftype == "commit"} | <a href="{$SCRIPT_NAME}?p={$project}&a=shortlog&h=refs/tags/{$name}">shortlog</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=log&h=refs/tags/{$name}">log</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=snapshot&h={$refid}">snapshot</a>{/if}  
</td>  
</tr>  
 
file:a/templates/tags_nav.tpl (deleted)
{*  
* tags_nav.tpl  
* gitphp: A PHP git repository browser  
* Component: Tag view nav template  
*  
* Copyright (C) 2006 Christopher Han <xiphux@gmail.com>  
*}  
<div class="page_nav">  
<a href="{$SCRIPT_NAME}?p={$project}&a=summary">summary</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=shortlog">shortlog</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=log">log</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=commit&h={$head}">commit</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=commitdiff&h={$head}">commitdiff</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=tree&hb={$head}">tree</a>  
<br /><br />  
</div>  
 
  {*
  * tree.tpl
  * gitphp: A PHP git repository browser
  * Component: Tree view template
  *
  * Copyright (C) 2009 Christopher Han <xiphux@gmail.com>
  *}
  {* Nav *}
  {if $fullnav}
  <div class="page_nav">
  <a href="{$SCRIPT_NAME}?p={$project}&a=summary">summary</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=shortlog&h={$hashbase}">shortlog</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=log&h={$hashbase}">log</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=commit&h={$hashbase}">commit</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=commitdiff&h={$hashbase}">commitdiff</a> | tree<br /><br />
  </div>
  <div>
  <a href="{$SCRIPT_NAME}?p={$project}&a=commit&h={$hashbase}" class="title">{$title}
  {if $hashbaseref}
  <span class="tag">{$hashbaseref}</span>
  {/if}
  </a>
  </div>
  {else}
  <div class="page_nav"><br /><br /></div>
  <div class="title">{$hash}</div>
  {/if}
  {* Path *}
  <div class="page_path">
  <b>
  <a href="{$SCRIPT_NAME}?p={$project}&a=tree&hb={$hashbase}&h={$hashbase}">[{$project}]</a> /
  {foreach from=$paths item=path}
  <a href="{$SCRIPT_NAME}?p={$project}&a=tree&hb={$hashbase}&h={$path.tree}&f={$path.full}">{$path.short}</a> /
  {/foreach}
  </b>
  </div>
  <div class="page_body">
  {* List files *}
  <table cellspacing="0">
  {section name=tree loop=$treelines}
  <tr class="{cycle values="light,dark"}">
  <td class="monospace">{$treelines[tree].filemode}</td>
  {if $treelines[tree].type == "blob"}
  <td class="list">
  <a href="{$SCRIPT_NAME}?p={$project}&a=blob&h={$treelines[tree].hash}{if $hashbase}&hb={$hashbase}{/if}&f={if $base}{$base}{/if}{$treelines[tree].name}" class="list">{$treelines[tree].name}</a>
  </td>
  <td class="link">
  <a href="{$SCRIPT_NAME}?p={$project}&a=blob&h={$treelines[tree].hash}{if $hashbase}&hb={$hashbase}{/if}&f={if $base}{$base}{/if}{$treelines[tree].name}">blob</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=history&h={$hashbase}&f={if $base}{$base}{/if}{$treelines[tree].name}">history</a>
  </td>
  {elseif $treelines[tree].type == "tree"}
  <td class="list">
  <a href="{$SCRIPT_NAME}?p={$project}&a=tree&h={$treelines[tree].hash}{if $hashbase}&hb={$hashbase}{/if}&f={if $base}{$base}{/if}{$treelines[tree].name}">{$treelines[tree].name}</a>
  </td>
  <td class="link">
  <a href="{$SCRIPT_NAME}?p={$project}&a=tree&h={$treelines[tree].hash}{if $hashbase}&hb={$hashbase}{/if}&f={if $base}{$base}{/if}{$treelines[tree].name}">tree</a>
  </td>
  {/if}
  </tr>
  {/section}
  </table>
  </div>
 
{*  
* tree_emptynav.tpl  
* gitphp: A PHP git repository browser  
* Component: Tree view emptynav template  
*  
* Copyright (C) 2006 Christopher Han <xiphux@gmail.com>  
*}  
<div class="page_nav"><br /><br /></div>  
<div class="title">{$hash}</div>  
 
{*  
* tree_filelist_footer.tpl  
* gitphp: A PHP git repository browser  
* Component: Tree view filelist footer template  
*  
* Copyright (C) 2006 Christopher Han <xiphux@gmail.com>  
*}  
</table>  
</div>  
 
{*  
* tree_filelist_header.tpl  
* gitphp: A PHP git repository browser  
* Component: Tree view filelist header template  
*  
* Copyright (C) 2006 Christopher Han <xiphux@gmail.com>  
*}  
<div class="page_path"><b><a href="{$SCRIPT_NAME}?p={$project}&a=tree&hb={$hashbase}&h={$hashbase}">[{$project}]</a> / {foreach from=$paths item=path}<a href="{$SCRIPT_NAME}?p={$project}&a=tree&hb={$hashbase}&h={$path.tree}&f={$path.full}">{$path.short}</a> / {/foreach}</b></div>  
<div class="page_body">  
<table cellspacing="0">  
 
{*  
* tree_filelist_item.tpl  
* gitphp: A PHP git repository browser  
* Component: Tree view filelist item template  
*  
* Copyright (C) 2006 Christopher Han <xiphux@gmail.com>  
*}  
<tr class="{$class}">  
<td class="monospace">{$filemode}</td>  
<td class="list">  
{if $type == "blob"}  
<a href="{$SCRIPT_NAME}?p={$project}&a=blob&h={$hash}{if $hashbase}&hb={$hashbase}{/if}&f={if $base}{$base}{/if}{$name}" class="list">{$name}</a></td>  
<td class="link"><a href="{$SCRIPT_NAME}?p={$project}&a=blob&h={$hash}{if $hashbase}&hb={$hashbase}{/if}&f={if $base}{$base}{/if}{$name}">blob</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=history&h={$hashbase}&f={if $base}{$base}{/if}{$name}">history</a>  
{elseif $type == "tree"}  
<a href="{$SCRIPT_NAME}?p={$project}&a=tree&h={$hash}{if $hashbase}&hb={$hashbase}{/if}&f={if $base}{$base}{/if}{$name}">{$name}</a></td>  
<td class="link"><a href="{$SCRIPT_NAME}?p={$project}&a=tree&h={$hash}{if $hashbase}&hb={$hashbase}{/if}&f={if $base}{$base}{/if}{$name}">tree</a>  
{/if}  
</td>  
</tr>  
 
file:a/templates/tree_nav.tpl (deleted)
{*  
* tree_nav.tpl  
* gitphp: A PHP git repository browser  
* Component: Tree view nav template  
*  
* Copyright (C) 2006 Christopher Han <xiphux@gmail.com>  
*}  
<div class="page_nav"><a href="{$SCRIPT_NAME}?p={$project}&a=summary">summary</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=shortlog&h={$hashbase}">shortlog</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=log&h={$hashbase}">log</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=commit&h={$hashbase}">commit</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=commitdiff&h={$hashbase}">commitdiff</a> | tree<br /><br />  
</div>  
<div><a href="{$SCRIPT_NAME}?p={$project}&a=commit&h={$hashbase}" class="title">{$title}  
{if $hashbaseref}  
<span class="tag">{$hashbaseref}</span>  
{/if}  
</a></div>  
 
comments