summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
authorMichael Save <savetheinternet@tinyboard.org>2012-03-21 12:00:00 +1100
committerMichael Save <savetheinternet@tinyboard.org>2012-03-21 12:00:00 +1100
commit66b08bafef30dbf93cad2e8d2847bb608d6e2ecf (patch)
treea377bb7747c065b89c40f484b1094f2ee88ccc7c /inc
parent4afd2c7cb2fe7b40f5dd662bd79125bfcfcefbe8 (diff)
Moved messy $config initialization from inc/config.php to inc/functions.php.
Diffstat (limited to 'inc')
-rw-r--r--inc/config.php29
-rw-r--r--inc/functions.php7
2 files changed, 9 insertions, 27 deletions
diff --git a/inc/config.php b/inc/config.php
index a1ced0fc..a8c64dc9 100644
--- a/inc/config.php
+++ b/inc/config.php
@@ -20,33 +20,8 @@
* More information: http://tinyboard.org/wiki/index.php?title=Config
*
*/
-
- /* Ignore this */
- $config = Array(
- 'db' => Array(),
- 'cache' => Array(),
- 'cookies' => Array(),
- 'error' => Array(),
- 'dir' => Array(),
- 'mod' => Array(),
- 'spam' => Array(),
- 'flood_filters' => Array(),
- 'wordfilters' => Array(),
- 'custom_capcode' => Array(),
- 'custom_tripcode' => Array(),
- 'dnsbl' => Array(),
- 'dnsbl_exceptions' => Array(),
- 'remote' => Array(),
- 'allowed_ext' => Array(),
- 'allowed_ext_files' => Array(),
- 'file_icons' => Array(),
- 'footer' => Array(),
- 'stylesheets' => Array(),
- 'additional_javascript' => Array(),
- 'markup' => Array()
- );
- /* End ignore */
-
+
+
/*
* =======================
* General/misc settings
diff --git a/inc/functions.php b/inc/functions.php
index 51af3332..b832d06b 100644
--- a/inc/functions.php
+++ b/inc/functions.php
@@ -25,6 +25,13 @@
if(!isset($_SERVER['REMOTE_ADDR']))
$_SERVER['REMOTE_ADDR'] = '0.0.0.0';
+ $arrays = Array('db', 'cache', 'cookies', 'error', 'dir', 'mod', 'spam', 'flood_filters', 'wordfilters', 'custom_capcode', 'custom_tripcode', 'dnsbl', 'dnsbl_exceptions', 'remote', 'allowed_ext', 'allowed_ext_files', 'file_icons', 'footer', 'stylesheets', 'additional_javascript', 'markup');
+
+ $config = Array();
+ foreach($arrays as $key) {
+ $config[$key] = Array();
+ }
+
require 'inc/config.php';
if (file_exists('inc/instance-config.php')) {
require 'inc/instance-config.php';