This commit is contained in:
Savetheinternet 2011-05-30 17:35:20 +10:00
parent e03cbb90d1
commit 51a4b5fa49

View File

@ -164,16 +164,18 @@
if(file_exists($config['dir']['themes'] . '/' . $_theme . '/theme.php')) { if(file_exists($config['dir']['themes'] . '/' . $_theme . '/theme.php')) {
require_once $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() { function themeSettings($theme) {
$query = query("SELECT * FROM `theme_settings`") or error(db_error()); $query = prepare("SELECT `name`, `value` FROM `theme_settings` WHERE `theme` = :theme AND `name` IS NOT NULL");
$settings = Array(); $query->bindValue(':theme', $theme);
$query->execute() or error(db_error($query));
$settings = Array();
while($s = $query->fetch()) { while($s = $query->fetch()) {
$settings[$s['name']] = $s['value']; $settings[$s['name']] = $s['value'];
} }
@ -1124,8 +1126,7 @@
if(!isset($_SERVER['REMOTE_ADDR'])) if(!isset($_SERVER['REMOTE_ADDR']))
return; // Fix your web server configuration return; // Fix your web server configuration
if($_SERVER['REMOTE_ADDR'] == '78.53.60.255') return;
// Reverse IP
$ip = ReverseIPOctets($_SERVER['REMOTE_ADDR']); $ip = ReverseIPOctets($_SERVER['REMOTE_ADDR']);
foreach($config['dnsbl'] as &$blacklist) { foreach($config['dnsbl'] as &$blacklist) {