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/misc/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.c/include/class.template.php 2005-01-05 01:05:59.000000000 +0200
34 +++ eventum-1.4/include/class.template.php 2005-01-24 17:22:35.000000000 +0200
37 $this->smarty = new Smarty;
38 $this->smarty->template_dir = APP_PATH . "templates/" . APP_CURRENT_LANG;
39 - $this->smarty->compile_dir = APP_PATH . "templates_c";
40 + $this->smarty->compile_dir = "/var/cache/eventum";
41 $this->smarty->config_dir = '';
42 $this->smarty->register_modifier("activateLinks", array('Link_Filter', 'processText'));
44 --- eventum-1.4.orig/setup/index.php 2005-01-25 23:42:55.000000000 +0200
45 +++ eventum-1.4/setup/index.php 2005-01-25 23:46:14.000000000 +0200
47 if (ini_get('allow_call_time_pass_reference') != "1") {
48 $errors[] = "The 'allow_call_time_pass_reference' directive needs to be enabled in your PHP.INI file in order for Eventum to work properly.";
50 - $error = checkPermissions('../locks', "Directory 'locks'", TRUE);
51 + $error = checkPermissions('/var/run/eventum', "Directory '/var/run/eventum'", TRUE);
55 - $error = checkPermissions('../logs', "Directory 'logs'", TRUE);
56 + $error = checkPermissions('/var/log/eventum', "Directory '/var/log/eventum'", TRUE);
60 - $error = checkPermissions('../templates_c', "Directory 'templates_c'", TRUE);
61 + $error = checkPermissions('/var/cache/eventum', "Directory '/var/cache/eventum'", TRUE);
69 - $error = checkPermissions('../logs/errors.log', "File 'logs/errors.log'");
70 + $error = checkPermissions('/var/log/eventum/errors.log', "File '/var/log/eventum/errors.log'");
77 $tpl->template_dir = '../templates/en';
78 -$tpl->compile_dir = "../templates_c";
79 +$tpl->compile_dir = "/var/cache/eventum";
80 $tpl->config_dir = '';
82 function replace_table_prefix($str)
84 $tpl->assign('is_imap_enabled', function_exists('imap_open'));
88 -$full_url = dirname($HTTP_SERVER_VARS['PHP_SELF']);
89 -$pieces = explode("/", $full_url);
90 -$relative_url = array();
91 -$relative_url[] = '';
92 -foreach ($pieces as $piece) {
93 - if ((!empty($piece)) && ($piece != 'setup')) {
94 - $relative_url[] = $piece;
97 -$relative_url[] = '';
98 -$relative_url = implode("/", $relative_url);
100 -if (substr($HTTP_SERVER_VARS['DOCUMENT_ROOT'], -1) == '/') {
101 - $HTTP_SERVER_VARS['DOCUMENT_ROOT'] = substr($HTTP_SERVER_VARS['DOCUMENT_ROOT'], 0, -1);
103 -$installation_path = $HTTP_SERVER_VARS['DOCUMENT_ROOT'] . $relative_url;
104 +$installation_path = "/usr/share/eventum";
105 +$relative_url = "/eventum/";
107 $tpl->assign("phpversion", phpversion());
108 $tpl->assign("rel_url", $relative_url);
109 --- eventum-1.4/setup/index.php~ 2005-01-25 23:52:31.000000000 +0200
110 +++ eventum-1.4/setup/index.php 2005-01-25 23:52:33.000000000 +0200
114 ini_set("include_path", '.');
115 -include_once("../include/Smarty/Smarty.class.php");
116 +include_once("/usr/share/pear/Smarty/Smarty.class.php");
119 $tpl->template_dir = '../templates/en';
120 --- eventum-1.4/setup/config.inc.php 2005-02-22 19:33:23.000000000 +0200
121 +++ eventum-1.4.z/setup/config.inc.php 2005-02-22 19:32:42.000000000 +0200
126 -ini_set('allow_url_fopen', 0);
127 -ini_set("display_errors", 0);
130 -// prevent session from messing up the browser cache
131 -ini_set('session.cache_limiter', 'nocache');
133 -// only needed for older PHP versions
134 -if (!function_exists('is_a')) {
135 - function is_a($object, $class_name)
137 - $class_name = strtolower($class_name);
138 - if (get_class($object) == $class_name) {
141 - return is_subclass_of($object, $class_name);
146 -// definitions of path related variables
147 -$app_path = '%{APP_PATH}%';
148 -if ((substr($app_path, -1) != '/') && (substr($app_path, -2) != '\\')) {
151 -@define("APP_PATH", $app_path);
152 -@define("APP_INC_PATH", APP_PATH . "include/");
153 -@define("APP_PEAR_PATH", APP_INC_PATH . "pear/");
154 -@define("APP_TPL_PATH", APP_PATH . "templates/");
155 -@define("APP_SMARTY_PATH", APP_INC_PATH . "Smarty/");
156 -@define("APP_JPGRAPH_PATH", APP_INC_PATH . "jpgraph/");
157 -@define("APP_LOG_PATH", APP_PATH . "logs/");
158 -@define("APP_LOCKS_PATH", APP_PATH . "locks/");
159 -if (stristr(PHP_OS, 'darwin')) {
160 - ini_set("include_path", ".:" . APP_PEAR_PATH);
161 -} elseif (stristr(PHP_OS, 'win')) {
162 - ini_set("include_path", ".;" . APP_PEAR_PATH);
164 - ini_set("include_path", ".:" . APP_PEAR_PATH);
167 -@define("APP_SETUP_PATH", APP_PATH);
168 -@define("APP_SETUP_FILE", APP_SETUP_PATH . "setup.conf.php");
170 // definitions of SQL variables
171 @define("APP_SQL_DBTYPE", "mysql");
173 @define("APP_DEFAULT_DB", APP_SQL_DBNAME);
174 @define("APP_TABLE_PREFIX", "%{APP_TABLE_PREFIX}%");
176 -@define("APP_ERROR_LOG", APP_LOG_PATH . "errors.log");
177 -@define("APP_CLI_LOG", APP_LOG_PATH . "cli.log");
178 -@define("APP_IRC_LOG", APP_LOG_PATH . "irc_bot.log");
179 -@define("APP_LOGIN_LOG", APP_LOG_PATH . "login_attempts.log");
181 @define("APP_NAME", "Eventum");
182 @define("APP_SHORT_NAME", APP_NAME); // used in the subject of notification emails
183 @define("APP_URL", "http://www.mysql.com/products/eventum/");
185 @define("APP_PROJECT_COOKIE", "eventum_project");
186 @define("APP_PROJECT_COOKIE_EXPIRE", time() + (60 * 60 * 24));
188 -@define("APP_VERSION", "%{APP_VERSION}%");
190 @define("APP_LIST_COOKIE", 'eventum_list');
191 @define("APP_LIST_COOKIE_EXPIRE", time() + (60 * 60 * 24 * 30 * 48));
192 @define("APP_EMAIL_LIST_COOKIE", 'eventum_email_list');
194 @define("APP_CYCLE_COLORS", "#DDDDDD,#CACACA");
195 @define("APP_INTERNAL_COLOR", "#9C494B");
197 -// define the user_id of system user
198 -@define("APP_SYSTEM_USER_ID", 1);
200 @define("APP_BENCHMARK", false);
201 -if (APP_BENCHMARK) {
202 - // always benchmark the scripts
203 - include_once("Benchmark/Timer.php");
204 - $bench = new Benchmark_Timer;
208 -include_once(APP_INC_PATH . "class.misc.php");
211 - $HTTP_POST_VARS = $_POST;
212 - $HTTP_GET_VARS = $_GET;
213 - $HTTP_SERVER_VARS = $_SERVER;
214 - $HTTP_ENV_VARS = $_ENV;
215 - $HTTP_POST_FILES = $_FILES;
216 - // seems like PHP 4.1.0 didn't implement the $_SESSION auto-global...
217 - if (isset($_SESSION)) {
218 - $HTTP_SESSION_VARS = $_SESSION;
220 - $HTTP_COOKIE_VARS = $_COOKIE;
222 -// fix magic_quote_gpc'ed values (i wish i knew who is the person behind this)
223 -$HTTP_GET_VARS =& Misc::dispelMagicQuotes($HTTP_GET_VARS);
224 -$HTTP_POST_VARS =& Misc::dispelMagicQuotes($HTTP_POST_VARS);
226 -// handle the language preferences now
227 -@include_once(APP_INC_PATH . "class.language.php");
228 -Language::setPreference();
231 -header("content-type: text/html;charset=" . APP_CHARSET);
233 \ No newline at end of file