]> git.pld-linux.org Git - packages/eventum.git/blob - eventum-paths.patch
- fix paths for process_mail_queue, download_emails
[packages/eventum.git] / eventum-paths.patch
1 --- eventum/misc/cli/config.inc.php     2007-01-30 20:32:58.965186306 +0200
2 +++ eventum/misc/cli/config.inc.php     2007-01-30 20:57:01.887651515 +0200
3 @@ -32,9 +32,8 @@
4  set_time_limit(0);
5  
6  // definitions of path related variables
7 -define('APP_PATH', dirname(__FILE__) . '/');
8 -define('APP_INC_PATH', APP_PATH . 'include/');
9 -define('APP_PEAR_PATH', APP_INC_PATH . 'pear/');
10 +define('APP_INC_PATH', '/usr/share/eventum/cli/');
11 +define('APP_PEAR_PATH', '/usr/share/pear/');
12  define('APP_BENCHMARK', false);
13  
14  set_include_path(get_include_path() . PATH_SEPARATOR . APP_PEAR_PATH);
15 --- eventum/include/class.template.php~ 2007-01-30 18:52:59.020179406 +0200
16 +++ eventum/include/class.template.php  2007-01-30 18:53:24.620759076 +0200
17 @@ -61,6 +61,7 @@
18          $this->smarty = new Smarty;
19          $this->smarty->template_dir = APP_TPL_PATH;
20          $this->smarty->compile_dir = APP_TPL_COMPILE_PATH;
21 +        $this->smarty->plugins_dir  = array('/usr/share/eventum/include/smarty', 'plugins');
22          $this->smarty->config_dir = '';
23          $this->smarty->register_modifier("activateLinks", array('Link_Filter', 'activateLinks'));
24          $this->smarty->register_modifier("formatCustomValue", array('Custom_Field', 'formatValue'));
25 --- ./include/class.monitor.php~        2005-02-22 21:50:49.000000000 +0200
26 +++ ./include/class.monitor.php 2005-02-22 23:04:50.000000000 +0200
27 @@ -157,6 +165,7 @@
28                  'permission'       => 100,
29              ),
30          );
31 +        $required_directories = array();
32          foreach ($required_directories as $dir_path => $options) {
33              // check if directory exists
34              if (!file_exists($dir_path)) {
35 --- ./include/class.misc.php    2005-10-26 17:17:17.000000000 +0300
36 +++ /tmp/class.misc.php 2005-10-26 17:30:12.000000000 +0300
37 @@ -607,7 +607,7 @@
38       */
39      function highlightQuotedReply($text)
40      {
41 -        require_once(APP_SMARTY_PATH . "plugins/modifier.highlight_quoted.php");
42 +        require_once(APP_INC_PATH. "smarty/modifier.highlight_quoted.php");
43          return smarty_modifier_highlight_quoted($text);
44      }
45  
46 --- eventum/init.php    2007-01-30 19:05:56.897776515 +0200
47 +++ eventum/init.php    2007-01-30 20:12:31.017572265 +0200
48 @@ -27,5 +27,5 @@
49  // +----------------------------------------------------------------------+
50  
51 -if (!file_exists(dirname(__FILE__) . '/config/config.php')) {
52 +if (!file_exists('/etc/webapps/eventum/config.php')) {
53      Header('Location: setup/');
54      exit;
55 @@ -43,31 +43,31 @@
56  define('APP_VERSION', '2.0-alpha');
57  
58  // define base path
59 -define('APP_PATH', realpath(dirname(__FILE__)) . '/');
60 -define('APP_CONFIG_PATH', APP_PATH . 'config/');
61 +define('APP_PATH', '/usr/share/eventum/htdocs/');
62 +define('APP_CONFIG_PATH', '/etc/webapps/eventum/');
63  
64  // include local site config
65  require_once APP_CONFIG_PATH . 'config.php';
66  
67  // define other paths
68  if (!defined('APP_INC_PATH')) {
69 -    define('APP_INC_PATH', APP_PATH . 'include/');
70 +    define('APP_INC_PATH', '/usr/share/eventum/include/');
71  }
72  
73  if (!defined('APP_PEAR_PATH')) {
74 -    define('APP_PEAR_PATH', APP_INC_PATH . 'pear/');
75 +    define('APP_PEAR_PATH', '/usr/share/pear/');
76  }
77  
78  if (!defined('APP_TPL_PATH')) {
79 -    define('APP_TPL_PATH', APP_PATH . 'templates/');
80 +    define('APP_TPL_PATH', '/usr/share/eventum/templates/');
81  }
82  
83  if (!defined('APP_TPL_COMPILE_PATH')) {
84 -    define('APP_TPL_COMPILE_PATH', APP_PATH . 'templates_c');
85 +    define('APP_TPL_COMPILE_PATH', '/var/cache/eventum/');
86  }
87  
88  if (!defined('APP_SMARTY_PATH')) {
89 -    define('APP_SMARTY_PATH', APP_INC_PATH . 'Smarty/');
90 +    define('APP_SMARTY_PATH', '/usr/share/php/Smarty/');
91  }
92  
93  if (!defined('APP_JPGRAPH_PATH')) {
94 @@ -75,7 +75,7 @@
95  }
96  
97  if (!defined('APP_LOCKS_PATH')) {
98 -    define('APP_LOCKS_PATH', APP_PATH . 'locks/');
99 +    define('APP_LOCKS_PATH', '/var/run/eventum/');
100  }
101  
102  if (!defined('APP_SETUP_FILE')) {
103 @@ -83,7 +83,7 @@
104  }
105  
106  if (!defined('APP_LOG_PATH')) {
107 -    define('APP_LOG_PATH', APP_PATH . 'logs/');
108 +    define('APP_LOG_PATH', '/var/log/eventum/');
109  }
110  
111  if (!defined('APP_ERROR_LOG')) {
112 --- eventum/setup/index.php~    2007-01-30 20:04:32.306824546 +0200
113 +++ eventum/setup/index.php     2007-01-30 20:14:43.880555938 +0200
114 @@ -38,17 +38,17 @@
115  set_time_limit(0);
116  define('APP_CHARSET', 'UTF-8');
117  define('APP_DEFAULT_LOCALE', 'en_US');
118 -define('APP_PATH', realpath(dirname(__FILE__) . '/..') . '/');
119 +define('APP_PATH', realpath(dirname(__FILE__) . '/../..') . '/');
120  define('APP_INC_PATH', APP_PATH . 'include/');
121  define('APP_PEAR_PATH', APP_INC_PATH . 'pear/');
122 -define('APP_SMARTY_PATH', APP_INC_PATH . 'Smarty/');
123 -define('APP_CONFIG_PATH', APP_PATH . 'config/');
124 +define('APP_SMARTY_PATH', '/usr/share/php/Smarty/');
125 +define('APP_CONFIG_PATH', '/etc/webapps/eventum/');
126  define('APP_SETUP_FILE', APP_CONFIG_PATH . 'setup.php');
127  define('APP_TPL_PATH', APP_PATH . 'templates/');
128 -define('APP_TPL_COMPILE_PATH', APP_PATH . 'templates_c');
129 -define('APP_LOG_PATH', APP_PATH . 'logs/');
130 +define('APP_TPL_COMPILE_PATH', '/var/cache/eventum');
131 +define('APP_LOG_PATH', '/var/log/eventum/');
132  define('APP_ERROR_LOG', APP_LOG_PATH . 'errors.log');
133 -define('APP_LOCKS_PATH', APP_PATH . 'locks/');
134 +define('APP_LOCKS_PATH', '/var/run/eventum/');
135  
136  define('APP_BENCHMARK', false);
137  
138 @@ -192,10 +192,6 @@
139      if (ini_get('file_uploads') != "1") {
140          $errors[] = "The 'file_uploads' directive needs to be enabled in your PHP.INI file in order for Eventum to work properly.";
141      }
142 -    $error = checkPermissions(APP_CONFIG_PATH, "Directory '" . APP_CONFIG_PATH . "'", TRUE);
143 -    if (!empty($error)) {
144 -        $errors[] = $error;
145 -    }
146      $error = checkPermissions(APP_LOCKS_PATH, "Directory '" . APP_LOCKS_PATH . "'", TRUE);
147      if (!empty($error)) {
148          $errors[] = $error;
149 @@ -329,10 +325,6 @@
150      $setup_file_path = APP_SETUP_FILE;
151  
152      clearstatcache();
153 -    // check if config directory is writable
154 -    if (!is_writable(APP_CONFIG_PATH)) {
155 -        return "The file '" . APP_CONFIG_PATH . "' directory needs to be writable by the web server user. Please correct this problem and try again.";
156 -    }
157      // need to create a random private key variable
158      $private_key = '<?php
159  $private_key = "' . md5(microtime()) . '";
160 --- eventum/misc/cli/eventum~   2007-01-30 20:33:31.435916994 +0200
161 +++ eventum/misc/cli/eventum    2007-01-30 20:34:58.717881130 +0200
162 @@ -13,3 +13,3 @@
163  //
164 -require_once(dirname(__FILE__) . '/config.inc.php');
165 +require_once('/etc/eventum/cli.php');
166  require_once(APP_INC_PATH . 'class.command_line.php');
167 --- eventum/misc/process_mail_queue.php~        2007-02-15 00:31:11.000000000 +0200
168 +++ eventum/misc/process_mail_queue.php 2007-02-15 01:02:15.704386785 +0200
169 @@ -30,7 +30,7 @@
170  
171  ini_set("memory_limit", "1024M");
172  
173 -require_once(dirname(__FILE__) . "/../init.php");
174 +require_once(dirname(__FILE__) . "/htdocs/init.php");
175  require_once(APP_INC_PATH . "db_access.php");
176  require_once(APP_INC_PATH . "class.mail_queue.php");
177  
178 --- eventum/misc/download_emails.php~   2007-02-15 00:31:11.000000000 +0200
179 +++ eventum/misc/download_emails.php    2007-02-15 01:02:56.183553358 +0200
180 @@ -30,7 +30,7 @@
181  
182  ini_set("memory_limit", "1024M");
183  
184 -require_once(dirname(__FILE__) . "/../init.php");
185 +require_once(dirname(__FILE__) . "/htdocs/init.php");
186  require_once(APP_INC_PATH . "class.support.php");
187  require_once(APP_INC_PATH . "class.lock.php");
188  require_once(APP_INC_PATH . "class.project.php");
This page took 0.064423 seconds and 4 git commands to generate.