diff --git a/phpBB/adm/admin_styles.php b/phpBB/adm/admin_styles.php index 69fc9a2076..c51fffea88 100644 --- a/phpBB/adm/admin_styles.php +++ b/phpBB/adm/admin_styles.php @@ -590,6 +590,8 @@ switch ($mode) 'login' => array( 'login_body.html', 'login_forum.html', ), + 'bbcode' => array( + 'b', 'u', 'i', 'color', 'size', 'flash', 'img', 'url', 'email', 'code', 'quote', 'quote_username', 'listitem', 'olist', 'ulist'), 'custom' => array(), ); @@ -597,7 +599,6 @@ switch ($mode) switch ($action) { case 'cache': - $sql = 'SELECT * FROM ' . STYLES_TPL_TABLE . " WHERE template_id = $template_id"; @@ -633,6 +634,87 @@ switch ($mode) trigger_error($user->lang['TEMPLATE_CACHE_CLEARED']); } + if (!empty($_GET['source']) && file_exists($phpbb_root_path . 'cache/' . $cache_prefix . '_' . $_GET['source'] . '.html.' . $phpEx)) + { + adm_page_header($user->lang['TEMPLATE_CACHE']); + +?> + +
+ +', '', '
','[', ']', '.');
+ $str_to = array(' ';
+ $str_to[] = '';
+ $str_from[] = '<?php ';
+ $str_to[] = '';
+ $str_from[] = '?>';
+ $str_to[] = '';
+ }
+
+ $code = str_replace($str_from, $str_to, $code);
+ $code = preg_replace('#^()\n?(.*?)\n?()$#is', '\1\2\3', $code);
+ $code = explode("$marker", $code);
+
+?>
+
++ | $j) + { + $indent = substr($indent, 0, -6); + $j++; + } + unset($code[$key]); + +?> | +