1 --- ./misc/cli/eventum~ 2005-01-19 02:47:20.000000000 +0200
2 +++ ./misc/cli/eventum 2005-01-19 03:02:40.119100405 +0200
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");
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
17 // definitions of path related variables
18 -@define("APP_PATH", dirname(__FILE__) . '/');
19 +@define("APP_PATH", '/usr/share/eventum/cli/');
20 @define("APP_INC_PATH", APP_PATH . "include/");
21 @define("APP_PEAR_PATH", APP_INC_PATH . "pear/");
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);
27 - ini_set("include_path", ".:" . APP_PEAR_PATH);
29 +ini_set("include_path", ".:" . APP_PEAR_PATH);
31 @define("APP_BENCHMARK", false);
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
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);
44 @define("APP_BENCHMARK", false);
46 \ No newline at end of file
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
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);
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
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");
68 list($user_email, $user_password, $url, $port, $relative_url) = Command_Line::getEnvironmentSettings();
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
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");
79 $_displayed_confirmation = false;
81 --- eventum-1.4.c/include/class.template.php 2005-01-05 01:05:59.000000000 +0200
82 +++ eventum-1.4/include/class.template.php 2005-01-24 17:22:35.000000000 +0200
85 $this->smarty = new Smarty;
86 $this->smarty->template_dir = APP_PATH . "templates/" . APP_CURRENT_LANG;
87 - $this->smarty->compile_dir = APP_PATH . "templates_c";
88 + $this->smarty->compile_dir = "/var/cache/eventum";
89 $this->smarty->config_dir = '';
90 $this->smarty->register_modifier("activateLinks", array('Link_Filter', 'processText'));
92 --- ./include/class.template.php~ 2005-02-22 21:01:00.000000000 +0200
93 +++ ./include/class.template.php 2005-02-22 21:11:56.000000000 +0200
95 function Template_API()
97 $this->smarty = new Smarty;
98 - $this->smarty->template_dir = APP_PATH . "templates/" . APP_CURRENT_LANG;
99 + $this->smarty->template_dir = APP_TPL_PATH . APP_CURRENT_LANG;
100 $this->smarty->compile_dir = "/var/cache/eventum";
101 $this->smarty->config_dir = '';
102 $this->smarty->register_modifier("activateLinks", array('Link_Filter', 'processText'));
103 --- eventum-1.4.orig/setup/index.php 2005-01-25 23:42:55.000000000 +0200
104 +++ eventum-1.4/setup/index.php 2005-01-25 23:46:14.000000000 +0200
105 @@ -114,15 +114,15 @@
106 if (ini_get('allow_call_time_pass_reference') != "1") {
107 $errors[] = "The 'allow_call_time_pass_reference' directive needs to be enabled in your PHP.INI file in order for Eventum to work properly.";
109 - $error = checkPermissions('../locks', "Directory 'locks'", TRUE);
110 + $error = checkPermissions('/var/run/eventum', "Directory '/var/run/eventum'", TRUE);
111 if (!empty($error)) {
114 - $error = checkPermissions('../logs', "Directory 'logs'", TRUE);
115 + $error = checkPermissions('/var/log/eventum', "Directory '/var/log/eventum'", TRUE);
116 if (!empty($error)) {
119 - $error = checkPermissions('../templates_c', "Directory 'templates_c'", TRUE);
120 + $error = checkPermissions('/var/cache/eventum', "Directory '/var/cache/eventum'", TRUE);
121 if (!empty($error)) {
125 if (!empty($error)) {
128 - $error = checkPermissions('../logs/errors.log', "File 'logs/errors.log'");
129 + $error = checkPermissions('/var/log/eventum/errors.log', "File '/var/log/eventum/errors.log'");
130 if (!empty($error)) {
136 $tpl->template_dir = '../templates/en';
137 -$tpl->compile_dir = "../templates_c";
138 +$tpl->compile_dir = "/var/cache/eventum";
139 $tpl->config_dir = '';
141 function replace_table_prefix($str)
143 $tpl->assign('is_imap_enabled', function_exists('imap_open'));
147 -$full_url = dirname($HTTP_SERVER_VARS['PHP_SELF']);
148 -$pieces = explode("/", $full_url);
149 -$relative_url = array();
150 -$relative_url[] = '';
151 -foreach ($pieces as $piece) {
152 - if ((!empty($piece)) && ($piece != 'setup')) {
153 - $relative_url[] = $piece;
156 -$relative_url[] = '';
157 -$relative_url = implode("/", $relative_url);
159 -if (substr($HTTP_SERVER_VARS['DOCUMENT_ROOT'], -1) == '/') {
160 - $HTTP_SERVER_VARS['DOCUMENT_ROOT'] = substr($HTTP_SERVER_VARS['DOCUMENT_ROOT'], 0, -1);
162 -$installation_path = $HTTP_SERVER_VARS['DOCUMENT_ROOT'] . $relative_url;
163 +$installation_path = "/usr/share/eventum";
164 +$relative_url = "/eventum/";
166 $tpl->assign("phpversion", phpversion());
167 $tpl->assign("rel_url", $relative_url);
168 --- eventum-1.4/setup/index.php~ 2005-01-25 23:52:31.000000000 +0200
169 +++ eventum-1.4/setup/index.php 2005-01-25 23:52:33.000000000 +0200
173 ini_set("include_path", '.');
174 -include_once("../include/Smarty/Smarty.class.php");
175 +include_once("/usr/share/pear/Smarty/Smarty.class.php");
178 $tpl->template_dir = '../templates/en';
179 --- eventum-1.4/setup/config.inc.php 2005-02-22 19:33:23.000000000 +0200
180 +++ eventum-1.4.z/setup/config.inc.php 2005-02-22 19:32:42.000000000 +0200
185 -ini_set('allow_url_fopen', 0);
186 -ini_set("display_errors", 0);
189 -// prevent session from messing up the browser cache
190 -ini_set('session.cache_limiter', 'nocache');
192 -// only needed for older PHP versions
193 -if (!function_exists('is_a')) {
194 - function is_a($object, $class_name)
196 - $class_name = strtolower($class_name);
197 - if (get_class($object) == $class_name) {
200 - return is_subclass_of($object, $class_name);
205 -// definitions of path related variables
206 -$app_path = '%{APP_PATH}%';
207 -if ((substr($app_path, -1) != '/') && (substr($app_path, -2) != '\\')) {
210 -@define("APP_PATH", $app_path);
211 -@define("APP_INC_PATH", APP_PATH . "include/");
212 -@define("APP_PEAR_PATH", APP_INC_PATH . "pear/");
213 -@define("APP_TPL_PATH", APP_PATH . "templates/");
214 -@define("APP_SMARTY_PATH", APP_INC_PATH . "Smarty/");
215 -@define("APP_JPGRAPH_PATH", APP_INC_PATH . "jpgraph/");
216 -@define("APP_LOG_PATH", APP_PATH . "logs/");
217 -@define("APP_LOCKS_PATH", APP_PATH . "locks/");
218 -if (stristr(PHP_OS, 'darwin')) {
219 - ini_set("include_path", ".:" . APP_PEAR_PATH);
220 -} elseif (stristr(PHP_OS, 'win')) {
221 - ini_set("include_path", ".;" . APP_PEAR_PATH);
223 - ini_set("include_path", ".:" . APP_PEAR_PATH);
226 -@define("APP_SETUP_PATH", APP_PATH);
227 -@define("APP_SETUP_FILE", APP_SETUP_PATH . "setup.conf.php");
229 // definitions of SQL variables
230 @define("APP_SQL_DBTYPE", "mysql");
232 @define("APP_DEFAULT_DB", APP_SQL_DBNAME);
233 @define("APP_TABLE_PREFIX", "%{APP_TABLE_PREFIX}%");
235 -@define("APP_ERROR_LOG", APP_LOG_PATH . "errors.log");
236 -@define("APP_CLI_LOG", APP_LOG_PATH . "cli.log");
237 -@define("APP_IRC_LOG", APP_LOG_PATH . "irc_bot.log");
238 -@define("APP_LOGIN_LOG", APP_LOG_PATH . "login_attempts.log");
240 @define("APP_NAME", "Eventum");
241 @define("APP_SHORT_NAME", APP_NAME); // used in the subject of notification emails
242 @define("APP_URL", "http://www.mysql.com/products/eventum/");
244 @define("APP_PROJECT_COOKIE", "eventum_project");
245 @define("APP_PROJECT_COOKIE_EXPIRE", time() + (60 * 60 * 24));
247 -@define("APP_VERSION", "%{APP_VERSION}%");
249 @define("APP_LIST_COOKIE", 'eventum_list');
250 @define("APP_LIST_COOKIE_EXPIRE", time() + (60 * 60 * 24 * 30 * 48));
251 @define("APP_EMAIL_LIST_COOKIE", 'eventum_email_list');
253 @define("APP_CYCLE_COLORS", "#DDDDDD,#CACACA");
254 @define("APP_INTERNAL_COLOR", "#9C494B");
256 -// define the user_id of system user
257 -@define("APP_SYSTEM_USER_ID", 1);
259 @define("APP_BENCHMARK", false);
260 -if (APP_BENCHMARK) {
261 - // always benchmark the scripts
262 - include_once("Benchmark/Timer.php");
263 - $bench = new Benchmark_Timer;
267 -include_once(APP_INC_PATH . "class.misc.php");
270 - $HTTP_POST_VARS = $_POST;
271 - $HTTP_GET_VARS = $_GET;
272 - $HTTP_SERVER_VARS = $_SERVER;
273 - $HTTP_ENV_VARS = $_ENV;
274 - $HTTP_POST_FILES = $_FILES;
275 - // seems like PHP 4.1.0 didn't implement the $_SESSION auto-global...
276 - if (isset($_SESSION)) {
277 - $HTTP_SESSION_VARS = $_SESSION;
279 - $HTTP_COOKIE_VARS = $_COOKIE;
281 -// fix magic_quote_gpc'ed values (i wish i knew who is the person behind this)
282 -$HTTP_GET_VARS =& Misc::dispelMagicQuotes($HTTP_GET_VARS);
283 -$HTTP_POST_VARS =& Misc::dispelMagicQuotes($HTTP_POST_VARS);
285 -// handle the language preferences now
286 -@include_once(APP_INC_PATH . "class.language.php");
287 -Language::setPreference();
290 -header("content-type: text/html;charset=" . APP_CHARSET);
292 \ No newline at end of file
295 --- class.monitor.php 2005-02-22 21:50:49.000000000 +0200
296 +++ ./misc/class.monitor.php 2005-02-22 23:04:50.000000000 +0200
297 @@ -100,21 +100,29 @@
298 function checkConfiguration()
300 $required_files = array(
301 - APP_PATH . 'config.inc.php' => array(
302 + '/etc/eventum/config.php' => array(
303 'check_owner' => true,
304 - 'owner' => 'apache',
306 'check_group' => true,
307 - 'group' => 'apache',
309 'check_permission' => true,
310 - 'permission' => 755,
311 + 'permission' => 640,
313 - APP_PATH . 'setup.conf.php' => array(
314 + '/etc/eventum/core.php' => array(
315 'check_owner' => true,
316 - 'owner' => 'apache',
318 'check_group' => true,
319 - 'group' => 'apache',
321 'check_permission' => true,
322 - 'permission' => 750,
323 + 'permission' => 640,
325 + '/etc/eventum/setup.php' => array(
326 + 'check_owner' => true,
328 + 'check_group' => true,
330 + 'check_permission' => true,
331 + 'permission' => 660,
332 'check_filesize' => true,
339 + $required_directories = array();
340 foreach ($required_directories as $dir_path => $options) {
341 // check if directory exists
342 if (!file_exists($dir_path)) {