aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
authorNils Adermann <naderman@naderman.de>2006-08-12 18:46:47 +0000
committerNils Adermann <naderman@naderman.de>2006-08-12 18:46:47 +0000
commit3675b8fcd68dfddfa23009d270f54ad99bd751a4 (patch)
treecf95041c310899de7703a2d7861b26a02a1684e5 /phpBB/includes
parent31cf21e3c2232ed76c4309f6736c5775b3eb057e (diff)
downloadforums-3675b8fcd68dfddfa23009d270f54ad99bd751a4.tar
forums-3675b8fcd68dfddfa23009d270f54ad99bd751a4.tar.gz
forums-3675b8fcd68dfddfa23009d270f54ad99bd751a4.tar.bz2
forums-3675b8fcd68dfddfa23009d270f54ad99bd751a4.tar.xz
forums-3675b8fcd68dfddfa23009d270f54ad99bd751a4.zip
- 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
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/acp/acp_styles.php7
1 files changed, 6 insertions, 1 deletions
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
{