From 855947f56625d0a362f4934c3e9e26cba3483fa2 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Sun, 1 Jul 2007 11:04:44 +0000 Subject: [PATCH] let's try to correctly catch some conditions as well as letting the cache being updated correctly git-svn-id: file:///svn/phpbb/trunk@7816 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/acp/acp_styles.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/phpBB/includes/acp/acp_styles.php b/phpBB/includes/acp/acp_styles.php index 4ab4420e6f..1ef80c34b1 100644 --- a/phpBB/includes/acp/acp_styles.php +++ b/phpBB/includes/acp/acp_styles.php @@ -739,6 +739,8 @@ parse_css_file = {PARSE_CSS_FILE} // destroy the cached version of the template (filename without extension) $this->clear_template_cache($template_info, array(substr($template_file, 0, -5))); + $cache->destroy('sql', STYLES_TABLE); + add_log('admin', 'LOG_TEMPLATE_EDIT', $template_info['template_name'], $template_file); trigger_error($user->lang['TEMPLATE_FILE_UPDATED'] . $additional . adm_back_link($this->u_action . "&action=edit&id=$template_id&text_rows=$text_rows&template_file=$template_file")); } @@ -2164,6 +2166,11 @@ parse_css_file = {PARSE_CSS_FILE} $db->sql_query($sql); } } + else if (!$store_db && !$safe_mode) + { + $store_db = 1; + $error[] = $user->lang['EDIT_TEMPLATE_STORED_DB']; + } else if ($store_db) { $filelist = filelist("{$phpbb_root_path}styles/{$style_row['template_path']}/template", '', 'html');