Allow projects to have an external www link.
[viewgit.git] / inc / example-localconfig.php
blob9dcf14b42f9c856eed08591df4943d8a78725777
1 <?php
2 /** @file
3 * Example localconfig.php. See config.php for more information.
4 */
6 // This is the only mandatory setting
7 $conf['projects'] = array(
8 'foo' => array('repo' => '/home/user/projects/foo/.git'),
9 'bar' => array(
10 'repo' => '/home/user/projects/foo/.git',
11 'description' => 'Optional overridden description, otherwise it is taken from .git/description'
12 'www' => 'http://www.google.com', # optional
16 // $conf['projects'] can also be built up programmatically
17 // for example the following can be used to translate gitolite's
18 // projects.list (intended for gitweb) for viewgit
21 $projects_list_file = "/opt/git/projects.list";
22 $repo_home = "/opt/git/repositories";
23 foreach (file($projects_list_file) as $proj) {
24 $proj = trim($proj);
25 $conf['projects'][$proj] = array('repo' => "$repo_home/$proj");
29 // A bit sorter datetime format: YY-MM-DD HH:MM
30 $conf['datetime'] = '%y-%m-%d %H:%M';
32 // Extra security
33 $conf['allow_checkout'] = false;