1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2026-02-10 16:01:33 +00:00

properly check whether all constants are defined in config.php

This commit is contained in:
Andrew Dolgov
2011-01-11 12:20:00 +03:00
parent 0efa586a10
commit 8fc26c419b
3 changed files with 31 additions and 0 deletions
+11
View File
@@ -11,6 +11,7 @@
}
require_once "config.php";
require_once "sanity_config.php";
if (CONFIG_VERSION != EXPECTED_CONFIG_VERSION) {
$err_msg = "config: your config file version is incorrect. See config.php-dist.\n";
@@ -22,6 +23,16 @@
$err_msg = "config: HTMLPurifier cache directory should be writable by anyone (chmod -R 777 $purifier_cache_dir)";
}
if (GENERATED_CONFIG_CHECK != EXPECTED_CONFIG_VERSION) {
$err_msg = "config: your sanity_config.php is outdated, please recreate it using ./utils/regen_config_checks.sh";
}
foreach ($requred_defines as $d) {
if (!defined($d)) {
$err_msg = "config: required constant $d is not defined. Please check config.php";
}
}
if (defined('RSS_BACKEND_TYPE')) {
print "<b>Fatal error</b>: RSS_BACKEND_TYPE is deprecated. Please remove this
option from config.php\n";