1<?php
2
3/**
4 * GitList: an elegant and modern git repository viewer
5 * http://gitlist.org
6 */
7
8if (!ini_get('date.timezone')) {
9    date_default_timezone_set('UTC');
10}
11
12if (php_sapi_name() == 'cli-server' && file_exists(substr($_SERVER['REQUEST_URI'], 1))) {
13    return false;
14}
15
16if (!is_writable(__DIR__ . DIRECTORY_SEPARATOR . 'cache')) {
17    die(sprintf('The "%s" folder must be writable for GitList to run.', __DIR__ . DIRECTORY_SEPARATOR . 'cache'));
18}
19
20require 'vendor/autoload.php';
21
22$config = GitList\Config::fromFile('config.ini');
23
24if ($config->get('date', 'timezone')) {
25    date_default_timezone_set($config->get('date', 'timezone'));
26}
27
28$app = require 'boot.php';
29$app->run();
30
31