]> git.agnieray.net Git - galette.git/blob - galette/webroot/index.php
d9e4d79ebbd0133d70edb48dfeafea0371bf03b7
[galette.git] / galette / webroot / index.php
1 <?php
2
3 /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
4
5 /**
6 * Galette's instanciation and routes
7 *
8 * PHP version 5
9 *
10 * Copyright © 2014 The Galette Team
11 *
12 * This file is part of Galette (http://galette.tuxfamily.org).
13 *
14 * Galette is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation, either version 3 of the License, or
17 * (at your option) any later version.
18 *
19 * Galette is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
23 *
24 * You should have received a copy of the GNU General Public License
25 * along with Galette. If not, see <http://www.gnu.org/licenses/>.
26 *
27 * @category Main
28 * @package Galette
29 *
30 * @author Johan Cwiklinski <johan@x-tnd.be>
31 * @copyright 2014 The Galette Team
32 * @license http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version
33 * @link http://galette.tuxfamily.org
34 * @since 0.8.2dev 2014-11-11
35 */
36
37 // define relative base path templating can use
38 if (!defined('GALETTE_BASE_PATH')) {
39 define('GALETTE_BASE_PATH', '../');
40 }
41
42 define('GALETTE_ROOT', __DIR__ . '/../');
43
44 // check PHP modules
45 require_once GALETTE_ROOT . '/vendor/autoload.php';
46 require_once GALETTE_ROOT . 'config/versions.inc.php';
47
48 $cm = new Galette\Core\CheckModules(false);
49 $cm->doCheck(false); //do not load with translations!
50
51 if (version_compare(PHP_VERSION, GALETTE_PHP_MIN, '<') || !$cm->isValid()) {
52 header('location: ' . GALETTE_BASE_PATH . 'compat_test.php');
53 die(1);
54 }
55
56 /** @ignore */
57 require_once __DIR__ . '/../includes/main.inc.php';