From 3675b8fcd68dfddfa23009d270f54ad99bd751a4 Mon Sep 17 00:00:00 2001 From: Nils Adermann Date: Sat, 12 Aug 2006 18:46:47 +0000 Subject: - set default_style when the old default style is being deleted - Do not search for moved topics in the premade searches (new/active/unanswered) and if one occurs for whatever reason, at least display it properly [Bug #3756] git-svn-id: file:///svn/phpbb/trunk@6284 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/acp/acp_styles.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'phpBB/includes/acp/acp_styles.php') diff --git a/phpBB/includes/acp/acp_styles.php b/phpBB/includes/acp/acp_styles.php index ff95ddeec0..48277dc487 100644 --- a/phpBB/includes/acp/acp_styles.php +++ b/phpBB/includes/acp/acp_styles.php @@ -1501,7 +1501,7 @@ pagination_sep = \'{PAGINATION_SEP}\' */ function remove($mode, $style_id) { - global $db, $template, $user, $phpbb_root_path, $cache; + global $db, $template, $user, $phpbb_root_path, $cache, $config; $new_id = request_var('new_id', 0); $update = (isset($_POST['update'])) ? true : false; @@ -1582,6 +1582,11 @@ pagination_sep = \'{PAGINATION_SEP}\' SET forum_style = $new_id WHERE forum_style = $style_id"; $db->sql_query($sql); + + if ($style_id == $config['default_style']) + { + set_config('default_style', $new_id); + } } else { -- cgit v1.2.1