]> git.pld-linux.org Git - packages/eventum.git/blob - eventum-paths.patch
- updated to 1.5.2
[packages/eventum.git] / eventum-paths.patch
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 @@
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  
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 @@
15  }
16  
17  // definitions of path related variables
18 -@define("APP_PATH", dirname(__FILE__) . '/');
19 +@define("APP_PATH", '/usr/share/eventum/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);
26 -} else {
27 -    ini_set("include_path", ".:" . APP_PEAR_PATH);
28 -}
29 +ini_set("include_path", ".:" . APP_PEAR_PATH);
30  
31  @define("APP_BENCHMARK", false);
32  ?>
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  
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
83 @@ -60,7 +60,7 @@
84      {
85          $this->smarty = new Smarty;
86          $this->smarty->template_dir = APP_TPL_PATH . 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', 'activateLinks'));
91      }
92 --- eventum-1.5.1/setup/config.inc.php~ 2005-03-14 15:21:18.000000000 +0200
93 +++ eventum-1.5.1/setup/config.inc.php  2005-03-14 15:20:22.000000000 +0200
94 @@ -27,49 +27,6 @@
95  //
96  // @(#) $Id$
97  //
98 -ini_set('allow_url_fopen', 0);
99 -ini_set("display_errors", 0);
100 -error_reporting(0);
101 -@set_time_limit(0);
102 -// prevent session from messing up the browser cache
103 -ini_set('session.cache_limiter', 'nocache');
104 -
105 -// only needed for older PHP versions
106 -if (!function_exists('is_a')) {
107 -    function is_a($object, $class_name)
108 -    {
109 -        $class_name = strtolower($class_name);
110 -        if (get_class($object) == $class_name) {
111 -            return TRUE;
112 -        } else {
113 -            return is_subclass_of($object, $class_name);
114 -        }
115 -    }
116 -}
117 -
118 -// definitions of path related variables
119 -$app_path = '%{APP_PATH}%';
120 -if ((substr($app_path, -1) != '/') && (substr($app_path, -2) != '\\')) {
121 -    $app_path .= '/';
122 -}
123 -@define("APP_PATH", $app_path);
124 -@define("APP_INC_PATH", APP_PATH . "include/");
125 -@define("APP_PEAR_PATH", APP_INC_PATH . "pear/");
126 -@define("APP_TPL_PATH", APP_PATH . "templates/");
127 -@define("APP_SMARTY_PATH", APP_INC_PATH . "Smarty/");
128 -@define("APP_JPGRAPH_PATH", APP_INC_PATH . "jpgraph/");
129 -@define("APP_LOG_PATH", APP_PATH . "logs/");
130 -@define("APP_LOCKS_PATH", APP_PATH . "locks/");
131 -if (stristr(PHP_OS, 'darwin')) {
132 -    ini_set("include_path", ".:" . APP_PEAR_PATH);
133 -} elseif (stristr(PHP_OS, 'win')) {
134 -    ini_set("include_path", ".;" . APP_PEAR_PATH);
135 -} else {
136 -    ini_set("include_path", ".:" . APP_PEAR_PATH);
137 -}
138 -
139 -@define("APP_SETUP_PATH", APP_PATH);
140 -@define("APP_SETUP_FILE", APP_SETUP_PATH . "setup.conf.php");
141  
142  // definitions of SQL variables
143  @define("APP_SQL_DBTYPE", "mysql");
144 @@ -82,11 +39,6 @@
145  @define("APP_DEFAULT_DB", APP_SQL_DBNAME);
146  @define("APP_TABLE_PREFIX", "%{APP_TABLE_PREFIX}%");
147  
148 -@define("APP_ERROR_LOG", APP_LOG_PATH . "errors.log");
149 -@define("APP_CLI_LOG", APP_LOG_PATH . "cli.log");
150 -@define("APP_IRC_LOG", APP_LOG_PATH . "irc_bot.log");
151 -@define("APP_LOGIN_LOG", APP_LOG_PATH . "login_attempts.log");
152 -
153  @define("APP_NAME", "Eventum");
154  @define("APP_SHORT_NAME", APP_NAME); // used in the subject of notification emails
155  @define("APP_URL", "http://www.mysql.com/products/eventum/");
156 @@ -99,8 +51,6 @@
157  @define("APP_PROJECT_COOKIE", "eventum_project");
158  @define("APP_PROJECT_COOKIE_EXPIRE", time() + (60 * 60 * 24));
159  
160 -@define("APP_VERSION", "%{APP_VERSION}%");
161 -
162  @define("APP_DEFAULT_PAGER_SIZE", 5);
163  @define("APP_DEFAULT_REFRESH_RATE", 5); // in minutes
164  
165 @@ -114,39 +64,6 @@
166  @define("APP_CYCLE_COLORS", "#DDDDDD,#CACACA");
167  @define("APP_INTERNAL_COLOR", "#9C494B");
168  
169 -// define the user_id of system user
170 -@define("APP_SYSTEM_USER_ID", 1);
171 -
172  @define("APP_BENCHMARK", false);
173 -if (APP_BENCHMARK) {
174 -    // always benchmark the scripts
175 -    include_once("Benchmark/Timer.php");
176 -    $bench = new Benchmark_Timer;
177 -    $bench->start();
178 -}
179 -
180 -include_once(APP_INC_PATH . "class.misc.php");
181 -
182 -if (isset($_GET)) {
183 -    $HTTP_POST_VARS = $_POST;
184 -    $HTTP_GET_VARS = $_GET;
185 -    $HTTP_SERVER_VARS = $_SERVER;
186 -    $HTTP_ENV_VARS = $_ENV;
187 -    $HTTP_POST_FILES = $_FILES;
188 -    // seems like PHP 4.1.0 didn't implement the $_SESSION auto-global...
189 -    if (isset($_SESSION)) {
190 -        $HTTP_SESSION_VARS = $_SESSION;
191 -    }
192 -    $HTTP_COOKIE_VARS = $_COOKIE;
193 -}
194 -// fix magic_quote_gpc'ed values (i wish i knew who is the person behind this)
195 -$HTTP_GET_VARS =& Misc::dispelMagicQuotes($HTTP_GET_VARS);
196 -$HTTP_POST_VARS =& Misc::dispelMagicQuotes($HTTP_POST_VARS);
197 -
198 -// handle the language preferences now
199 -@include_once(APP_INC_PATH . "class.language.php");
200 -Language::setPreference();
201  
202 -// set charset
203 -header("content-type: text/html;charset=" . APP_CHARSET);
204  ?>
205 \ No newline at end of file
206 --- ./include/class.monitor.php~        2005-02-22 21:50:49.000000000 +0200
207 +++ ./include/class.monitor.php 2005-02-22 23:04:50.000000000 +0200
208 @@ -157,6 +165,7 @@
209                  'permission'       => 100,
210              ),
211          );
212 +        $required_directories = array();
213          foreach ($required_directories as $dir_path => $options) {
214              // check if directory exists
215              if (!file_exists($dir_path)) {
216 --- ./setup/index.php   2005-04-16 05:53:27.000000000 +0300
217 +++ eventum-1.5.2.patched/setup/index.php       2005-04-16 05:53:05.000000000 +0300
218 @@ -118,31 +118,31 @@
219      if (ini_get('allow_call_time_pass_reference') != "1") {
220          $errors[] = "The 'allow_call_time_pass_reference' directive needs to be enabled in your PHP.INI file in order for Eventum to work properly.";
221      }
222 -    $error = checkPermissions('../locks', "Directory 'locks'", TRUE);
223 +    $error = checkPermissions('/var/run/eventum', "Directory '/var/run/eventum'", TRUE);
224      if (!empty($error)) {
225          $errors[] = $error;
226      }
227 -    $error = checkPermissions('../logs', "Directory 'logs'", TRUE);
228 +    $error = checkPermissions('/var/log/eventum', "Directory '/var/log/eventum'", TRUE);
229      if (!empty($error)) {
230          $errors[] = $error;
231      }
232 -    $error = checkPermissions('../templates_c', "Directory 'templates_c'", TRUE);
233 +    $error = checkPermissions('/var/cache/eventum', "Directory '/var/cache/eventum'", TRUE);
234      if (!empty($error)) {
235          $errors[] = $error;
236      }
237 -    $error = checkPermissions('../config.inc.php', "File 'config.inc.php'");
238 +    $error = checkPermissions('/etc/eventum/config.php', "File '/etc/eventum/config.php'");
239      if (!empty($error)) {
240          $errors[] = $error;
241      }
242 -    $error = checkPermissions('../logs/errors.log', "File 'logs/errors.log'");
243 +    $error = checkPermissions('/var/log/eventum/errors.log', "File '/var/log/eventum/errors.log'");
244      if (!empty($error)) {
245          $errors[] = $error;
246      }
247 -    $error = checkPermissions('../setup.conf.php', "File 'setup.conf.php'");
248 +    $error = checkPermissions('/etc/eventum/setup.php', "File '/etc/eventum/setup.php'");
249      if (!empty($error)) {
250          $errors[] = $error;
251      }
252 -    $error = checkPermissions('../include/private_key.php', "File 'include/private_key.php'");
253 +    $error = checkPermissions('/etc/eventum/private_key.php', "File '/etc/eventum/private_key.php'");
254      if (!empty($error)) {
255          $errors[] = $error;
256      }
257 @@ -203,11 +203,11 @@
258  }
259  
260  ini_set("include_path", '.');
261 -include_once("../include/Smarty/Smarty.class.php");
262 +include_once("/usr/share/pear/Smarty/Smarty.class.php");
263  
264  $tpl = new Smarty();
265 -$tpl->template_dir = '../templates/en';
266 -$tpl->compile_dir = "../templates_c";
267 +$tpl->template_dir = '/usr/share/eventum/templates/en';
268 +$tpl->compile_dir = "/var/cache/eventum";
269  $tpl->config_dir = '';
270  
271  function replace_table_prefix($str)
272 @@ -276,8 +276,8 @@
273  
274      clearstatcache();
275      // check if config.inc.php in the root directory is writable
276 -    if (!is_writable('../config.inc.php')) {
277 -        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.";
278 +    if (!is_writable('/etc/eventum/config.php')) {
279 +        return "The file '/etc/eventum/config.php' needs to be writable by the web server user. Please correct this problem and try again.";
280      }
281      // gotta check and see if the provided installation path really exists...
282      if (!file_exists($HTTP_POST_VARS['path'])) {
283 @@ -287,16 +287,16 @@
284      $private_key = '<?php
285  $private_key = "' . md5(microtime()) . '";
286  ?>';
287 -    if (!is_writable('../include/private_key.php')) {
288 -        return "The file 'include/private_key.php' needs to be writable by the web server user. Please correct this problem and try again.";
289 +    if (!is_writable('/etc/eventum/private_key.php')) {
290 +        return "The file '/etc/eventum/private_key.php' needs to be writable by the web server user. Please correct this problem and try again.";
291      }
292 -    $fp = @fopen('../include/private_key.php', 'w');
293 +    $fp = @fopen('/etc/eventum/private_key.php', 'w');
294      if ($fp === FALSE) {
295 -        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.";
296 +        return "Could not open the file '/etc/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.";
297      }
298      $res = fwrite($fp, $private_key);
299      if ($fp === FALSE) {
300 -        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.";
301 +        return "Could not write the configuration information to '/etc/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.";
302      }
303      fclose($fp);
304      // check if we can connect
305 @@ -396,7 +396,7 @@
306          $protocol_type = 'http://';
307      }
308      $config_contents = str_replace("%{PROTOCOL_TYPE}%", $protocol_type, $config_contents);
309 -    $fp = @fopen('../config.inc.php', 'w');
310 +    $fp = @fopen('/etc/eventum/config.php', 'w');
311      if ($fp === FALSE) {
312          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.";
313      }
314 @@ -425,23 +425,8 @@
315      $tpl->assign('is_imap_enabled', function_exists('imap_open'));
316  }
317  
318 -
319 -$full_url = dirname($HTTP_SERVER_VARS['PHP_SELF']);
320 -$pieces = explode("/", $full_url);
321 -$relative_url = array();
322 -$relative_url[] = '';
323 -foreach ($pieces as $piece) {
324 -    if ((!empty($piece)) && ($piece != 'setup')) {
325 -        $relative_url[] = $piece;
326 -    }
327 -}
328 -$relative_url[] = '';
329 -$relative_url = implode("/", $relative_url);
330 -
331 -if (substr($HTTP_SERVER_VARS['DOCUMENT_ROOT'], -1) == '/') {
332 -    $HTTP_SERVER_VARS['DOCUMENT_ROOT'] = substr($HTTP_SERVER_VARS['DOCUMENT_ROOT'], 0, -1);
333 -}
334 -$installation_path = $HTTP_SERVER_VARS['DOCUMENT_ROOT'] . $relative_url;
335 +$installation_path = "/usr/share/eventum";
336 +$relative_url = "/eventum/";
337  
338  $tpl->assign("phpversion", phpversion());
339  $tpl->assign("rel_url", $relative_url);
This page took 0.106373 seconds and 4 git commands to generate.