]>
Commit | Line | Data |
---|---|---|
8a2c0410 ER |
1 | --- ./misc/cli/eventum~ 2005-01-19 02:47:20.000000000 +0200 |
2 | +++ ./misc/cli/eventum 2005-01-19 03:02:40.119100405 +0200 | |
3 | @@ -11,7 +11,7 @@ | |
71c6fb06 ER |
4 | // |
5 | // @(#) $Id$ | |
6 | // | |
7 | -include_once("config.inc.php"); | |
8 | +include_once("/etc/eventum/cli.php"); | |
9 | include_once(APP_INC_PATH . "class.command_line.php"); | |
10 | include_once(APP_PEAR_PATH . "XML_RPC/RPC.php"); | |
11 | ||
643718e7 ER |
12 | --- eventum-1.4.orig/misc/cli/config.inc.php 2005-01-26 00:00:58.000000000 +0200 |
13 | +++ eventum-1.4/misc/cli/config.inc.php 2005-01-25 23:57:39.000000000 +0200 | |
14 | @@ -45,16 +45,10 @@ | |
71c6fb06 ER |
15 | } |
16 | ||
17 | // definitions of path related variables | |
18 | -@define("APP_PATH", dirname(__FILE__) . '/'); | |
8bbad949 | 19 | +@define("APP_PATH", '/usr/share/eventum/cli/'); |
71c6fb06 ER |
20 | @define("APP_INC_PATH", APP_PATH . "include/"); |
21 | @define("APP_PEAR_PATH", APP_INC_PATH . "pear/"); | |
643718e7 ER |
22 | -if (stristr(PHP_OS, 'darwin')) { |
23 | - ini_set("include_path", ".:" . APP_PEAR_PATH); | |
24 | -} elseif (stristr(PHP_OS, 'win')) { | |
25 | - ini_set("include_path", ".;" . APP_PEAR_PATH); | |
26 | -} else { | |
27 | - ini_set("include_path", ".:" . APP_PEAR_PATH); | |
28 | -} | |
29 | +ini_set("include_path", ".:" . APP_PEAR_PATH); | |
71c6fb06 ER |
30 | |
31 | @define("APP_BENCHMARK", false); | |
643718e7 | 32 | ?> |
8bbad949 ER |
33 | --- eventum-1.4/misc/cli/config.inc.php~ 2005-02-22 21:35:52.000000000 +0200 |
34 | +++ eventum-1.4/misc/cli/config.inc.php 2005-02-22 21:44:10.000000000 +0200 | |
35 | @@ -46,9 +46,9 @@ | |
36 | ||
37 | // definitions of path related variables | |
38 | @define("APP_PATH", '/usr/share/eventum/cli/'); | |
39 | -@define("APP_INC_PATH", APP_PATH . "include/"); | |
40 | +@define("APP_INC_PATH", APP_PATH); | |
41 | @define("APP_PEAR_PATH", APP_INC_PATH . "pear/"); | |
42 | ini_set("include_path", ".:" . APP_PEAR_PATH); | |
43 | ||
44 | @define("APP_BENCHMARK", false); | |
45 | -?> | |
46 | \ No newline at end of file | |
47 | +?> | |
48 | --- ./misc/cli/config.inc.php~ 2005-02-22 21:49:37.000000000 +0200 | |
49 | +++ ./misc/cli/config.inc.php 2005-02-22 21:50:01.000000000 +0200 | |
50 | @@ -47,7 +47,7 @@ | |
51 | // definitions of path related variables | |
52 | @define("APP_PATH", '/usr/share/eventum/cli/'); | |
53 | @define("APP_INC_PATH", APP_PATH); | |
54 | -@define("APP_PEAR_PATH", APP_INC_PATH . "pear/"); | |
55 | +@define("APP_PEAR_PATH", "/usr/share/pear/"); | |
56 | ini_set("include_path", ".:" . APP_PEAR_PATH); | |
57 | ||
58 | @define("APP_BENCHMARK", false); | |
59 | --- ./misc/cli/eventum~ 2005-01-24 17:49:25.000000000 +0200 | |
60 | +++ ./misc/cli/eventum 2005-01-25 15:48:56.000000000 +0200 | |
61 | @@ -13,7 +13,7 @@ | |
62 | // | |
63 | include_once("/etc/eventum/cli.php"); | |
64 | include_once(APP_INC_PATH . "class.command_line.php"); | |
65 | -include_once(APP_PEAR_PATH . "XML_RPC/RPC.php"); | |
66 | +include_once(APP_PEAR_PATH . "XML/RPC.php"); | |
67 | ||
68 | list($user_email, $user_password, $url, $port, $relative_url) = Command_Line::getEnvironmentSettings(); | |
69 | if (empty($port)) { | |
70 | --- ./misc/cli/include/class.command_line.php 2005-01-05 01:06:03.000000000 +0200 | |
71 | +++ ./misc/cli/include/class.command_line.php 2005-01-25 15:48:56.000000000 +0200 | |
72 | @@ -29,7 +29,7 @@ | |
73 | // | |
74 | ||
75 | include_once(APP_INC_PATH . "class.misc.php"); | |
76 | -include_once(APP_PEAR_PATH . "XML_RPC/RPC.php"); | |
77 | +include_once(APP_PEAR_PATH . "XML/RPC.php"); | |
78 | ||
79 | $_displayed_confirmation = false; | |
80 | ||
d39dadfc ER |
81 | --- ./include/class.template.php~ 2005-02-27 17:49:54.000000000 +0200 |
82 | +++ ./include/class.template.php 2005-02-27 17:51:00.000000000 +0200 | |
e1f8c51d | 83 | @@ -60,7 +60,7 @@ |
71c6fb06 ER |
84 | { |
85 | $this->smarty = new Smarty; | |
d39dadfc | 86 | $this->smarty->template_dir = APP_TPL_PATH . APP_CURRENT_LANG; |
71c6fb06 ER |
87 | - $this->smarty->compile_dir = APP_PATH . "templates_c"; |
88 | + $this->smarty->compile_dir = "/var/cache/eventum"; | |
89 | $this->smarty->config_dir = ''; | |
d39dadfc | 90 | $this->smarty->register_modifier("activateLinks", array('Link_Filter', 'activateLinks')); |
71c6fb06 | 91 | } |
643718e7 ER |
92 | --- eventum-1.4.orig/setup/index.php 2005-01-25 23:42:55.000000000 +0200 |
93 | +++ eventum-1.4/setup/index.php 2005-01-25 23:46:14.000000000 +0200 | |
898e761e | 94 | @@ -114,15 +114,15 @@ |
71c6fb06 ER |
95 | if (ini_get('allow_call_time_pass_reference') != "1") { |
96 | $errors[] = "The 'allow_call_time_pass_reference' directive needs to be enabled in your PHP.INI file in order for Eventum to work properly."; | |
97 | } | |
98 | - $error = checkPermissions('../locks', "Directory 'locks'", TRUE); | |
898e761e | 99 | + $error = checkPermissions('/var/run/eventum', "Directory '/var/run/eventum'", TRUE); |
71c6fb06 ER |
100 | if (!empty($error)) { |
101 | $errors[] = $error; | |
102 | } | |
103 | - $error = checkPermissions('../logs', "Directory 'logs'", TRUE); | |
647a326e | 104 | + $error = checkPermissions('/var/log/eventum', "Directory '/var/log/eventum'", TRUE); |
71c6fb06 ER |
105 | if (!empty($error)) { |
106 | $errors[] = $error; | |
107 | } | |
108 | - $error = checkPermissions('../templates_c', "Directory 'templates_c'", TRUE); | |
898e761e | 109 | + $error = checkPermissions('/var/cache/eventum', "Directory '/var/cache/eventum'", TRUE); |
71c6fb06 ER |
110 | if (!empty($error)) { |
111 | $errors[] = $error; | |
112 | } | |
647a326e | 113 | @@ -130,7 +130,7 @@ |
71c6fb06 ER |
114 | if (!empty($error)) { |
115 | $errors[] = $error; | |
116 | } | |
117 | - $error = checkPermissions('../logs/errors.log', "File 'logs/errors.log'"); | |
647a326e | 118 | + $error = checkPermissions('/var/log/eventum/errors.log', "File '/var/log/eventum/errors.log'"); |
71c6fb06 ER |
119 | if (!empty($error)) { |
120 | $errors[] = $error; | |
121 | } | |
643718e7 | 122 | @@ -203,7 +203,7 @@ |
71c6fb06 ER |
123 | |
124 | $tpl = new Smarty(); | |
125 | $tpl->template_dir = '../templates/en'; | |
126 | -$tpl->compile_dir = "../templates_c"; | |
647a326e | 127 | +$tpl->compile_dir = "/var/cache/eventum"; |
71c6fb06 ER |
128 | $tpl->config_dir = ''; |
129 | ||
130 | function replace_table_prefix($str) | |
898e761e | 131 | @@ -417,23 +417,8 @@ |
71c6fb06 ER |
132 | $tpl->assign('is_imap_enabled', function_exists('imap_open')); |
133 | } | |
134 | ||
135 | - | |
136 | -$full_url = dirname($HTTP_SERVER_VARS['PHP_SELF']); | |
137 | -$pieces = explode("/", $full_url); | |
138 | -$relative_url = array(); | |
139 | -$relative_url[] = ''; | |
140 | -foreach ($pieces as $piece) { | |
141 | - if ((!empty($piece)) && ($piece != 'setup')) { | |
142 | - $relative_url[] = $piece; | |
143 | - } | |
144 | -} | |
145 | -$relative_url[] = ''; | |
146 | -$relative_url = implode("/", $relative_url); | |
147 | - | |
148 | -if (substr($HTTP_SERVER_VARS['DOCUMENT_ROOT'], -1) == '/') { | |
149 | - $HTTP_SERVER_VARS['DOCUMENT_ROOT'] = substr($HTTP_SERVER_VARS['DOCUMENT_ROOT'], 0, -1); | |
150 | -} | |
151 | -$installation_path = $HTTP_SERVER_VARS['DOCUMENT_ROOT'] . $relative_url; | |
898e761e ER |
152 | +$installation_path = "/usr/share/eventum"; |
153 | +$relative_url = "/eventum/"; | |
71c6fb06 ER |
154 | |
155 | $tpl->assign("phpversion", phpversion()); | |
156 | $tpl->assign("rel_url", $relative_url); | |
b685c0af ER |
157 | --- eventum-1.4/setup/index.php~ 2005-01-25 23:52:31.000000000 +0200 |
158 | +++ eventum-1.4/setup/index.php 2005-01-25 23:52:33.000000000 +0200 | |
159 | @@ -199,7 +199,7 @@ | |
160 | } | |
161 | ||
162 | ini_set("include_path", '.'); | |
163 | -include_once("../include/Smarty/Smarty.class.php"); | |
164 | +include_once("/usr/share/pear/Smarty/Smarty.class.php"); | |
165 | ||
166 | $tpl = new Smarty(); | |
167 | $tpl->template_dir = '../templates/en'; | |
168 | --- eventum-1.4/setup/config.inc.php 2005-02-22 19:33:23.000000000 +0200 | |
169 | +++ eventum-1.4.z/setup/config.inc.php 2005-02-22 19:32:42.000000000 +0200 | |
170 | @@ -27,49 +27,6 @@ | |
171 | // | |
172 | // @(#) $Id$ | |
173 | // | |
174 | -ini_set('allow_url_fopen', 0); | |
175 | -ini_set("display_errors", 0); | |
176 | -error_reporting(0); | |
177 | -set_time_limit(0); | |
178 | -// prevent session from messing up the browser cache | |
179 | -ini_set('session.cache_limiter', 'nocache'); | |
180 | - | |
181 | -// only needed for older PHP versions | |
182 | -if (!function_exists('is_a')) { | |
183 | - function is_a($object, $class_name) | |
184 | - { | |
185 | - $class_name = strtolower($class_name); | |
186 | - if (get_class($object) == $class_name) { | |
187 | - return TRUE; | |
188 | - } else { | |
189 | - return is_subclass_of($object, $class_name); | |
190 | - } | |
191 | - } | |
192 | -} | |
193 | - | |
194 | -// definitions of path related variables | |
195 | -$app_path = '%{APP_PATH}%'; | |
196 | -if ((substr($app_path, -1) != '/') && (substr($app_path, -2) != '\\')) { | |
197 | - $app_path .= '/'; | |
198 | -} | |
199 | -@define("APP_PATH", $app_path); | |
200 | -@define("APP_INC_PATH", APP_PATH . "include/"); | |
201 | -@define("APP_PEAR_PATH", APP_INC_PATH . "pear/"); | |
202 | -@define("APP_TPL_PATH", APP_PATH . "templates/"); | |
203 | -@define("APP_SMARTY_PATH", APP_INC_PATH . "Smarty/"); | |
204 | -@define("APP_JPGRAPH_PATH", APP_INC_PATH . "jpgraph/"); | |
205 | -@define("APP_LOG_PATH", APP_PATH . "logs/"); | |
206 | -@define("APP_LOCKS_PATH", APP_PATH . "locks/"); | |
207 | -if (stristr(PHP_OS, 'darwin')) { | |
208 | - ini_set("include_path", ".:" . APP_PEAR_PATH); | |
209 | -} elseif (stristr(PHP_OS, 'win')) { | |
210 | - ini_set("include_path", ".;" . APP_PEAR_PATH); | |
211 | -} else { | |
212 | - ini_set("include_path", ".:" . APP_PEAR_PATH); | |
213 | -} | |
214 | - | |
215 | -@define("APP_SETUP_PATH", APP_PATH); | |
216 | -@define("APP_SETUP_FILE", APP_SETUP_PATH . "setup.conf.php"); | |
217 | ||
218 | // definitions of SQL variables | |
219 | @define("APP_SQL_DBTYPE", "mysql"); | |
220 | @@ -82,11 +39,6 @@ | |
221 | @define("APP_DEFAULT_DB", APP_SQL_DBNAME); | |
222 | @define("APP_TABLE_PREFIX", "%{APP_TABLE_PREFIX}%"); | |
223 | ||
224 | -@define("APP_ERROR_LOG", APP_LOG_PATH . "errors.log"); | |
225 | -@define("APP_CLI_LOG", APP_LOG_PATH . "cli.log"); | |
226 | -@define("APP_IRC_LOG", APP_LOG_PATH . "irc_bot.log"); | |
227 | -@define("APP_LOGIN_LOG", APP_LOG_PATH . "login_attempts.log"); | |
228 | - | |
229 | @define("APP_NAME", "Eventum"); | |
230 | @define("APP_SHORT_NAME", APP_NAME); // used in the subject of notification emails | |
231 | @define("APP_URL", "http://www.mysql.com/products/eventum/"); | |
232 | @@ -99,8 +51,6 @@ | |
233 | @define("APP_PROJECT_COOKIE", "eventum_project"); | |
234 | @define("APP_PROJECT_COOKIE_EXPIRE", time() + (60 * 60 * 24)); | |
235 | ||
236 | -@define("APP_VERSION", "%{APP_VERSION}%"); | |
237 | - | |
238 | @define("APP_LIST_COOKIE", 'eventum_list'); | |
239 | @define("APP_LIST_COOKIE_EXPIRE", time() + (60 * 60 * 24 * 30 * 48)); | |
240 | @define("APP_EMAIL_LIST_COOKIE", 'eventum_email_list'); | |
241 | @@ -118,39 +68,6 @@ | |
242 | @define("APP_CYCLE_COLORS", "#DDDDDD,#CACACA"); | |
243 | @define("APP_INTERNAL_COLOR", "#9C494B"); | |
244 | ||
245 | -// define the user_id of system user | |
246 | -@define("APP_SYSTEM_USER_ID", 1); | |
247 | - | |
248 | @define("APP_BENCHMARK", false); | |
249 | -if (APP_BENCHMARK) { | |
250 | - // always benchmark the scripts | |
251 | - include_once("Benchmark/Timer.php"); | |
252 | - $bench = new Benchmark_Timer; | |
253 | - $bench->start(); | |
254 | -} | |
255 | - | |
256 | -include_once(APP_INC_PATH . "class.misc.php"); | |
257 | - | |
258 | -if (isset($_GET)) { | |
259 | - $HTTP_POST_VARS = $_POST; | |
260 | - $HTTP_GET_VARS = $_GET; | |
261 | - $HTTP_SERVER_VARS = $_SERVER; | |
262 | - $HTTP_ENV_VARS = $_ENV; | |
263 | - $HTTP_POST_FILES = $_FILES; | |
264 | - // seems like PHP 4.1.0 didn't implement the $_SESSION auto-global... | |
265 | - if (isset($_SESSION)) { | |
266 | - $HTTP_SESSION_VARS = $_SESSION; | |
267 | - } | |
268 | - $HTTP_COOKIE_VARS = $_COOKIE; | |
269 | -} | |
270 | -// fix magic_quote_gpc'ed values (i wish i knew who is the person behind this) | |
271 | -$HTTP_GET_VARS =& Misc::dispelMagicQuotes($HTTP_GET_VARS); | |
272 | -$HTTP_POST_VARS =& Misc::dispelMagicQuotes($HTTP_POST_VARS); | |
273 | - | |
274 | -// handle the language preferences now | |
275 | -@include_once(APP_INC_PATH . "class.language.php"); | |
276 | -Language::setPreference(); | |
277 | - | |
278 | -// set charset | |
279 | -header("content-type: text/html;charset=" . APP_CHARSET); | |
280 | -?> | |
281 | \ No newline at end of file | |
282 | + | |
283 | +?> | |
6fa3b56f ER |
284 | --- ./include/class.monitor.php~ 2005-02-22 21:50:49.000000000 +0200 |
285 | +++ ./include/class.monitor.php 2005-02-22 23:04:50.000000000 +0200 | |
d6775ce9 ER |
286 | @@ -100,21 +100,29 @@ |
287 | function checkConfiguration() | |
288 | { | |
289 | $required_files = array( | |
290 | - APP_PATH . 'config.inc.php' => array( | |
291 | + '/etc/eventum/config.php' => array( | |
292 | 'check_owner' => true, | |
293 | - 'owner' => 'apache', | |
294 | + 'owner' => 'root', | |
295 | 'check_group' => true, | |
296 | - 'group' => 'apache', | |
35bb32c6 | 297 | + 'group' => 'eventum', |
d6775ce9 ER |
298 | 'check_permission' => true, |
299 | - 'permission' => 755, | |
300 | + 'permission' => 640, | |
301 | ), | |
302 | - APP_PATH . 'setup.conf.php' => array( | |
303 | + '/etc/eventum/core.php' => array( | |
304 | 'check_owner' => true, | |
305 | - 'owner' => 'apache', | |
306 | + 'owner' => 'root', | |
307 | 'check_group' => true, | |
308 | - 'group' => 'apache', | |
35bb32c6 | 309 | + 'group' => 'eventum', |
d6775ce9 ER |
310 | 'check_permission' => true, |
311 | - 'permission' => 750, | |
312 | + 'permission' => 640, | |
313 | + ), | |
314 | + '/etc/eventum/setup.php' => array( | |
315 | + 'check_owner' => true, | |
316 | + 'owner' => 'root', | |
317 | + 'check_group' => true, | |
35bb32c6 | 318 | + 'group' => 'eventum', |
d6775ce9 ER |
319 | + 'check_permission' => true, |
320 | + 'permission' => 660, | |
321 | 'check_filesize' => true, | |
322 | 'filesize' => 1024 | |
323 | ), | |
324 | @@ -157,6 +165,7 @@ | |
325 | 'permission' => 100, | |
326 | ), | |
327 | ); | |
328 | + $required_directories = array(); | |
329 | foreach ($required_directories as $dir_path => $options) { | |
330 | // check if directory exists | |
331 | if (!file_exists($dir_path)) { |