]> git.pld-linux.org Git - packages/eventum.git/blob - eventum-paths.patch
- updated
[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/misc/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.c/include/class.template.php    2005-01-05 01:05:59.000000000 +0200
34 +++ eventum-1.4/include/class.template.php      2005-01-24 17:22:35.000000000 +0200
35 @@ -60,7 +60,7 @@
36      {
37          $this->smarty = new Smarty;
38          $this->smarty->template_dir = APP_PATH . "templates/" . APP_CURRENT_LANG;
39 -        $this->smarty->compile_dir = APP_PATH . "templates_c";
40 +        $this->smarty->compile_dir = "/var/cache/eventum";
41          $this->smarty->config_dir = '';
42          $this->smarty->register_modifier("activateLinks", array('Link_Filter', 'processText'));
43      }
44 --- eventum-1.4.orig/setup/index.php    2005-01-25 23:42:55.000000000 +0200
45 +++ eventum-1.4/setup/index.php 2005-01-25 23:46:14.000000000 +0200
46 @@ -114,15 +114,15 @@
47      if (ini_get('allow_call_time_pass_reference') != "1") {
48          $errors[] = "The 'allow_call_time_pass_reference' directive needs to be enabled in your PHP.INI file in order for Eventum to work properly.";
49      }
50 -    $error = checkPermissions('../locks', "Directory 'locks'", TRUE);
51 +    $error = checkPermissions('/var/run/eventum', "Directory '/var/run/eventum'", TRUE);
52      if (!empty($error)) {
53          $errors[] = $error;
54      }
55 -    $error = checkPermissions('../logs', "Directory 'logs'", TRUE);
56 +    $error = checkPermissions('/var/log/eventum', "Directory '/var/log/eventum'", TRUE);
57      if (!empty($error)) {
58          $errors[] = $error;
59      }
60 -    $error = checkPermissions('../templates_c', "Directory 'templates_c'", TRUE);
61 +    $error = checkPermissions('/var/cache/eventum', "Directory '/var/cache/eventum'", TRUE);
62      if (!empty($error)) {
63          $errors[] = $error;
64      }
65 @@ -130,7 +130,7 @@
66      if (!empty($error)) {
67          $errors[] = $error;
68      }
69 -    $error = checkPermissions('../logs/errors.log', "File 'logs/errors.log'");
70 +    $error = checkPermissions('/var/log/eventum/errors.log', "File '/var/log/eventum/errors.log'");
71      if (!empty($error)) {
72          $errors[] = $error;
73      }
74 @@ -203,7 +203,7 @@
75  
76  $tpl = new Smarty();
77  $tpl->template_dir = '../templates/en';
78 -$tpl->compile_dir = "../templates_c";
79 +$tpl->compile_dir = "/var/cache/eventum";
80  $tpl->config_dir = '';
81  
82  function replace_table_prefix($str)
83 @@ -417,23 +417,8 @@
84      $tpl->assign('is_imap_enabled', function_exists('imap_open'));
85  }
86  
87 -
88 -$full_url = dirname($HTTP_SERVER_VARS['PHP_SELF']);
89 -$pieces = explode("/", $full_url);
90 -$relative_url = array();
91 -$relative_url[] = '';
92 -foreach ($pieces as $piece) {
93 -    if ((!empty($piece)) && ($piece != 'setup')) {
94 -        $relative_url[] = $piece;
95 -    }
96 -}
97 -$relative_url[] = '';
98 -$relative_url = implode("/", $relative_url);
99 -
100 -if (substr($HTTP_SERVER_VARS['DOCUMENT_ROOT'], -1) == '/') {
101 -    $HTTP_SERVER_VARS['DOCUMENT_ROOT'] = substr($HTTP_SERVER_VARS['DOCUMENT_ROOT'], 0, -1);
102 -}
103 -$installation_path = $HTTP_SERVER_VARS['DOCUMENT_ROOT'] . $relative_url;
104 +$installation_path = "/usr/share/eventum";
105 +$relative_url = "/eventum/";
106  
107  $tpl->assign("phpversion", phpversion());
108  $tpl->assign("rel_url", $relative_url);
109 --- eventum-1.4/setup/index.php~        2005-01-25 23:52:31.000000000 +0200
110 +++ eventum-1.4/setup/index.php 2005-01-25 23:52:33.000000000 +0200
111 @@ -199,7 +199,7 @@
112  }
113  
114  ini_set("include_path", '.');
115 -include_once("../include/Smarty/Smarty.class.php");
116 +include_once("/usr/share/pear/Smarty/Smarty.class.php");
117  
118  $tpl = new Smarty();
119  $tpl->template_dir = '../templates/en';
120 --- eventum-1.4/setup/config.inc.php    2005-02-22 19:33:23.000000000 +0200
121 +++ eventum-1.4.z/setup/config.inc.php  2005-02-22 19:32:42.000000000 +0200
122 @@ -27,49 +27,6 @@
123  //
124  // @(#) $Id$
125  //
126 -ini_set('allow_url_fopen', 0);
127 -ini_set("display_errors", 0);
128 -error_reporting(0);
129 -set_time_limit(0);
130 -// prevent session from messing up the browser cache
131 -ini_set('session.cache_limiter', 'nocache');
132 -
133 -// only needed for older PHP versions
134 -if (!function_exists('is_a')) {
135 -    function is_a($object, $class_name)
136 -    {
137 -        $class_name = strtolower($class_name);
138 -        if (get_class($object) == $class_name) {
139 -            return TRUE;
140 -        } else {
141 -            return is_subclass_of($object, $class_name);
142 -        }
143 -    }
144 -}
145 -
146 -// definitions of path related variables
147 -$app_path = '%{APP_PATH}%';
148 -if ((substr($app_path, -1) != '/') && (substr($app_path, -2) != '\\')) {
149 -    $app_path .= '/';
150 -}
151 -@define("APP_PATH", $app_path);
152 -@define("APP_INC_PATH", APP_PATH . "include/");
153 -@define("APP_PEAR_PATH", APP_INC_PATH . "pear/");
154 -@define("APP_TPL_PATH", APP_PATH . "templates/");
155 -@define("APP_SMARTY_PATH", APP_INC_PATH . "Smarty/");
156 -@define("APP_JPGRAPH_PATH", APP_INC_PATH . "jpgraph/");
157 -@define("APP_LOG_PATH", APP_PATH . "logs/");
158 -@define("APP_LOCKS_PATH", APP_PATH . "locks/");
159 -if (stristr(PHP_OS, 'darwin')) {
160 -    ini_set("include_path", ".:" . APP_PEAR_PATH);
161 -} elseif (stristr(PHP_OS, 'win')) {
162 -    ini_set("include_path", ".;" . APP_PEAR_PATH);
163 -} else {
164 -    ini_set("include_path", ".:" . APP_PEAR_PATH);
165 -}
166 -
167 -@define("APP_SETUP_PATH", APP_PATH);
168 -@define("APP_SETUP_FILE", APP_SETUP_PATH . "setup.conf.php");
169  
170  // definitions of SQL variables
171  @define("APP_SQL_DBTYPE", "mysql");
172 @@ -82,11 +39,6 @@
173  @define("APP_DEFAULT_DB", APP_SQL_DBNAME);
174  @define("APP_TABLE_PREFIX", "%{APP_TABLE_PREFIX}%");
175  
176 -@define("APP_ERROR_LOG", APP_LOG_PATH . "errors.log");
177 -@define("APP_CLI_LOG", APP_LOG_PATH . "cli.log");
178 -@define("APP_IRC_LOG", APP_LOG_PATH . "irc_bot.log");
179 -@define("APP_LOGIN_LOG", APP_LOG_PATH . "login_attempts.log");
180 -
181  @define("APP_NAME", "Eventum");
182  @define("APP_SHORT_NAME", APP_NAME); // used in the subject of notification emails
183  @define("APP_URL", "http://www.mysql.com/products/eventum/");
184 @@ -99,8 +51,6 @@
185  @define("APP_PROJECT_COOKIE", "eventum_project");
186  @define("APP_PROJECT_COOKIE_EXPIRE", time() + (60 * 60 * 24));
187  
188 -@define("APP_VERSION", "%{APP_VERSION}%");
189 -
190  @define("APP_LIST_COOKIE", 'eventum_list');
191  @define("APP_LIST_COOKIE_EXPIRE", time() + (60 * 60 * 24 * 30 * 48));
192  @define("APP_EMAIL_LIST_COOKIE", 'eventum_email_list');
193 @@ -118,39 +68,6 @@
194  @define("APP_CYCLE_COLORS", "#DDDDDD,#CACACA");
195  @define("APP_INTERNAL_COLOR", "#9C494B");
196  
197 -// define the user_id of system user
198 -@define("APP_SYSTEM_USER_ID", 1);
199 -
200  @define("APP_BENCHMARK", false);
201 -if (APP_BENCHMARK) {
202 -    // always benchmark the scripts
203 -    include_once("Benchmark/Timer.php");
204 -    $bench = new Benchmark_Timer;
205 -    $bench->start();
206 -}
207 -
208 -include_once(APP_INC_PATH . "class.misc.php");
209 -
210 -if (isset($_GET)) {
211 -    $HTTP_POST_VARS = $_POST;
212 -    $HTTP_GET_VARS = $_GET;
213 -    $HTTP_SERVER_VARS = $_SERVER;
214 -    $HTTP_ENV_VARS = $_ENV;
215 -    $HTTP_POST_FILES = $_FILES;
216 -    // seems like PHP 4.1.0 didn't implement the $_SESSION auto-global...
217 -    if (isset($_SESSION)) {
218 -        $HTTP_SESSION_VARS = $_SESSION;
219 -    }
220 -    $HTTP_COOKIE_VARS = $_COOKIE;
221 -}
222 -// fix magic_quote_gpc'ed values (i wish i knew who is the person behind this)
223 -$HTTP_GET_VARS =& Misc::dispelMagicQuotes($HTTP_GET_VARS);
224 -$HTTP_POST_VARS =& Misc::dispelMagicQuotes($HTTP_POST_VARS);
225 -
226 -// handle the language preferences now
227 -@include_once(APP_INC_PATH . "class.language.php");
228 -Language::setPreference();
229 -
230 -// set charset
231 -header("content-type: text/html;charset=" . APP_CHARSET);
232 -?>
233 \ No newline at end of file
234 +
235 +?>
This page took 0.075215 seconds and 4 git commands to generate.