diff options
author | Dries Buytaert <dries@buytaert.net> | 2001-05-14 19:41:18 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2001-05-14 19:41:18 +0000 |
commit | e22f1042fc6debde9eb448efd64321b1a740fda3 (patch) | |
tree | 9cdc1746d10646674b176ba90010d3c9e21cf837 | |
parent | 8ec1018384d1a5f66e1c74728f185ee2fc803c06 (diff) | |
download | brdo-e22f1042fc6debde9eb448efd64321b1a740fda3.tar.gz brdo-e22f1042fc6debde9eb448efd64321b1a740fda3.tar.bz2 |
- 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.
-rw-r--r-- | includes/common.inc | 8 | ||||
-rw-r--r-- | includes/setting.php (renamed from includes/hostname.conf) | 21 | ||||
-rw-r--r-- | modules/forum.module | 4 | ||||
-rw-r--r-- | modules/forum/forum.module | 4 | ||||
-rw-r--r-- | modules/page.module | 3 | ||||
-rw-r--r-- | modules/page/page.module | 3 |
6 files changed, 10 insertions, 33 deletions
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 = "<I>na</I>"; 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/setting.php index 68e6f8df9..dbbc5eec6 100644 --- a/includes/hostname.conf +++ b/includes/setting.php @@ -1,21 +1,5 @@ <?php -# IMPORTANT! -# Extract from the Drupal handbook: -# "5.Rename the configuration file includes/hostname.conf to match your -# server's hostname: -# $ cp includes/hostname.conf includes/www.yourdomain.com.conf -# /'s and :'s are translated to .'s. So if the URI of your drupal site -# would be http://www.yourdomain.com:80/foo/ your configuration file -# should be named www.yourdomain.com.80.foo.conf." -# -# If you intend to support multiple domains or vhosts with different -# configurations make sure you read: -# http://www.drop.org/node.php?id=173. -# -# If you are going to only use one domain/vhost, or the same -# configuration for several domains you can still use the domain.conf -# format, or simply rename this file to default.conf. # # Database settings: @@ -73,4 +57,7 @@ $themes = array("UnConeD" => array( #$language = array(); // = language support disabled $languages = array("en" => "English"); -?> +# This line prevents users from accessing your settings file: +die(); + +?>
\ No newline at end of file diff --git a/modules/forum.module b/modules/forum.module index a414a47a0..5a14831c1 100644 --- a/modules/forum.module +++ b/modules/forum.module @@ -1,7 +1,5 @@ <?php -$format = array(0 => HTML, 1 => PHP, 2 => text); - function forum_status() { return array(dumped, posted); } @@ -13,7 +11,7 @@ function forum_view($node) { } function forum_form($edit = array()) { - global $format, $REQUEST_URI; + global $REQUEST_URI; $form .= form_textfield(t("Subject"), "title", $edit[title], 50, 64); $form .= structure_form("forum", $edit); diff --git a/modules/forum/forum.module b/modules/forum/forum.module index a414a47a0..5a14831c1 100644 --- a/modules/forum/forum.module +++ b/modules/forum/forum.module @@ -1,7 +1,5 @@ <?php -$format = array(0 => HTML, 1 => PHP, 2 => text); - function forum_status() { return array(dumped, posted); } @@ -13,7 +11,7 @@ function forum_view($node) { } function forum_form($edit = array()) { - global $format, $REQUEST_URI; + global $REQUEST_URI; $form .= form_textfield(t("Subject"), "title", $edit[title], 50, 64); $form .= structure_form("forum", $edit); diff --git a/modules/page.module b/modules/page.module index 4ee31c81f..c1c380a11 100644 --- a/modules/page.module +++ b/modules/page.module @@ -1,7 +1,6 @@ <?php -global $format; -$format = array(0 => "HTML", 1 => "PHP", 2 => "text"); +$GLOBALS[format] = array(0 => HTML, 1 => PHP, 2 => text); function page_view($node, $main = 0) { global $format, $theme; diff --git a/modules/page/page.module b/modules/page/page.module index 4ee31c81f..c1c380a11 100644 --- a/modules/page/page.module +++ b/modules/page/page.module @@ -1,7 +1,6 @@ <?php -global $format; -$format = array(0 => "HTML", 1 => "PHP", 2 => "text"); +$GLOBALS[format] = array(0 => HTML, 1 => PHP, 2 => text); function page_view($node, $main = 0) { global $format, $theme; |