]>
Commit | Line | Data |
---|---|---|
20b87346 ER |
1 | <?php |
2 | /* | |
3 | * Eventum setup for PLD Linux. | |
4 | * | |
79cd9012 | 5 | * This configuration file sets up system paths for Eventum. |
d7011072 ER |
6 | * You should not change anything in this file. |
7 | * | |
8 | * All changes should go to %{SYSCONFDIR}%/config.php instead. | |
9 | * | |
10 | * But, if You do need to change something in this config, open bug on that in | |
11 | * http://bugs.pld-linux.org. | |
20b87346 ER |
12 | */ |
13 | ||
14 | ini_set('allow_url_fopen', 0); | |
d7011072 | 15 | ini_set('display_errors', 0); |
20b87346 | 16 | set_time_limit(0); |
21ee8543 ER |
17 | set_magic_quotes_runtime(0); |
18 | ||
20b87346 ER |
19 | // prevent session from messing up the browser cache |
20 | ini_set('session.cache_limiter', 'nocache'); | |
21 | ||
22 | // definitions of path related variables | |
d7011072 ER |
23 | define('APP_PATH', '%{APP_PATH}%/htdocs/'); |
24 | define('APP_INC_PATH', '%{APP_PATH}%/include/'); | |
25 | define('APP_PEAR_PATH', '%{PHP_PEAR_DIR}%/'); | |
26 | define('APP_TPL_PATH', '%{APP_PATH}%/templates/'); | |
27 | define('APP_SMARTY_PATH', '%{SMARTY_DIR}%/'); | |
28 | define('APP_JPGRAPH_PATH', APP_INC_PATH . "jpgraph/"); | |
29 | define('APP_LOG_PATH', '/var/log/eventum/'); | |
30 | define('APP_LOCKS_PATH', '/var/run/eventum/'); | |
31 | ini_set('include_path', '.:' . APP_PEAR_PATH); | |
32 | ||
33 | define('APP_SETUP_PATH', APP_PATH); | |
34 | define('APP_SETUP_FILE', '%{SYSCONFDIR}%/setup.php'); | |
35 | ||
36 | define('APP_ERROR_LOG', APP_LOG_PATH . 'errors.log'); | |
37 | define('APP_CLI_LOG', APP_LOG_PATH . 'cli.log'); | |
38 | define('APP_IRC_LOG', APP_LOG_PATH . 'irc_bot.log'); | |
39 | define('APP_LOGIN_LOG', APP_LOG_PATH . 'login_attempts.log'); | |
40 | ||
41 | define('APP_VERSION', '%{APP_VERSION}%'); | |
20b87346 | 42 | |
20b87346 | 43 | # include site config |
d7011072 | 44 | include_once '%{SYSCONFDIR}%/config.php'; |
20b87346 | 45 | |
881228a7 ER |
46 | // define the user_id of system user |
47 | if (!defined('APP_SYSTEM_USER_ID')) { | |
d7011072 | 48 | define('APP_SYSTEM_USER_ID', 1); |
881228a7 ER |
49 | } |
50 | ||
21ee8543 ER |
51 | // if full text searching is enabled |
52 | if (!defined('APP_ENABLE_FULLTEXT')) { | |
d7011072 | 53 | define('APP_ENABLE_FULLTEXT', false); |
21ee8543 ER |
54 | } |
55 | ||
881228a7 | 56 | if (!defined('APP_BENCHMARK')) { |
d7011072 | 57 | define('APP_BENCHMARK', false); |
881228a7 ER |
58 | } |
59 | ||
528a9745 ER |
60 | if (!defined('APP_DEFAULT_ASSIGNED_EMAILS')) { |
61 | define('APP_DEFAULT_ASSIGNED_EMAILS', 1); | |
62 | } | |
63 | if (!defined('APP_DEFAULT_NEW_EMAILS')) { | |
64 | define('APP_DEFAULT_NEW_EMAILS', 0); | |
65 | } | |
7f94783f ER |
66 | if (!defined('APP_COOKIE_URL')) { |
67 | define('APP_COOKIE_URL', APP_RELATIVE_URL); | |
68 | } | |
69 | if (!defined('APP_COOKIE_DOMAIN')) { | |
70 | define('APP_COOKIE_DOMAIN', APP_HOSTNAME); | |
71 | } | |
39878ef2 | 72 | if (!defined('APP_HASH_TYPE')) { |
e8a10d61 ER |
73 | define('APP_HASH_TYPE', 'MD5'); |
74 | } | |
3ca47daa ER |
75 | if (!defined('APP_DEFAULT_LOCALE')) { |
76 | define('APP_DEFAULT_LOCALE', 'en_US'); | |
77 | } | |
4a2a33e4 ER |
78 | if (!defined('APP_EMAIL_ENCODING')) { |
79 | define('APP_EMAIL_ENCODING', APP_CHARSET); | |
80 | } | |
7f94783f | 81 | |
20b87346 ER |
82 | if (APP_BENCHMARK) { |
83 | // always benchmark the scripts | |
d7011072 | 84 | require_once 'Benchmark/Timer.php'; |
20b87346 ER |
85 | $bench = new Benchmark_Timer; |
86 | $bench->start(); | |
87 | } | |
88 | ||
d7011072 | 89 | include_once APP_INC_PATH . 'class.misc.php'; |
20b87346 ER |
90 | |
91 | if (isset($_GET)) { | |
92 | $HTTP_POST_VARS = $_POST; | |
93 | $HTTP_GET_VARS = $_GET; | |
94 | $HTTP_SERVER_VARS = $_SERVER; | |
95 | $HTTP_ENV_VARS = $_ENV; | |
96 | $HTTP_POST_FILES = $_FILES; | |
97 | // seems like PHP 4.1.0 didn't implement the $_SESSION auto-global... | |
98 | if (isset($_SESSION)) { | |
99 | $HTTP_SESSION_VARS = $_SESSION; | |
100 | } | |
101 | $HTTP_COOKIE_VARS = $_COOKIE; | |
102 | } | |
103 | ||
104 | // fix magic_quote_gpc'ed values (i wish i knew who is the person behind this) | |
8cd720fe ER |
105 | $HTTP_GET_VARS = Misc::dispelMagicQuotes($HTTP_GET_VARS); |
106 | $HTTP_POST_VARS = Misc::dispelMagicQuotes($HTTP_POST_VARS); | |
107 | $_REQUEST = Misc::dispelMagicQuotes($_REQUEST); | |
20b87346 ER |
108 | |
109 | // handle the language preferences now | |
d7011072 | 110 | include_once(APP_INC_PATH . 'class.language.php'); |
20b87346 ER |
111 | Language::setPreference(); |
112 | ||
113 | // set charset | |
d7011072 | 114 | header('Content-Type: text/html; charset=' . APP_CHARSET); |
20b87346 ER |
115 | |
116 | /* vim: set expandtab tabstop=4 shiftwidth=4: */ | |
117 | ?> |