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_SPHINXAPI_PATH')) {
52 - define('APP_SPHINXAPI_PATH', APP_PATH . '/lib/sphinxapi');
55 if (!defined('APP_SMARTY_PATH')) {
56 - define('APP_SMARTY_PATH', APP_PATH . '/lib/Smarty');
57 + define('APP_SMARTY_PATH', '/usr/share/php/Smarty');
60 if (!defined('APP_JPGRAPH_PATH')) {
64 if (!defined('APP_LOCKS_PATH')) {
65 - define('APP_LOCKS_PATH', APP_PATH . '/locks');
66 + define('APP_LOCKS_PATH', '/var/run/eventum/');
69 if (!defined('APP_SQL_PATCHES_PATH')) {
73 if (!defined('APP_LOG_PATH')) {
74 - define('APP_LOG_PATH', APP_PATH . '/logs');
75 + define('APP_LOG_PATH', '/var/log/eventum');
78 if (!defined('APP_ROUTED_MAILS_SAVEDIR')) {
79 --- eventum-2.3.1/htdocs/setup/index.php~ 2011-09-15 12:34:21.000000000 +0300
80 +++ eventum-2.3.1/htdocs/setup/index.php 2011-09-15 12:36:34.061947696 +0300
82 define('APP_PATH', realpath(dirname(__FILE__) . '/../..'));
83 define('APP_INC_PATH', APP_PATH . '/lib/eventum');
84 define('APP_PEAR_PATH', APP_PATH . '/lib/pear');
85 -define('APP_SMARTY_PATH', APP_PATH . '/lib/Smarty');
86 -define('APP_CONFIG_PATH', APP_PATH . '/config');
87 +define('APP_SMARTY_PATH', '/usr/share/php/Smarty');
88 +define('APP_CONFIG_PATH', '/etc/webapps/eventum');
89 define('APP_SETUP_FILE', APP_CONFIG_PATH . '/setup.php');
90 define('APP_TPL_PATH', APP_PATH . '/templates');
91 -define('APP_TPL_COMPILE_PATH', APP_PATH . '/templates_c');
92 -define('APP_LOG_PATH', APP_PATH . '/logs');
93 +define('APP_TPL_COMPILE_PATH', '/var/cache/eventum');
94 +define('APP_LOG_PATH', '/var/log/eventum');
95 define('APP_ERROR_LOG', APP_LOG_PATH . '/errors.log');
96 -define('APP_LOCKS_PATH', APP_PATH . '/locks');
97 +define('APP_LOCKS_PATH', '/var/run/eventum');
99 header('Content-Type: text/html; charset=' . APP_CHARSET);
102 $errors[] = "The 'file_uploads' directive needs to be enabled in your PHP.INI file in order for Eventum to work properly.";
105 - $error = checkPermissions(APP_CONFIG_PATH, "Directory '" . APP_CONFIG_PATH . "'", true);
106 - if (!empty($error)) {
107 - $errors[] = $error;
109 $error = checkPermissions(APP_SETUP_FILE, "File '" . APP_SETUP_FILE. "'");
110 if (!empty($error)) {
113 $setup_file_path = APP_SETUP_FILE;
116 - // check if config directory is writable
117 - if (!is_writable(APP_CONFIG_PATH)) {
118 - return "The file '" . APP_CONFIG_PATH . "' directory needs to be writable by the web server user. Please correct this problem and try again.";
120 // need to create a random private key variable
121 $private_key = '<?php
122 $private_key = "' . md5(microtime()) . '";
123 --- eventum-2.2/irc/eventum-irc-bot~ 2009-07-23 14:03:41.422211655 +0300
124 +++ eventum-2.2/irc/eventum-irc-bot 2009-07-23 13:54:22.000000000 +0300
127 ini_set('memory_limit', '1024M');
129 -require_once dirname(__FILE__) . '/../init.php';
130 +require_once '/usr/share/eventum/init.php';
132 if (!file_exists(APP_CONFIG_PATH . '/irc_config.php')) {
133 fwrite(STDERR, "ERROR: No config specified. Please see setup/irc_config.php for config information.\n\n");
134 --- eventum/crons/monitor.php 2010-11-24 17:24:23.000000000 +0200
135 +++ eventum/crons/monitor.php 2010-11-24 18:23:09.664934996 +0200
137 $required_files = array(
138 APP_CONFIG_PATH . '/config.php' => array(
139 'check_owner' => true,
140 - 'owner' => 'apache',
142 'check_group' => true,
143 - 'group' => 'apache',
145 'check_permission' => true,
148 APP_CONFIG_PATH . '/setup.php' => array(
149 'check_owner' => true,
150 - 'owner' => 'apache',
152 'check_group' => true,
153 - 'group' => 'apache',
155 'check_permission' => true,
157 'check_filesize' => true,
158 --- eventum-2.3.1/config/sphinx.conf.php~ 2011-09-15 09:35:00.000000000 +0300
159 +++ eventum-2.3.1/config/sphinx.conf.php 2011-09-15 10:05:10.051918895 +0300
162 -require_once dirname(__FILE__) . "/../init.php";
163 +require_once '/usr/share/eventum/init.php';
165 if (!defined('SPHINX_LOG_PATH')) {
166 define('SPHINX_LOG_PATH', '/var/log/sphinx/');