]> git.wh0rd.org - tt-rss.git/blame - sanity_check.php
bump config version
[tt-rss.git] / sanity_check.php
CommitLineData
66581886 1<?
fef8a1e4 2 define('EXPECTED_CONFIG_VERSION', 2);
adf702d6 3
66581886
AD
4 if (!file_exists("config.php")) {
5 print "<b>Fatal Error</b>: You forgot to copy
6 <b>config.php-dist</b> to <b>config.php</b> and edit it.";
7 exit;
8 }
9
9d87df8f
AD
10 require_once "config.php";
11
adf702d6
AD
12 if (CONFIG_VERSION != EXPECTED_CONFIG_VERSION) {
13 print "<b>Fatal Error</b>: Your configuration file has
14 wrong version. Please copy new options from <b>config.php-dist</b> and
15 update CONFIG_VERSION directive.";
16 exit;
17 }
18
66581886
AD
19 if (!file_exists("magpierss/rss_fetch.inc")) {
20 print "<b>Fatal Error</b>: You forgot to place
21 <a href=\"http://magpierss.sourceforge.net\">MagpieRSS</a>
22 distribution in <b>magpierss/</b>
23 subdirectory of TT-RSS tree.";
24 exit;
25 }
3f286c4c 26
adf702d6
AD
27 if (CONFIG_VERSION != EXPECTED_CONFIG_VERSION) {
28 return "config: your config file version is incorrect. See config.php-dist.";
29 }
30
3f286c4c
AD
31 if (file_exists("xml-export.php") || file_exists("xml-import.php")) {
32 print "<b>Fatal Error</b>: XML Import/Export tools (<b>xml-export.php</b>
33 and <b>xml-import.php</b>) could be used maliciously. Please remove them
34 from your TT-RSS instance.";
35 exit;
36 }
66581886 37?>