Merge pull request #53 from eriknyk/config.ini-improv

Litle tweaks for config.ini-example
This commit is contained in:
Klaus Silveira
2012-06-10 09:35:44 -07:00
2 changed files with 5 additions and 4 deletions

View File

@@ -1,12 +1,12 @@
[git]
client = '/usr/bin/git' ; Your git executable path
repositories = '/var/www/projects/' ; Path to your repositories (with ending slash)
repositories = '/var/www/projects/' ; Path to your repositories
; You can hide repositories from GitList, just copy this for each repository you want to hide
; hidden[] = '/var/www/projects/BetaTest'
; hidden[] = '/var/www/projects/BetaTest'
[app]
baseurl = 'http://localhost/git' ; Base URL of the application (without ending slash)
baseurl = 'http://localhost/git' ; Base URL of the application
; If you need to specify custom filetypes for certain extensions, do this here
[filetypes]

View File

@@ -14,9 +14,10 @@ if (empty($config['git']['repositories']) || !is_dir($config['git']['repositorie
require_once 'phar://'.__DIR__.'/vendor/silex.phar';
$app = new Silex\Application();
$app['baseurl'] = $config['app']['baseurl'];
$app['baseurl'] = rtrim($config['app']['baseurl'], '/');
$app['filetypes'] = $config['filetypes'];
$app['hidden'] = isset($config['git']['hidden']) ? $config['git']['hidden'] : array();
$config['git']['repositories'] = rtrim($config['git']['repositories'], DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR;
// Register Git and Twig libraries
$app['autoloader']->registerNamespace('Git', __DIR__.'/lib');