Move to git-archive for zip support
[gitphp.git] / include / gitutil.git_project_descr.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<?php
/*
 *  gitutil.git_project_descr.php
 *  gitphp: A PHP git repository browser
 *  Component: Git utility - project description
 *
 *  Copyright (C) 2008 Christopher Han <xiphux@gmail.com>
 */
 
require_once('defs.constants.php');
 
function git_project_descr($projectroot,$project,$trim = FALSE)
{
        $desc = file_get_contents($projectroot . $project . "/description");
        if ($trim && (strlen($desc) > GITPHP_TRIM_LENGTH))
                $desc = substr($desc,0, GITPHP_TRIM_LENGTH) . "...";
        return $desc;
}
 
?>
 
comments