From e22f1042fc6debde9eb448efd64321b1a740fda3 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Mon, 14 May 2001 19:41:18 +0000 Subject: - Renamed "hostname.conf" to "setting.php" (cfr. "setting.module"). Note that - when upgrading - you have to rename all your existing configuration files to reflect this change: yourdomain.com.conf -> yourdomain.com.php By default, i.e. if no configuration file is found, setting.php will be used instead. Using the ".php"-extension will fix most configuration/security issues with .htaccess-files ... - Removed some dead code from forum.module. --- includes/common.inc | 8 ++--- includes/hostname.conf | 76 ---------------------------------------------- includes/setting.php | 63 ++++++++++++++++++++++++++++++++++++++ modules/forum.module | 4 +-- modules/forum/forum.module | 4 +-- modules/page.module | 3 +- modules/page/page.module | 3 +- 7 files changed, 69 insertions(+), 92 deletions(-) delete mode 100644 includes/hostname.conf create mode 100644 includes/setting.php diff --git a/includes/common.inc b/includes/common.inc index 5efe00f5a..49b55eb54 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -5,11 +5,7 @@ $na = "na"; function conf_init() { global $HTTP_HOST, $REQUEST_URI; $file = strtolower(strtr($HTTP_HOST ."". substr($REQUEST_URI, 0, strrpos($REQUEST_URI, "/")), "/:", "..")); - while ($file && !file_exists("includes/$file.conf")) { - $file = substr($file, 0, strrpos($file, ".")); - } - if (empty($file) && file_exists("includes/default.conf")) $file = "default"; - return $file; + return file_exists("includes/$file.php") ? $file : "setting"; } function error_handler($errno, $message, $filename, $line, $variables) { @@ -191,7 +187,7 @@ function form_submit($value) { $conf = conf_init(); -include_once "includes/$conf.conf"; +include_once "includes/$conf.php"; include_once "includes/structure.inc"; include_once "includes/database.inc"; include_once "includes/variable.inc"; diff --git a/includes/hostname.conf b/includes/hostname.conf deleted file mode 100644 index 68e6f8df9..000000000 --- a/includes/hostname.conf +++ /dev/null @@ -1,76 +0,0 @@ - "none", - "-1" => "- 1", - "0" => "+ 0", - "+1" => "+ 1", - "+2" => "+ 2", - "+3" => "+ 3", - "+4" => "+ 4", - "+5" => "+ 5"); - -# -# Allowed HTML tags: -# -$allowed_html = "