]> git.pld-linux.org Git - packages/eventum.git/blob - eventum-paths.patch
- up to 20070116.3194
[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 -require_once("config.inc.php");
8 +require_once("/etc/eventum/cli.php");
9  require_once(APP_INC_PATH . "class.command_line.php");
10  require_once(APP_PEAR_PATH . "XML_RPC/RPC.php");
11  
12 --- eventum/misc/cli/config.inc.php~    2007-01-16 09:40:00.453108697 +0200
13 +++ eventum/misc/cli/config.inc.php     2007-01-16 09:39:31.922469000 +0200
14 @@ -45,15 +45,9 @@
15  }
16  
17  // definitions of path related variables
18 -@define("APP_PATH", dirname(__FILE__) . '/');
19 -@define("APP_INC_PATH", APP_PATH . "include/");
20 +@define("APP_PATH", '/usr/share/eventum/cli/');
21 +@define("APP_INC_PATH", APP_PATH);
22  @define("APP_PEAR_PATH", APP_INC_PATH . "pear/");
23 -if (stristr(PHP_OS, 'darwin')) {
24 -    ini_set("include_path", ".:" . APP_PEAR_PATH);
25 -} elseif (stristr(PHP_OS, 'win')) {
26 -    ini_set("include_path", ".;" . APP_PEAR_PATH);
27 -} else {
28 -    ini_set("include_path", ".:" . APP_PEAR_PATH);
29 -}
30 +ini_set("include_path", ".:" . APP_PEAR_PATH);
31  
32  @define("APP_BENCHMARK", false);
33 --- ./misc/cli/eventum~ 2005-01-24 17:49:25.000000000 +0200
34 +++ ./misc/cli/eventum  2005-01-25 15:48:56.000000000 +0200
35 @@ -13,7 +13,7 @@
36  //
37  require_once("/etc/webapps/eventum/cli.php");
38  require_once(APP_INC_PATH . "class.command_line.php");
39 -require_once(APP_PEAR_PATH . "XML_RPC/RPC.php");
40 +require_once(APP_PEAR_PATH . "XML/RPC.php");
41  
42  list($user_email, $user_password, $url, $port, $relative_url) = Command_Line::getEnvironmentSettings();
43  if (empty($port)) {
44 --- ./misc/cli/include/class.command_line.php   2005-01-05 01:06:03.000000000 +0200
45 +++ ./misc/cli/include/class.command_line.php   2005-01-25 15:48:56.000000000 +0200
46 @@ -29,7 +29,7 @@
47  //
48  
49  require_once(APP_INC_PATH . "class.misc.php");
50 -require_once(APP_PEAR_PATH . "XML_RPC/RPC.php");
51 +require_once(APP_PEAR_PATH . "XML/RPC.php");
52  
53  $_displayed_confirmation = false;
54  
55 --- eventum-localization-dev/include/class.template.php~        2006-04-10 23:48:12.740151749 +0300
56 +++ eventum-localization-dev/include/class.template.php 2006-04-10 23:48:16.310231300 +0300
57 @@ -60,7 +60,7 @@
58      {
59          $this->smarty = new Smarty;
60          $this->smarty->template_dir = APP_TPL_PATH;
61 -        $this->smarty->compile_dir = APP_PATH . "templates_c";
62 +        $this->smarty->compile_dir = '/var/cache/eventum';
63          $this->smarty->config_dir = '';
64          $this->smarty->register_modifier("activateLinks", array('Link_Filter', 'activateLinks'));
65          $this->smarty->register_modifier("formatCustomValue", array('Custom_Field', 'formatValue'));
66 --- ./include/class.monitor.php~        2005-02-22 21:50:49.000000000 +0200
67 +++ ./include/class.monitor.php 2005-02-22 23:04:50.000000000 +0200
68 @@ -157,6 +165,7 @@
69                  'permission'       => 100,
70              ),
71          );
72 +        $required_directories = array();
73          foreach ($required_directories as $dir_path => $options) {
74              // check if directory exists
75              if (!file_exists($dir_path)) {
76 --- eventum-20060717/setup/index.php~   2006-07-18 00:20:57.530267420 +0300
77 +++ eventum-20060717/setup/index.php    2006-07-18 00:22:06.301805247 +0300
78 @@ -121,31 +121,31 @@
79      if (ini_get('allow_call_time_pass_reference') != "1") {
80          $errors[] = "The 'allow_call_time_pass_reference' directive needs to be enabled in your PHP.INI file in order for Eventum to work properly.";
81      }
82 -    $error = checkPermissions('../locks', "Directory 'locks'", TRUE);
83 +    $error = checkPermissions('/var/run/eventum', "Directory '/var/run/eventum'", TRUE);
84      if (!empty($error)) {
85          $errors[] = $error;
86      }
87 -    $error = checkPermissions('../logs', "Directory 'logs'", TRUE);
88 +    $error = checkPermissions('/var/log/eventum', "Directory '/var/log/eventum'", TRUE);
89      if (!empty($error)) {
90          $errors[] = $error;
91      }
92 -    $error = checkPermissions('../templates_c', "Directory 'templates_c'", TRUE);
93 +    $error = checkPermissions('/var/cache/eventum', "Directory '/var/cache/eventum'", TRUE);
94      if (!empty($error)) {
95          $errors[] = $error;
96      }
97 -    $error = checkPermissions('../config.inc.php', "File 'config.inc.php'");
98 +    $error = checkPermissions('/etc/webapps/eventum/config.php', "File '/etc/webapps/eventum/config.php'");
99      if (!empty($error)) {
100          $errors[] = $error;
101      }
102 -    $error = checkPermissions('../logs/errors.log', "File 'logs/errors.log'");
103 +    $error = checkPermissions('/var/log/eventum/errors.log', "File '/var/log/eventum/errors.log'");
104      if (!empty($error)) {
105          $errors[] = $error;
106      }
107 -    $error = checkPermissions('../setup.conf.php', "File 'setup.conf.php'");
108 +    $error = checkPermissions('/etc/webapps/eventum/setup.php', "File '/etc/webapps/eventum/setup.php'");
109      if (!empty($error)) {
110          $errors[] = $error;
111      }
112 -    $error = checkPermissions('../include/private_key.php', "File 'include/private_key.php'");
113 +    $error = checkPermissions('/etc/webapps/eventum/private_key.php', "File '/etc/webapps/eventum/private_key.php'");
114      if (!empty($error)) {
115          $errors[] = $error;
116      }
117 --- eventum-20060918/setup/index.php~   2006-09-19 00:15:15.216195060 +0300
118 +++ eventum-20060918/setup/index.php    2006-09-19 00:15:18.346265301 +0300
119 @@ -276,8 +276,8 @@
120  
121      clearstatcache();
122      // check if config.inc.php in the root directory is writable
123 -    if (!is_writable('../config.inc.php')) {
124 -        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.";
125 +    if (!is_writable('/etc/webapps/eventum/config.php')) {
126 +        return "The file '/etc/webapps/eventum/config.php' needs to be writable by the web server user. Please correct this problem and try again.";
127      }
128      // gotta check and see if the provided installation path really exists...
129      if (!file_exists($_POST['path'])) {
130 @@ -287,16 +287,16 @@
131      $private_key = '<?php
132  $private_key = "' . md5(microtime()) . '";
133  ?>';
134 -    if (!is_writable('../include/private_key.php')) {
135 -        return "The file 'include/private_key.php' needs to be writable by the web server user. Please correct this problem and try again.";
136 +    if (!is_writable('/etc/webapps/eventum/private_key.php')) {
137 +        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.";
138      }
139 -    $fp = @fopen('../include/private_key.php', 'w');
140 +    $fp = @fopen('/etc/webapps/eventum/private_key.php', 'w');
141      if ($fp === FALSE) {
142 -        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.";
143 +        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.";
144      }
145      $res = fwrite($fp, $private_key);
146      if ($fp === FALSE) {
147 -        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.";
148 +        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.";
149      }
150      fclose($fp);
151      // check if we can connect
152 @@ -429,18 +429,7 @@
153      $tpl->assign('is_imap_enabled', function_exists('imap_open'));
154  }
155  
156 -
157 -$full_url = dirname($_SERVER['PHP_SELF']);
158 -$pieces = explode("/", $full_url);
159 -$relative_url = array();
160 -$relative_url[] = '';
161 -foreach ($pieces as $piece) {
162 -    if ((!empty($piece)) && ($piece != 'setup')) {
163 -        $relative_url[] = $piece;
164 -    }
165 -}
166 -$relative_url[] = '';
167 -$relative_url = implode("/", $relative_url);
168 +$relative_url = '/eventum/';
169  
170  $tpl->assign("phpversion", phpversion());
171  $tpl->assign("rel_url", $relative_url);
172 --- ./index.php~        2005-04-22 18:33:06.556398818 +0300
173 +++ ./index.php 2005-04-22 18:33:07.885180913 +0300
174 @@ -33,8 +33,8 @@
175  require_once(APP_INC_PATH . "db_access.php");
176  
177  // check if templates_c is writable by the web server user
178 -if (!Misc::isWritableDirectory(APP_PATH . 'templates_c')) {
179 -    $errors = array("Directory 'templates_c' is not writable.");
180 +if (!Misc::isWritableDirectory('/var/cache/eventum')) {
181 +    $errors = array("Directory '/var/cache/eventum' is not writable.");
182      Misc::displayRequirementErrors($errors);
183      exit;
184  }
185 --- ../include/class.support.php~       2005-07-10 15:40:57.000000000 +0300
186 +++ ../include/class.support.php        2005-07-14 22:47:58.665843734 +0300
187 @@ -259,7 +259,7 @@
188       */
189      function saveRoutedEmail($message)
190      {
191 -        $path = APP_PATH . "misc/routed_emails/";
192 +        $path = "/var/lib/eventum/routed_emails/";
193          list($usec,) = explode(" ", microtime());
194          $filename = date('dmY.His.') . $usec . '.email.txt';
195          $fp = @fopen($path . $filename, 'w');
196 --- eventum-20051221/include/class.draft.php~   2005-12-21 17:56:27.000000000 +0200
197 +++ eventum-20051221/include/class.draft.php    2005-12-21 17:59:26.000000000 +0200
198 @@ -40,7 +40,7 @@
199       */
200      function saveRoutedMessage($message)
201      {
202 -        $path = APP_PATH . "misc/routed_drafts/";
203 +        $path = "/var/lib/eventum/routed_drafts/";
204          list($usec,) = explode(" ", microtime());
205          $filename = date('dmY.His.') . $usec . '.draft.txt';
206          $fp = @fopen($path . $filename, 'w');
207 --- eventum-20051221/include/class.note.php~    2005-12-21 17:56:27.000000000 +0200
208 +++ eventum-20051221/include/class.note.php     2005-12-21 17:59:57.000000000 +0200
209 @@ -255,7 +255,7 @@
210       */
211      function saveRoutedNote($message)
212      {
213 -        $path = APP_PATH . "misc/routed_notes/";
214 +        $path = "/var/lib/eventum/routed_notes/";
215          list($usec,) = explode(" ", microtime());
216          $filename = date('dmY.His.') . $usec . '.note.txt';
217          $fp = @fopen($path . $filename, 'w');
218 --- ../setup/index.php~ 2005-07-26 18:49:37.000000000 +0300
219 +++ ../setup/index.php  2005-07-26 19:12:57.000000000 +0300
220 @@ -417,7 +417,7 @@
221          $config_contents = str_replace("%{APP_ENABLE_FULLTEXT}%", "false", $config_contents);
222      }
223  
224 -    $fp = @fopen('../config.inc.php', 'w');
225 +    $fp = @fopen('/etc/webapps/eventum/config.php', 'w');
226      if ($fp === FALSE) {
227          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.";
228      }
229 --- eventum-localization-dev2/setup/index.php~  2006-06-02 00:58:11.321514674 +0300
230 +++ eventum-localization-dev2/setup/index.php   2006-06-02 00:58:46.032294537 +0300
231 @@ -208,11 +208,11 @@
232      exit;
233  }
234  
235 -require_once("../include/Smarty/Smarty.class.php");
236 +require_once("/usr/share/pear/Smarty/Smarty.class.php");
237  
238  $tpl = new Smarty();
239 -$tpl->template_dir = '../templates/';
240 -$tpl->compile_dir = "../templates_c";
241 +$tpl->template_dir = '/usr/share/eventum/templates';
242 +$tpl->compile_dir = "/var/cache/eventum";
243  $tpl->config_dir = '';
244  
245  function replace_table_prefix($str)
246 --- eventum-1.5.5/setup/index.php~      2005-07-26 20:22:06.000000000 +0300
247 +++ eventum-1.5.5/setup/index.php       2005-07-26 20:35:31.000000000 +0300
248 @@ -198,13 +198,7 @@
249      return $html;
250  }
251  
252 -if (stristr(PHP_OS, 'darwin')) {
253 -    ini_set("include_path", ".:./../include/pear/");
254 -} elseif (stristr(PHP_OS, 'win')) {
255 -    ini_set("include_path", ".;./../include/pear/");
256 -} else {
257 -    ini_set("include_path", ".:./../include/pear/");
258 -}
259 +ini_set("include_path", ".:../../include/pear/");
260  require_once("File/Util.php");
261  
262  $html = checkRequirements();
263 --- eventum-localization-dev/include/class.template.php~        2006-04-11 00:16:59.258616656 +0300
264 +++ eventum-localization-dev/include/class.template.php 2006-04-11 00:17:23.649160189 +0300
265 @@ -61,6 +61,7 @@
266          $this->smarty = new Smarty;
267          $this->smarty->template_dir = APP_TPL_PATH;
268          $this->smarty->compile_dir = '/var/cache/eventum';
269 +        $this->smarty->plugins_dir  = array('/usr/share/eventum/include/smarty', 'plugins');
270          $this->smarty->config_dir = '';
271          $this->smarty->register_modifier("activateLinks", array('Link_Filter', 'activateLinks'));
272          $this->smarty->register_modifier("formatCustomValue", array('Custom_Field', 'formatValue'));
273 --- ./include/class.misc.php    2005-10-26 17:17:17.000000000 +0300
274 +++ /tmp/class.misc.php 2005-10-26 17:30:12.000000000 +0300
275 @@ -607,7 +607,7 @@
276       */
277      function highlightQuotedReply($text)
278      {
279 -        require_once(APP_SMARTY_PATH . "plugins/modifier.highlight_quoted.php");
280 +        require_once(APP_INC_PATH. "smarty/modifier.highlight_quoted.php");
281          return smarty_modifier_highlight_quoted($text);
282      }
283  
This page took 0.051434 seconds and 4 git commands to generate.