Move to git-archive for zip support
[gitphp.git] / include / display.git_project_index.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
<?php
/*
 *  display.git_project_index.php
 *  gitphp: A PHP git repository browser
 *  Component: Display - project index
 *
 *  Copyright (C) 2008 Christopher Han <xiphux@gmail.com>
 */
 
 require_once('gitutil.git_read_projects.php');
 
function git_project_index($projectroot, $projectlist)
{
        $projlist = git_read_projects($projectroot, $projectlist);
        header("Content-type: text/plain; charset=utf-8");
        header("Content-Disposition: inline; filename=\"index.aux\"");
        foreach ($projlist as $cat => $plist) {
                if (is_array($plist)) {
                        foreach ($plist as $i => $proj)
                                echo $proj . "\n";
                } else
                        echo $plist . "\n";
        }
}
 
?>
 
comments