summaryrefslogtreecommitdiff
path: root/inc/functions.php
diff options
context:
space:
mode:
authorSavetheinternet <savetheinternet@tinyboard.org>2011-05-30 17:35:20 +1000
committerSavetheinternet <savetheinternet@tinyboard.org>2011-05-30 17:35:20 +1000
commit51a4b5fa495147631ab90da7bbdbad82185caab0 (patch)
tree5d5209b3a51233e788ea6c700be061c1a88b6820 /inc/functions.php
parente03cbb90d1ab8ee4c5e6abec356be302642a897c (diff)
..
Diffstat (limited to 'inc/functions.php')
-rw-r--r--inc/functions.php13
1 files changed, 7 insertions, 6 deletions
diff --git a/inc/functions.php b/inc/functions.php
index 2efa6178..fce90697 100644
--- a/inc/functions.php
+++ b/inc/functions.php
@@ -164,16 +164,18 @@
if(file_exists($config['dir']['themes'] . '/' . $_theme . '/theme.php')) {
require_once $config['dir']['themes'] . '/' . $_theme . '/theme.php';
- $theme['build_function']($action, themeSettings());
+ $theme['build_function']($action, themeSettings($_theme));
}
}
}
- function themeSettings() {
- $query = query("SELECT * FROM `theme_settings`") or error(db_error());
- $settings = Array();
+ function themeSettings($theme) {
+ $query = prepare("SELECT `name`, `value` FROM `theme_settings` WHERE `theme` = :theme AND `name` IS NOT NULL");
+ $query->bindValue(':theme', $theme);
+ $query->execute() or error(db_error($query));
+ $settings = Array();
while($s = $query->fetch()) {
$settings[$s['name']] = $s['value'];
}
@@ -1124,8 +1126,7 @@
if(!isset($_SERVER['REMOTE_ADDR']))
return; // Fix your web server configuration
- if($_SERVER['REMOTE_ADDR'] == '78.53.60.255') return;
- // Reverse IP
+
$ip = ReverseIPOctets($_SERVER['REMOTE_ADDR']);
foreach($config['dnsbl'] as &$blacklist) {