diff options
| author | Meik Sievertsen <acydburn@phpbb.com> | 2008-04-21 10:55:47 +0000 |
|---|---|---|
| committer | Meik Sievertsen <acydburn@phpbb.com> | 2008-04-21 10:55:47 +0000 |
| commit | f2ba40f294d8e9e75a3adb78eedb2dc47633043e (patch) | |
| tree | 0fc747cb58f585f0e90533505b876a22ed18dbac | |
| parent | 0cf75b2546120f69bfc7fe2b26c1a871aa460818 (diff) | |
| download | forums-f2ba40f294d8e9e75a3adb78eedb2dc47633043e.tar forums-f2ba40f294d8e9e75a3adb78eedb2dc47633043e.tar.gz forums-f2ba40f294d8e9e75a3adb78eedb2dc47633043e.tar.bz2 forums-f2ba40f294d8e9e75a3adb78eedb2dc47633043e.tar.xz forums-f2ba40f294d8e9e75a3adb78eedb2dc47633043e.zip | |
merge
git-svn-id: file:///svn/phpbb/trunk@8515 89ea8834-ac86-4346-8a33-228a782c2dd0
| -rw-r--r-- | phpBB/download/file.php | 6 | ||||
| -rw-r--r-- | phpBB/style.php | 4 |
2 files changed, 8 insertions, 2 deletions
diff --git a/phpBB/download/file.php b/phpBB/download/file.php index 570625cee5..f40f3cf09d 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 575715b605..cd9f8bd9d7 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); |
