mirror of
https://github.com/phpbb/phpbb.git
synced 2025-05-05 23:25:30 +02:00
Revisiting #11024
Making a few things prettier in the progress. git-svn-id: file:///svn/phpbb/trunk@7607 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
89aff52727
commit
6814ab81d7
@ -1,7 +1,7 @@
|
||||
<!-- INCLUDE simple_header.html -->
|
||||
<div id="acp">
|
||||
<div class="panel" style="padding: 10px;">
|
||||
|
||||
<div style="overflow: auto;">
|
||||
<h1>{FILENAME}</h1>
|
||||
|
||||
<table>
|
||||
@ -15,6 +15,7 @@
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- INCLUDE simple_footer.html -->
|
@ -934,13 +934,13 @@ parse_css_file = {PARSE_CSS_FILE}
|
||||
$marker = 'MARKER' . time();
|
||||
$code = highlight_string(str_replace("\n", $marker, $code), true);
|
||||
$code = str_replace($marker, "\n", $code);
|
||||
|
||||
$str_from = array('<span style="color: ', '<font color="syntax', '</font>', '<code>', '</code>','[', ']', '.', ':');
|
||||
$str_to = array('<span class="', '<span class="syntax', '</span>', '', '', '[', ']', '.', ':');
|
||||
|
||||
$code = str_replace($str_from, $str_to, $code);
|
||||
$code = preg_replace('#^(<span class="[a-z_]+">)\n?(.*?)\n?(</span>)$#ism', '$1$2$3', $code);
|
||||
|
||||
$code = substr($code, strlen('<span class="syntaxhtml">'));
|
||||
$code = substr($code, 0, -1 * strlen('</ span>'));
|
||||
$code = explode("\n", $code);
|
||||
|
||||
foreach ($code as $key => $line)
|
||||
@ -976,9 +976,14 @@ parse_css_file = {PARSE_CSS_FILE}
|
||||
|
||||
foreach ($file_ary as $file)
|
||||
{
|
||||
$file = str_replace('/', '.', $file);
|
||||
$file = str_replace('/', '.', $file);
|
||||
|
||||
// perform some dirty guessing to get the path right.
|
||||
// We assume that three dots in a row were '../'
|
||||
$tpl_file = str_replace('.', '/', $file);
|
||||
$tpl_file = str_replace('///', '../', $tpl_file);
|
||||
|
||||
$filename = "{$cache_prefix}_$file.html.$phpEx";
|
||||
|
||||
|
||||
$template->assign_block_vars('file', array(
|
||||
'U_VIEWSOURCE' => $this->u_action . "&action=cache&id=$template_id&source=$file",
|
||||
@ -987,7 +992,7 @@ parse_css_file = {PARSE_CSS_FILE}
|
||||
'CACHED' => $user->format_date(filemtime("{$phpbb_root_path}cache/$filename")),
|
||||
'FILENAME' => $file,
|
||||
'FILESIZE' => sprintf('%.1f KB', filesize("{$phpbb_root_path}cache/$filename") / 1024),
|
||||
'MODIFIED' => $user->format_date((!$template_row['template_storedb']) ? filemtime("{$phpbb_root_path}styles/{$template_row['template_path']}/template/" . str_replace('.', '/', $file) . '.html') : $filemtime[$file . '.html']))
|
||||
'MODIFIED' => $user->format_date((!$template_row['template_storedb']) ? filemtime("{$phpbb_root_path}styles/{$template_row['template_path']}/template/$tpl_file.html") : $filemtime[$file . '.html']))
|
||||
);
|
||||
}
|
||||
unset($filemtime);
|
||||
|
Loading…
x
Reference in New Issue
Block a user