You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
52 lines
1.7 KiB
52 lines
1.7 KiB
12 years ago
|
<?php
|
||
|
# ***** BEGIN LICENSE BLOCK *****
|
||
|
# MINZ - A free PHP framework
|
||
|
# Copyright (C) 2011 Marien Fressinaud
|
||
11 years ago
|
#
|
||
12 years ago
|
# This program is free software: you can redistribute it and/or modify
|
||
|
# it under the terms of the GNU Affero General Public License as
|
||
|
# published by the Free Software Foundation, either version 3 of the
|
||
|
# License, or (at your option) any later version.
|
||
11 years ago
|
#
|
||
12 years ago
|
# This program is distributed in the hope that it will be useful,
|
||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
|
# GNU Affero General Public License for more details.
|
||
11 years ago
|
#
|
||
12 years ago
|
# You should have received a copy of the GNU Affero General Public License
|
||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||
|
#
|
||
|
# ***** END LICENSE BLOCK *****
|
||
|
|
||
11 years ago
|
if (file_exists ('install.php')) {
|
||
11 years ago
|
require('install.php');
|
||
12 years ago
|
} else {
|
||
11 years ago
|
require('../../constants.php');
|
||
11 years ago
|
|
||
11 years ago
|
session_cache_limiter('');
|
||
11 years ago
|
if (!file_exists(DATA_PATH . '/no-cache.txt')) {
|
||
|
require (LIB_PATH . '/http-conditional.php');
|
||
|
$dateLastModification = max(
|
||
11 years ago
|
@filemtime(DATA_PATH . '/touch.txt'),
|
||
|
@filemtime(LOG_PATH . '/application.log'),
|
||
11 years ago
|
@filemtime(DATA_PATH . '/config.php')
|
||
11 years ago
|
);
|
||
11 years ago
|
$_SERVER['QUERY_STRING'] .= '&utime=' . file_get_contents(DATA_PATH . '/touch.txt'); //For ETag
|
||
11 years ago
|
if (httpConditional($dateLastModification, 0, 0, false, false, true)) {
|
||
|
exit(); //No need to send anything
|
||
|
}
|
||
11 years ago
|
}
|
||
|
|
||
11 years ago
|
require(LIB_PATH . '/lib_rss.php'); //Includes class autoloader
|
||
12 years ago
|
|
||
11 years ago
|
try {
|
||
11 years ago
|
$front_controller = new FreshRSS();
|
||
11 years ago
|
$front_controller->init ();
|
||
|
$front_controller->run ();
|
||
11 years ago
|
} catch (Exception $e) {
|
||
|
echo '### Fatal error! ###<br />', "\n";
|
||
11 years ago
|
Minz_Log::record ($e->getMessage (), Minz_Log::ERROR);
|
||
11 years ago
|
echo 'See logs files.';
|
||
11 years ago
|
}
|
||
12 years ago
|
}
|