1 --- ./cli/eventum 2009-06-27 19:46:44.401524716 +0300
2 +++ ./cli/eventum 2009-06-27 19:45:22.781438493 +0300
6 // definitions of path related variables
7 -define('APP_PATH', dirname(__FILE__) . '/');
8 -define('APP_INC_PATH', APP_PATH . '/lib/eventum');
9 -define('APP_PEAR_PATH', APP_PATH . '/lib/pear');
10 +define('APP_PATH', '/usr/share/eventum');
11 +define('APP_INC_PATH', APP_PATH . '/cli');
13 if (defined('APP_PEAR_PATH')) {
14 set_include_path(APP_PEAR_PATH . PATH_SEPARATOR . get_include_path());
15 --- eventum-2.2/init.php~ 2009-10-12 22:40:04.000000000 +0300
16 +++ eventum-2.2/init.php 2009-10-12 22:40:41.619219457 +0300
18 // | Authors: Elan Ruusamäe <glen@delfi.ee> |
19 // +----------------------------------------------------------------------+
21 -if (!file_exists(dirname(__FILE__) . '/config/config.php') || !filesize(dirname(__FILE__) . '/config/config.php')) {
22 +if (!file_exists('/etc/webapps/eventum/config.php') || !filesize('/etc/webapps/eventum/config.php')) {
23 Header('Location: setup/');
29 define('APP_PATH', realpath(dirname(__FILE__)));
30 -define('APP_CONFIG_PATH', APP_PATH . '/config');
31 +define('APP_CONFIG_PATH', '/etc/webapps/eventum');
33 // include local site config. may override any default
34 require_once APP_CONFIG_PATH . '/config.php';
38 if (!defined('APP_TPL_COMPILE_PATH')) {
39 - define('APP_TPL_COMPILE_PATH', APP_PATH . '/templates_c');
40 + define('APP_TPL_COMPILE_PATH', '/var/cache/eventum');
43 if (!defined('APP_INC_PATH')) {
44 define('APP_INC_PATH', APP_PATH . '/lib/eventum');
47 -if (!defined('APP_PEAR_PATH')) {
48 - define('APP_PEAR_PATH', APP_PATH . '/lib/pear');
51 if (!defined('APP_SMARTY_PATH')) {
52 - define('APP_SMARTY_PATH', APP_PATH . '/lib/Smarty');
53 + define('APP_SMARTY_PATH', '/usr/share/php/Smarty');
56 if (!defined('APP_JPGRAPH_PATH')) {
60 if (!defined('APP_LOCKS_PATH')) {
61 - define('APP_LOCKS_PATH', APP_PATH . '/locks');
62 + define('APP_LOCKS_PATH', '/var/run/eventum/');
65 if (!defined('APP_SQL_PATCHES_PATH')) {
69 if (!defined('APP_LOG_PATH')) {
70 - define('APP_LOG_PATH', APP_PATH . '/logs');
71 + define('APP_LOG_PATH', '/var/log/eventum');
74 if (!defined('APP_ROUTED_MAILS_SAVEDIR')) {
75 --- eventum-2.2/htdocs/setup/index.php~ 2010-07-28 12:09:26.000000000 +0300
76 +++ eventum-2.2/htdocs/setup/index.php 2010-07-28 12:09:48.715993083 +0300
78 define('APP_PATH', realpath(dirname(__FILE__) . '/../..'));
79 define('APP_INC_PATH', APP_PATH . '/lib/eventum');
80 define('APP_PEAR_PATH', APP_PATH . '/lib/pear');
81 -define('APP_SMARTY_PATH', APP_PATH . '/lib/Smarty');
82 -define('APP_CONFIG_PATH', APP_PATH . '/config');
83 +define('APP_SMARTY_PATH', '/usr/share/php/Smarty');
84 +define('APP_CONFIG_PATH', '/etc/webapps/eventum');
85 define('APP_SETUP_FILE', APP_CONFIG_PATH . '/setup.php');
86 define('APP_TPL_PATH', APP_PATH . '/templates');
87 -define('APP_TPL_COMPILE_PATH', APP_PATH . '/templates_c');
88 -define('APP_LOG_PATH', APP_PATH . '/logs');
89 +define('APP_TPL_COMPILE_PATH', '/var/cache/eventum');
90 +define('APP_LOG_PATH', '/var/log/eventum');
91 define('APP_ERROR_LOG', APP_LOG_PATH . '/errors.log');
92 -define('APP_LOCKS_PATH', APP_PATH . '/locks');
93 +define('APP_LOCKS_PATH', '/var/run/eventum');
95 header('Content-Type: text/html; charset=' . APP_CHARSET);
98 "You need to install this extension for optimal operation. If you do not install this extension some unicode data will be corrupted.";
101 - $error = checkPermissions(APP_CONFIG_PATH, "Directory '" . APP_CONFIG_PATH . "'", TRUE);
102 - if (!empty($error)) {
103 - $errors[] = $error;
105 $error = checkPermissions(APP_SETUP_FILE, "File '" . APP_SETUP_FILE. "'");
106 if (!empty($error)) {
109 $setup_file_path = APP_SETUP_FILE;
112 - // check if config directory is writable
113 - if (!is_writable(APP_CONFIG_PATH)) {
114 - return "The file '" . APP_CONFIG_PATH . "' directory needs to be writable by the web server user. Please correct this problem and try again.";
116 // need to create a random private key variable
117 $private_key = '<?php
118 $private_key = "' . md5(microtime()) . '";
119 --- eventum-2.2/irc/eventum-irc-bot~ 2009-07-23 14:03:41.422211655 +0300
120 +++ eventum-2.2/irc/eventum-irc-bot 2009-07-23 13:54:22.000000000 +0300
123 ini_set('memory_limit', '1024M');
125 -require_once dirname(__FILE__) . '/../init.php';
126 +require_once '/usr/share/eventum/init.php';
128 if (!file_exists(APP_CONFIG_PATH . '/irc_config.php')) {
129 fwrite(STDERR, "ERROR: No config specified. Please see setup/irc_config.php for config information.\n\n");
130 --- eventum/crons/monitor.php 2010-11-24 17:24:23.000000000 +0200
131 +++ eventum/crons/monitor.php 2010-11-24 18:23:09.664934996 +0200
133 $required_files = array(
134 APP_CONFIG_PATH . '/config.php' => array(
135 'check_owner' => true,
136 - 'owner' => 'apache',
138 'check_group' => true,
139 - 'group' => 'apache',
141 'check_permission' => true,
144 APP_CONFIG_PATH . '/setup.php' => array(
145 'check_owner' => true,
146 - 'owner' => 'apache',
148 'check_group' => true,
149 - 'group' => 'apache',
151 'check_permission' => true,
153 'check_filesize' => true,