]> git.pld-linux.org Git - packages/eventum.git/blame - eventum-paths.patch
- fix patch header
[packages/eventum.git] / eventum-paths.patch
CommitLineData
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
e1f8c51d
ER
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
83@@ -60,7 +60,7 @@
71c6fb06
ER
84 {
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'));
91 }
8bbad949
ER
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
94@@ -59,7 +59,7 @@
95 function Template_API()
96 {
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'));
643718e7
ER
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
898e761e 105@@ -114,15 +114,15 @@
71c6fb06
ER
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.";
108 }
109- $error = checkPermissions('../locks', "Directory 'locks'", TRUE);
898e761e 110+ $error = checkPermissions('/var/run/eventum', "Directory '/var/run/eventum'", TRUE);
71c6fb06
ER
111 if (!empty($error)) {
112 $errors[] = $error;
113 }
114- $error = checkPermissions('../logs', "Directory 'logs'", TRUE);
647a326e 115+ $error = checkPermissions('/var/log/eventum', "Directory '/var/log/eventum'", TRUE);
71c6fb06
ER
116 if (!empty($error)) {
117 $errors[] = $error;
118 }
119- $error = checkPermissions('../templates_c', "Directory 'templates_c'", TRUE);
898e761e 120+ $error = checkPermissions('/var/cache/eventum', "Directory '/var/cache/eventum'", TRUE);
71c6fb06
ER
121 if (!empty($error)) {
122 $errors[] = $error;
123 }
647a326e 124@@ -130,7 +130,7 @@
71c6fb06
ER
125 if (!empty($error)) {
126 $errors[] = $error;
127 }
128- $error = checkPermissions('../logs/errors.log', "File 'logs/errors.log'");
647a326e 129+ $error = checkPermissions('/var/log/eventum/errors.log', "File '/var/log/eventum/errors.log'");
71c6fb06
ER
130 if (!empty($error)) {
131 $errors[] = $error;
132 }
643718e7 133@@ -203,7 +203,7 @@
71c6fb06
ER
134
135 $tpl = new Smarty();
136 $tpl->template_dir = '../templates/en';
137-$tpl->compile_dir = "../templates_c";
647a326e 138+$tpl->compile_dir = "/var/cache/eventum";
71c6fb06
ER
139 $tpl->config_dir = '';
140
141 function replace_table_prefix($str)
898e761e 142@@ -417,23 +417,8 @@
71c6fb06
ER
143 $tpl->assign('is_imap_enabled', function_exists('imap_open'));
144 }
145
146-
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;
154- }
155-}
156-$relative_url[] = '';
157-$relative_url = implode("/", $relative_url);
158-
159-if (substr($HTTP_SERVER_VARS['DOCUMENT_ROOT'], -1) == '/') {
160- $HTTP_SERVER_VARS['DOCUMENT_ROOT'] = substr($HTTP_SERVER_VARS['DOCUMENT_ROOT'], 0, -1);
161-}
162-$installation_path = $HTTP_SERVER_VARS['DOCUMENT_ROOT'] . $relative_url;
898e761e
ER
163+$installation_path = "/usr/share/eventum";
164+$relative_url = "/eventum/";
71c6fb06
ER
165
166 $tpl->assign("phpversion", phpversion());
167 $tpl->assign("rel_url", $relative_url);
b685c0af
ER
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
170@@ -199,7 +199,7 @@
171 }
172
173 ini_set("include_path", '.');
174-include_once("../include/Smarty/Smarty.class.php");
175+include_once("/usr/share/pear/Smarty/Smarty.class.php");
176
177 $tpl = new Smarty();
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
181@@ -27,49 +27,6 @@
182 //
183 // @(#) $Id$
184 //
185-ini_set('allow_url_fopen', 0);
186-ini_set("display_errors", 0);
187-error_reporting(0);
188-set_time_limit(0);
189-// prevent session from messing up the browser cache
190-ini_set('session.cache_limiter', 'nocache');
191-
192-// only needed for older PHP versions
193-if (!function_exists('is_a')) {
194- function is_a($object, $class_name)
195- {
196- $class_name = strtolower($class_name);
197- if (get_class($object) == $class_name) {
198- return TRUE;
199- } else {
200- return is_subclass_of($object, $class_name);
201- }
202- }
203-}
204-
205-// definitions of path related variables
206-$app_path = '%{APP_PATH}%';
207-if ((substr($app_path, -1) != '/') && (substr($app_path, -2) != '\\')) {
208- $app_path .= '/';
209-}
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);
222-} else {
223- ini_set("include_path", ".:" . APP_PEAR_PATH);
224-}
225-
226-@define("APP_SETUP_PATH", APP_PATH);
227-@define("APP_SETUP_FILE", APP_SETUP_PATH . "setup.conf.php");
228
229 // definitions of SQL variables
230 @define("APP_SQL_DBTYPE", "mysql");
231@@ -82,11 +39,6 @@
232 @define("APP_DEFAULT_DB", APP_SQL_DBNAME);
233 @define("APP_TABLE_PREFIX", "%{APP_TABLE_PREFIX}%");
234
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");
239-
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/");
243@@ -99,8 +51,6 @@
244 @define("APP_PROJECT_COOKIE", "eventum_project");
245 @define("APP_PROJECT_COOKIE_EXPIRE", time() + (60 * 60 * 24));
246
247-@define("APP_VERSION", "%{APP_VERSION}%");
248-
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');
252@@ -118,39 +68,6 @@
253 @define("APP_CYCLE_COLORS", "#DDDDDD,#CACACA");
254 @define("APP_INTERNAL_COLOR", "#9C494B");
255
256-// define the user_id of system user
257-@define("APP_SYSTEM_USER_ID", 1);
258-
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;
264- $bench->start();
265-}
266-
267-include_once(APP_INC_PATH . "class.misc.php");
268-
269-if (isset($_GET)) {
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;
278- }
279- $HTTP_COOKIE_VARS = $_COOKIE;
280-}
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);
284-
285-// handle the language preferences now
286-@include_once(APP_INC_PATH . "class.language.php");
287-Language::setPreference();
288-
289-// set charset
290-header("content-type: text/html;charset=" . APP_CHARSET);
291-?>
292\ No newline at end of file
293+
294+?>
6fa3b56f
ER
295--- ./include/class.monitor.php~ 2005-02-22 21:50:49.000000000 +0200
296+++ ./include/class.monitor.php 2005-02-22 23:04:50.000000000 +0200
d6775ce9
ER
297@@ -100,21 +100,29 @@
298 function checkConfiguration()
299 {
300 $required_files = array(
301- APP_PATH . 'config.inc.php' => array(
302+ '/etc/eventum/config.php' => array(
303 'check_owner' => true,
304- 'owner' => 'apache',
305+ 'owner' => 'root',
306 'check_group' => true,
307- 'group' => 'apache',
308+ 'group' => 'http',
309 'check_permission' => true,
310- 'permission' => 755,
311+ 'permission' => 640,
312 ),
313- APP_PATH . 'setup.conf.php' => array(
314+ '/etc/eventum/core.php' => array(
315 'check_owner' => true,
316- 'owner' => 'apache',
317+ 'owner' => 'root',
318 'check_group' => true,
319- 'group' => 'apache',
320+ 'group' => 'http',
321 'check_permission' => true,
322- 'permission' => 750,
323+ 'permission' => 640,
324+ ),
325+ '/etc/eventum/setup.php' => array(
326+ 'check_owner' => true,
327+ 'owner' => 'root',
328+ 'check_group' => true,
329+ 'group' => 'http',
330+ 'check_permission' => true,
331+ 'permission' => 660,
332 'check_filesize' => true,
333 'filesize' => 1024
334 ),
335@@ -157,6 +165,7 @@
336 'permission' => 100,
337 ),
338 );
339+ $required_directories = array();
340 foreach ($required_directories as $dir_path => $options) {
341 // check if directory exists
342 if (!file_exists($dir_path)) {
This page took 0.090152 seconds and 4 git commands to generate.