]> git.pld-linux.org Git - packages/eventum.git/blame - eventum-paths.patch
- use /etc/eventum for non-webapps (cli, scm)
[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");
8a37ad9d 8+include_once("/etc/eventum/cli.php");
71c6fb06
ER
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 //
7c14a47c 63 include_once("/etc/webapps/eventum/cli.php");
8bbad949
ER
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
d39dadfc
ER
81--- ./include/class.template.php~ 2005-02-27 17:49:54.000000000 +0200
82+++ ./include/class.template.php 2005-02-27 17:51:00.000000000 +0200
e1f8c51d 83@@ -60,7 +60,7 @@
71c6fb06
ER
84 {
85 $this->smarty = new Smarty;
d39dadfc 86 $this->smarty->template_dir = APP_TPL_PATH . APP_CURRENT_LANG;
71c6fb06
ER
87- $this->smarty->compile_dir = APP_PATH . "templates_c";
88+ $this->smarty->compile_dir = "/var/cache/eventum";
89 $this->smarty->config_dir = '';
d39dadfc 90 $this->smarty->register_modifier("activateLinks", array('Link_Filter', 'activateLinks'));
71c6fb06 91 }
6fa3b56f
ER
92--- ./include/class.monitor.php~ 2005-02-22 21:50:49.000000000 +0200
93+++ ./include/class.monitor.php 2005-02-22 23:04:50.000000000 +0200
d6775ce9
ER
94@@ -157,6 +165,7 @@
95 'permission' => 100,
96 ),
97 );
98+ $required_directories = array();
99 foreach ($required_directories as $dir_path => $options) {
100 // check if directory exists
101 if (!file_exists($dir_path)) {
6c5cabb4
ER
102--- ./setup/index.php 2005-04-16 05:53:27.000000000 +0300
103+++ eventum-1.5.2.patched/setup/index.php 2005-04-16 05:53:05.000000000 +0300
104@@ -118,31 +118,31 @@
105 if (ini_get('allow_call_time_pass_reference') != "1") {
106 $errors[] = "The 'allow_call_time_pass_reference' directive needs to be enabled in your PHP.INI file in order for Eventum to work properly.";
107 }
108- $error = checkPermissions('../locks', "Directory 'locks'", TRUE);
109+ $error = checkPermissions('/var/run/eventum', "Directory '/var/run/eventum'", TRUE);
110 if (!empty($error)) {
111 $errors[] = $error;
112 }
113- $error = checkPermissions('../logs', "Directory 'logs'", TRUE);
114+ $error = checkPermissions('/var/log/eventum', "Directory '/var/log/eventum'", TRUE);
115 if (!empty($error)) {
116 $errors[] = $error;
117 }
118- $error = checkPermissions('../templates_c', "Directory 'templates_c'", TRUE);
119+ $error = checkPermissions('/var/cache/eventum', "Directory '/var/cache/eventum'", TRUE);
120 if (!empty($error)) {
121 $errors[] = $error;
122 }
123- $error = checkPermissions('../config.inc.php', "File 'config.inc.php'");
7c14a47c 124+ $error = checkPermissions('/etc/webapps/eventum/config.php', "File '/etc/webapps/eventum/config.php'");
6c5cabb4
ER
125 if (!empty($error)) {
126 $errors[] = $error;
127 }
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)) {
131 $errors[] = $error;
132 }
133- $error = checkPermissions('../setup.conf.php', "File 'setup.conf.php'");
7c14a47c 134+ $error = checkPermissions('/etc/webapps/eventum/setup.php', "File '/etc/webapps/eventum/setup.php'");
6c5cabb4
ER
135 if (!empty($error)) {
136 $errors[] = $error;
137 }
138- $error = checkPermissions('../include/private_key.php', "File 'include/private_key.php'");
7c14a47c 139+ $error = checkPermissions('/etc/webapps/eventum/private_key.php', "File '/etc/webapps/eventum/private_key.php'");
6c5cabb4
ER
140 if (!empty($error)) {
141 $errors[] = $error;
142 }
6c5cabb4
ER
143@@ -276,8 +276,8 @@
144
145 clearstatcache();
146 // check if config.inc.php in the root directory is writable
147- if (!is_writable('../config.inc.php')) {
148- return "The file 'config.inc.php' in Eventum's root directory needs to be writable by the web server user. Please correct this problem and try again.";
7c14a47c
ER
149+ if (!is_writable('/etc/webapps/eventum/config.php')) {
150+ return "The file '/etc/webapps/eventum/config.php' needs to be writable by the web server user. Please correct this problem and try again.";
6c5cabb4
ER
151 }
152 // gotta check and see if the provided installation path really exists...
153 if (!file_exists($HTTP_POST_VARS['path'])) {
154@@ -287,16 +287,16 @@
155 $private_key = '<?php
156 $private_key = "' . md5(microtime()) . '";
157 ?>';
158- if (!is_writable('../include/private_key.php')) {
159- return "The file 'include/private_key.php' needs to be writable by the web server user. Please correct this problem and try again.";
7c14a47c
ER
160+ if (!is_writable('/etc/webapps/eventum/private_key.php')) {
161+ return "The file '/etc/webapps/eventum/private_key.php' needs to be writable by the web server user. Please correct this problem and try again.";
6c5cabb4
ER
162 }
163- $fp = @fopen('../include/private_key.php', 'w');
7c14a47c 164+ $fp = @fopen('/etc/webapps/eventum/private_key.php', 'w');
6c5cabb4
ER
165 if ($fp === FALSE) {
166- return "Could not open the file 'include/private_key.php' for writing. The permissions on the file should be set as to allow the user that the web server runs as to open it. Please correct this problem and try again.";
7c14a47c 167+ return "Could not open the file '/etc/webapps/eventum/private_key.php' for writing. The permissions on the file should be set as to allow the user that the web server runs as to open it. Please correct this problem and try again.";
6c5cabb4
ER
168 }
169 $res = fwrite($fp, $private_key);
170 if ($fp === FALSE) {
171- return "Could not write the configuration information to 'include/private_key.php'. The file should be writable by the user that the web server runs as. Please correct this problem and try again.";
7c14a47c 172+ return "Could not write the configuration information to '/etc/webapps/eventum/private_key.php'. The file should be writable by the user that the web server runs as. Please correct this problem and try again.";
6c5cabb4
ER
173 }
174 fclose($fp);
175 // check if we can connect
6c5cabb4
ER
176@@ -425,23 +425,8 @@
177 $tpl->assign('is_imap_enabled', function_exists('imap_open'));
178 }
179
180-
181-$full_url = dirname($HTTP_SERVER_VARS['PHP_SELF']);
182-$pieces = explode("/", $full_url);
183-$relative_url = array();
184-$relative_url[] = '';
185-foreach ($pieces as $piece) {
186- if ((!empty($piece)) && ($piece != 'setup')) {
187- $relative_url[] = $piece;
188- }
189-}
190-$relative_url[] = '';
191-$relative_url = implode("/", $relative_url);
192-
193-if (substr($HTTP_SERVER_VARS['DOCUMENT_ROOT'], -1) == '/') {
194- $HTTP_SERVER_VARS['DOCUMENT_ROOT'] = substr($HTTP_SERVER_VARS['DOCUMENT_ROOT'], 0, -1);
195-}
196-$installation_path = $HTTP_SERVER_VARS['DOCUMENT_ROOT'] . $relative_url;
197+$installation_path = "/usr/share/eventum";
198+$relative_url = "/eventum/";
199
200 $tpl->assign("phpversion", phpversion());
201 $tpl->assign("rel_url", $relative_url);
9ff5b0e3
ER
202--- ./index.php~ 2005-04-22 18:33:06.556398818 +0300
203+++ ./index.php 2005-04-22 18:33:07.885180913 +0300
204@@ -33,8 +33,8 @@
205 include_once(APP_INC_PATH . "db_access.php");
206
207 // check if templates_c is writable by the web server user
208-if (!Misc::isWritableDirectory(APP_PATH . 'templates_c')) {
209- $errors = array("Directory 'templates_c' is not writable.");
210+if (!Misc::isWritableDirectory('/var/cache/eventum')) {
211+ $errors = array("Directory '/var/cache/eventum' is not writable.");
212 Misc::displayRequirementErrors($errors);
213 exit;
214 }
3955d156
ER
215--- ../include/class.support.php~ 2005-07-10 15:40:57.000000000 +0300
216+++ ../include/class.support.php 2005-07-14 22:47:58.665843734 +0300
217@@ -259,7 +259,7 @@
218 */
219 function saveRoutedEmail($message)
220 {
221- $path = APP_PATH . "misc/routed_emails/";
222+ $path = "/var/lib/eventum/routed_emails/";
223 list($usec,) = explode(" ", microtime());
224 $filename = date('dmY.His.') . $usec . '.email.txt';
225 $fp = @fopen($path . $filename, 'w');
3e80a1df
ER
226--- eventum-20051221/include/class.draft.php~ 2005-12-21 17:56:27.000000000 +0200
227+++ eventum-20051221/include/class.draft.php 2005-12-21 17:59:26.000000000 +0200
228@@ -40,7 +40,7 @@
229 */
230 function saveRoutedMessage($message)
231 {
232- $path = APP_PATH . "misc/routed_drafts/";
233+ $path = "/var/lib/eventum/routed_drafts/";
234 list($usec,) = explode(" ", microtime());
235 $filename = date('dmY.His.') . $usec . '.draft.txt';
236 $fp = @fopen($path . $filename, 'w');
237--- eventum-20051221/include/class.note.php~ 2005-12-21 17:56:27.000000000 +0200
238+++ eventum-20051221/include/class.note.php 2005-12-21 17:59:57.000000000 +0200
239@@ -255,7 +255,7 @@
240 */
241 function saveRoutedNote($message)
242 {
243- $path = APP_PATH . "misc/routed_notes/";
244+ $path = "/var/lib/eventum/routed_notes/";
245 list($usec,) = explode(" ", microtime());
246 $filename = date('dmY.His.') . $usec . '.note.txt';
247 $fp = @fopen($path . $filename, 'w');
3955d156
ER
248--- ../setup/index.php~ 2005-07-26 18:49:37.000000000 +0300
249+++ ../setup/index.php 2005-07-26 19:12:57.000000000 +0300
250@@ -213,11 +213,11 @@
251 exit;
252 }
253
254-include_once("../include/Smarty/Smarty.class.php");
255+include_once("/usr/share/pear/Smarty/Smarty.class.php");
256
257 $tpl = new Smarty();
258-$tpl->template_dir = '../templates/en';
259-$tpl->compile_dir = "../templates_c";
260+$tpl->template_dir = '/usr/share/eventum/templates/en';
261+$tpl->compile_dir = "/var/cache/eventum";
262 $tpl->config_dir = '';
263
264 function replace_table_prefix($str)
265@@ -417,7 +417,7 @@
266 $config_contents = str_replace("%{APP_ENABLE_FULLTEXT}%", "false", $config_contents);
267 }
268
269- $fp = @fopen('../config.inc.php', 'w');
7c14a47c 270+ $fp = @fopen('/etc/webapps/eventum/config.php', 'w');
3955d156
ER
271 if ($fp === FALSE) {
272 return "Could not open the file 'config.inc.php' for writing. The permissions on the file should be set as to allow the user that the web server runs as to open it. Please correct this problem and try again.";
273 }
274--- eventum-1.5.5/setup/index.php~ 2005-07-26 20:22:06.000000000 +0300
275+++ eventum-1.5.5/setup/index.php 2005-07-26 20:35:31.000000000 +0300
276@@ -198,13 +198,7 @@
277 return $html;
278 }
279
280-if (stristr(PHP_OS, 'darwin')) {
281- ini_set("include_path", ".:./../include/pear/");
282-} elseif (stristr(PHP_OS, 'win')) {
283- ini_set("include_path", ".;./../include/pear/");
284-} else {
285- ini_set("include_path", ".:./../include/pear/");
286-}
287+ini_set("include_path", ".:../../include/pear/");
288 include_once("File/Util.php");
289
290 $html = checkRequirements();
816db750
ER
291--- eventum-20051130/include/class.template.php~ 2005-11-30 17:51:55.000000000 +0200
292+++ eventum-20051130/include/class.template.php 2005-11-30 17:53:15.000000000 +0200
293@@ -61,6 +61,7 @@
294 $this->smarty = new Smarty;
295 $this->smarty->template_dir = APP_TPL_PATH . APP_CURRENT_LANG;
ddcd51d0 296 $this->smarty->compile_dir = "/var/cache/eventum";
816db750 297+ $this->smarty->plugins_dir = array('/usr/share/eventum/include/smarty', 'plugins');
ddcd51d0
ER
298 $this->smarty->config_dir = '';
299 $this->smarty->register_modifier("activateLinks", array('Link_Filter', 'activateLinks'));
816db750 300 $this->smarty->register_modifier("formatCustomValue", array('Custom_Field', 'formatValue'));
452347b6
ER
301--- ./include/class.misc.php 2005-10-26 17:17:17.000000000 +0300
302+++ /tmp/class.misc.php 2005-10-26 17:30:12.000000000 +0300
303@@ -607,7 +607,7 @@
304 */
305 function highlightQuotedReply($text)
306 {
307- include_once(APP_SMARTY_PATH . "plugins/modifier.highlight_quoted.php");
308+ include_once(APP_INC_PATH. "smarty/modifier.highlight_quoted.php");
309 return smarty_modifier_highlight_quoted($text);
310 }
311
This page took 0.343168 seconds and 4 git commands to generate.