]> git.pld-linux.org Git - packages/eventum.git/blob - eventum-config.php
- memory limit patches merged
[packages/eventum.git] / eventum-config.php
1 <?php
2 /*
3  * Eventum setup for PLD Linux.
4  *
5  * This configuration file sets up system paths for Eventum.
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.
12  */
13
14 ini_set('allow_url_fopen', 0);
15 ini_set('display_errors', 0);
16 set_time_limit(0);
17 set_magic_quotes_runtime(0);
18
19 // prevent session from messing up the browser cache
20 ini_set('session.cache_limiter', 'nocache');
21
22 // definitions of path related variables
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}%');
42
43 # include site config
44 include_once '%{SYSCONFDIR}%/config.php';
45
46 // define the user_id of system user
47 if (!defined('APP_SYSTEM_USER_ID')) {
48     define('APP_SYSTEM_USER_ID', 1);
49 }
50
51 // if full text searching is enabled
52 if (!defined('APP_ENABLE_FULLTEXT')) {
53     define('APP_ENABLE_FULLTEXT', false);
54 }
55
56 if (!defined('APP_BENCHMARK')) {
57     define('APP_BENCHMARK', false);
58 }
59
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 }
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 }
72 if (!defined('APP_HASH_TYPE')) {
73     define('APP_HASH_TYPE', 'MD5');
74 }
75 if (!defined('APP_DEFAULT_LOCALE')) {
76     define('APP_DEFAULT_LOCALE', 'en_US');
77 }
78 if (!defined('APP_EMAIL_ENCODING')) {
79     define('APP_EMAIL_ENCODING', APP_CHARSET);
80 }
81
82 if (APP_BENCHMARK) {
83     // always benchmark the scripts
84     require_once 'Benchmark/Timer.php';
85     $bench = new Benchmark_Timer;
86     $bench->start();
87 }
88
89 include_once APP_INC_PATH . 'class.misc.php';
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)
105 $HTTP_GET_VARS = Misc::dispelMagicQuotes($HTTP_GET_VARS);
106 $HTTP_POST_VARS = Misc::dispelMagicQuotes($HTTP_POST_VARS);
107 $_REQUEST = Misc::dispelMagicQuotes($_REQUEST);
108
109 // handle the language preferences now
110 include_once(APP_INC_PATH . 'class.language.php');
111 Language::setPreference();
112
113 // set charset
114 header('Content-Type: text/html; charset=' . APP_CHARSET);
115
116 /* vim: set expandtab tabstop=4 shiftwidth=4: */
117 ?>
This page took 0.033079 seconds and 3 git commands to generate.