Make sure we always expire cache unless user very explicitly turns it off by setting it to false
[gitphp.git] / include / display.git_tags.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php
/*
 *  display.git_tags.php
 *  gitphp: A PHP git repository browser
 *  Component: Display - tags
 *
 *  Copyright (C) 2008 Christopher Han <xiphux@gmail.com>
 */
 
 require_once('gitutil.git_read_head.php');
 require_once('gitutil.git_read_refs.php');
 
function git_tags($projectroot,$project)
{
        global $tpl;
 
        $cachekey = sha1($project);
 
        if (!$tpl->is_cached('tags.tpl', $cachekey)) {
                $head = git_read_head($projectroot . $project);
                $tpl->assign("head",$head);
                $taglist = git_read_refs($projectroot, $project, "refs/tags");
                if (isset($taglist) && (count($taglist) > 0)) {
                        $tpl->assign("taglist",$taglist);
                }
        }
        $tpl->display('tags.tpl', $cachekey);
}
 
?>
 
comments