]> git.pld-linux.org Git - packages/eventum.git/blob - eventum-config.php
- added BR: gettext-devel (msgfmt)
[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     if (APP_CHARSET == 'UTF-8') {
80         define('APP_EMAIL_ENCODING', '8bit');
81     } else {
82         define('APP_EMAIL_ENCODING', '7bit');
83     }
84 }
85
86 if (APP_BENCHMARK) {
87     // always benchmark the scripts
88     require_once 'Benchmark/Timer.php';
89     $bench = new Benchmark_Timer;
90     $bench->start();
91 }
92
93 // handle the language preferences now
94 $avail_langs = array(
95     'en_US' =>  'English',
96 #    'ru' =>  'Russian',
97 #    'de' =>  'German',
98 #    'fr' =>  'French',
99     'it' =>  'Italian',
100 #    'fi' =>  'Finish',
101 #    'es' =>  'Spanish',
102 #    'nl' =>  'Dutch',
103     'sv' =>  'Swedish',
104 );
105
106 include_once(APP_INC_PATH . 'class.language.php');
107 include_once(APP_INC_PATH . 'db_access.php');
108 include_once(APP_INC_PATH . 'class.auth.php');
109 include_once(APP_INC_PATH . 'class.misc.php');
110 Language::setPreference();
111
112 if (isset($_GET)) {
113     $HTTP_POST_VARS = $_POST;
114     $HTTP_GET_VARS = $_GET;
115     $HTTP_SERVER_VARS = $_SERVER;
116     $HTTP_ENV_VARS = $_ENV;
117     $HTTP_POST_FILES = $_FILES;
118     // seems like PHP 4.1.0 didn't implement the $_SESSION auto-global...
119     if (isset($_SESSION)) {
120         $HTTP_SESSION_VARS = $_SESSION;
121     }
122     $HTTP_COOKIE_VARS = $_COOKIE;
123 }
124
125 // fix magic_quote_gpc'ed values (i wish i knew who is the person behind this)
126 $HTTP_GET_VARS = Misc::dispelMagicQuotes($HTTP_GET_VARS);
127 $HTTP_POST_VARS = Misc::dispelMagicQuotes($HTTP_POST_VARS);
128 $_REQUEST = Misc::dispelMagicQuotes($_REQUEST);
129
130 // set charset
131 header('Content-Type: text/html; charset=' . APP_CHARSET);
132
133 /* vim: set expandtab tabstop=4 shiftwidth=4: */
This page took 0.059872 seconds and 3 git commands to generate.