From 176bd7144ce124c8cd830cf0abb585e8bc7eac4c Mon Sep 17 00:00:00 2001 From: acydburn Date: Mon, 21 Apr 2008 10:55:47 +0000 Subject: [PATCH] merge git-svn-id: http://code.phpbb.com/svn/phpbb/trunk@8515 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/download/file.php | 6 ++++++ phpBB/style.php | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/phpBB/download/file.php b/phpBB/download/file.php index 570625cee..f40f3cf09 100644 --- a/phpBB/download/file.php +++ b/phpBB/download/file.php @@ -18,6 +18,12 @@ $phpEx = substr(strrchr(__FILE__, '.'), 1); if (isset($_GET['avatar'])) { require($phpbb_root_path . 'config.' . $phpEx); + + if (!defined('PHPBB_INSTALLED') || empty($dbms) || empty($acm_type)) + { + exit; + } + require($phpbb_root_path . 'includes/acm/acm_' . $acm_type . '.' . $phpEx); require($phpbb_root_path . 'includes/cache.' . $phpEx); require($phpbb_root_path . 'includes/db/' . $dbms . '.' . $phpEx); diff --git a/phpBB/style.php b/phpBB/style.php index 575715b60..cd9f8bd9d 100644 --- a/phpBB/style.php +++ b/phpBB/style.php @@ -96,7 +96,7 @@ if ($id) $user = array('user_id' => ANONYMOUS); } - $sql = 'SELECT s.style_id, c.theme_data, c.theme_path, c.theme_name, c.theme_mtime, i.*, t.template_path + $sql = 'SELECT s.style_id, c.theme_id, c.theme_data, c.theme_path, c.theme_name, c.theme_mtime, i.*, t.template_path FROM ' . STYLES_TABLE . ' s, ' . STYLES_TEMPLATE_TABLE . ' t, ' . STYLES_THEME_TABLE . ' c, ' . STYLES_IMAGESET_TABLE . ' i WHERE s.style_id = ' . $id . ' AND t.template_id = s.template_id @@ -198,7 +198,7 @@ if ($id) // @TODO: rewrite with the new param db functions $sql = 'UPDATE ' . STYLES_THEME_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . " - WHERE theme_id = $id"; + WHERE theme_id = {$theme['theme_id']}"; $db->sql_query($sql); $cache->destroy('sql', STYLES_THEME_TABLE); -- 2.11.4.GIT