]> git.pld-linux.org Git - packages/eventum.git/blobdiff - eventum-config.php
- more advanced configuration, almost same as apache one
[packages/eventum.git] / eventum-config.php
index 04f0731043837c64460e12fb68d19ed7939cc890..905954d3d81942468bc84ebc09b9af74c5eb837f 100755 (executable)
@@ -2,14 +2,17 @@
 /*
  * Eventum setup for PLD Linux.
  *
- * This configuration file sets up system paths for eventum.
- * You shouldn't be needing to change anything in this file.
- * All changes should go to /etc/eventum/config.php
- * But, if You do need to change something in this config, please let us know!
+ * This configuration file sets up system paths for Eventum.
+ * You should not change anything in this file.
+ *
+ * All changes should go to %{SYSCONFDIR}%/config.php instead.
+ *
+ * But, if You do need to change something in this config, open bug on that in
+ * http://bugs.pld-linux.org.
  */
 
 ini_set('allow_url_fopen', 0);
-ini_set("display_errors", 0);
+ini_set('display_errors', 0);
 set_time_limit(0);
 set_magic_quotes_runtime(0);
 
@@ -17,51 +20,70 @@ set_magic_quotes_runtime(0);
 ini_set('session.cache_limiter', 'nocache');
 
 // definitions of path related variables
-define("APP_PATH", '/usr/share/eventum/htdocs/');
-define("APP_INC_PATH", "/usr/share/eventum/include/");
-define("APP_PEAR_PATH", APP_INC_PATH . "pear/");
-define("APP_TPL_PATH", "/usr/share/eventum/templates/");
-define("APP_SMARTY_PATH", "/usr/share/pear/Smarty/");
-define("APP_JPGRAPH_PATH", APP_INC_PATH . "jpgraph/");
-define("APP_LOG_PATH", "/var/log/eventum/");
-define("APP_LOCKS_PATH", "/var/run/eventum/");
-ini_set("include_path", ".:" . APP_PEAR_PATH);
-
-define("APP_SETUP_PATH", APP_PATH);
-define("APP_SETUP_FILE", "/etc/eventum/setup.php");
-
-define("APP_ERROR_LOG", APP_LOG_PATH . "errors.log");
-define("APP_CLI_LOG", APP_LOG_PATH . "cli.log");
-define("APP_IRC_LOG", APP_LOG_PATH . "irc_bot.log");
-define("APP_LOGIN_LOG", APP_LOG_PATH . "login_attempts.log");
-
-define("APP_VERSION", "%{APP_VERSION}%");
+define('APP_PATH', '%{APP_PATH}%/htdocs/');
+define('APP_INC_PATH', '%{APP_PATH}%/include/');
+define('APP_PEAR_PATH', '%{PHP_PEAR_DIR}%/');
+define('APP_TPL_PATH', '%{APP_PATH}%/templates/');
+define('APP_SMARTY_PATH', '%{SMARTY_DIR}%/');
+define('APP_JPGRAPH_PATH', APP_INC_PATH . "jpgraph/");
+define('APP_LOG_PATH', '/var/log/eventum/');
+define('APP_LOCKS_PATH', '/var/run/eventum/');
+ini_set('include_path', '.:' . APP_PEAR_PATH);
+
+define('APP_SETUP_PATH', APP_PATH);
+define('APP_SETUP_FILE', '%{SYSCONFDIR}%/setup.php');
+
+define('APP_ERROR_LOG', APP_LOG_PATH . 'errors.log');
+define('APP_CLI_LOG', APP_LOG_PATH . 'cli.log');
+define('APP_IRC_LOG', APP_LOG_PATH . 'irc_bot.log');
+define('APP_LOGIN_LOG', APP_LOG_PATH . 'login_attempts.log');
+
+define('APP_VERSION', '%{APP_VERSION}%');
 
 # include site config
-include_once '/etc/eventum/config.php';
+include_once '%{SYSCONFDIR}%/config.php';
 
 // define the user_id of system user
 if (!defined('APP_SYSTEM_USER_ID')) {
-    define("APP_SYSTEM_USER_ID", 1);
+    define('APP_SYSTEM_USER_ID', 1);
 }
 
 // if full text searching is enabled
 if (!defined('APP_ENABLE_FULLTEXT')) {
-    define("APP_ENABLE_FULLTEXT", false);
+    define('APP_ENABLE_FULLTEXT', false);
 }
 
 if (!defined('APP_BENCHMARK')) {
-    define("APP_BENCHMARK", false);
+    define('APP_BENCHMARK', false);
+}
+
+if (!defined('APP_DEFAULT_ASSIGNED_EMAILS')) {
+    define('APP_DEFAULT_ASSIGNED_EMAILS', 1);
+}
+if (!defined('APP_DEFAULT_NEW_EMAILS')) {
+    define('APP_DEFAULT_NEW_EMAILS', 0);
+}
+if (!defined('APP_COOKIE_URL')) {
+    define('APP_COOKIE_URL', APP_RELATIVE_URL);
+}
+if (!defined('APP_COOKIE_DOMAIN')) {
+    define('APP_COOKIE_DOMAIN', APP_HOSTNAME);
+}
+if (!defined('APP_HASH_TYPE')) {
+    define('APP_HASH_TYPE', 'MD5');
+}
+if (!defined('APP_DEFAULT_LOCALE')) {
+    define('APP_DEFAULT_LOCALE', 'en_US');
 }
 
 if (APP_BENCHMARK) {
     // always benchmark the scripts
-    include_once("Benchmark/Timer.php");
+    require_once 'Benchmark/Timer.php';
     $bench = new Benchmark_Timer;
     $bench->start();
 }
 
-include_once(APP_INC_PATH . "class.misc.php");
+include_once APP_INC_PATH . 'class.misc.php';
 
 if (isset($_GET)) {
     $HTTP_POST_VARS = $_POST;
@@ -77,16 +99,16 @@ if (isset($_GET)) {
 }
 
 // fix magic_quote_gpc'ed values (i wish i knew who is the person behind this)
-$HTTP_GET_VARS =& Misc::dispelMagicQuotes($HTTP_GET_VARS);
-$HTTP_POST_VARS =& Misc::dispelMagicQuotes($HTTP_POST_VARS);
-$_REQUEST =& Misc::dispelMagicQuotes($_REQUEST);
+$HTTP_GET_VARS = Misc::dispelMagicQuotes($HTTP_GET_VARS);
+$HTTP_POST_VARS = Misc::dispelMagicQuotes($HTTP_POST_VARS);
+$_REQUEST = Misc::dispelMagicQuotes($_REQUEST);
 
 // handle the language preferences now
-include_once(APP_INC_PATH . "class.language.php");
+include_once(APP_INC_PATH . 'class.language.php');
 Language::setPreference();
 
 // set charset
-header("Content-Type: text/html; charset=" . APP_CHARSET);
+header('Content-Type: text/html; charset=' . APP_CHARSET);
 
 /* vim: set expandtab tabstop=4 shiftwidth=4: */
 ?>
This page took 0.066576 seconds and 4 git commands to generate.