aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acp/acp_styles.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/acp/acp_styles.php')
-rw-r--r--phpBB/includes/acp/acp_styles.php18
1 files changed, 9 insertions, 9 deletions
diff --git a/phpBB/includes/acp/acp_styles.php b/phpBB/includes/acp/acp_styles.php
index 48802c79df..4c33aa1edb 100644
--- a/phpBB/includes/acp/acp_styles.php
+++ b/phpBB/includes/acp/acp_styles.php
@@ -1029,12 +1029,12 @@ 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);
+ $tpl_file = str_replace('.', '/', $file);
+ $tpl_file = str_replace('///', '../', $tpl_file);
$filename = "{$cache_prefix}_$file.html.$phpEx";
@@ -1066,6 +1066,11 @@ parse_css_file = {PARSE_CSS_FILE}
}
}
+ // Correct the filename if it is stored in database and the file is in a subfolder.
+ if ($template_row['template_storedb'])
+ {
+ $file = str_replace('.', '/', $file);
+ }
$template->assign_block_vars('file', array(
'U_VIEWSOURCE' => $this->u_action . "&action=cache&id=$template_id&source=$file",
@@ -1073,7 +1078,7 @@ parse_css_file = {PARSE_CSS_FILE}
'CACHED' => $user->format_date(filemtime("{$phpbb_root_path}cache/$filename")),
'FILENAME' => $file,
'FILENAME_PATH' => $file_tpl,
- 'FILESIZE' => sprintf('%.1f ' . $user->lang['KIB'], filesize("{$phpbb_root_path}cache/$filename") / 1024),
+ 'FILESIZE' => get_formatted_filesize(filesize("{$phpbb_root_path}cache/$filename")),
'MODIFIED' => $user->format_date((!$template_row['template_storedb']) ? filemtime($file_tpl) : $filemtime[$file . '.html']))
);
}
@@ -1271,7 +1276,6 @@ parse_css_file = {PARSE_CSS_FILE}
);
}
-
/**
* Edit imagesets
*
@@ -2409,7 +2413,6 @@ parse_css_file = {PARSE_CSS_FILE}
}
}
-
if ($mode == 'template')
{
$super = array();
@@ -3209,7 +3212,6 @@ parse_css_file = {PARSE_CSS_FILE}
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
-
if ($row)
{
// If it exist, we just use the style on installation
@@ -3260,7 +3262,6 @@ parse_css_file = {PARSE_CSS_FILE}
$inherit_bf = false;
}
-
if (sizeof($error))
{
return false;
@@ -3530,7 +3531,6 @@ parse_css_file = {PARSE_CSS_FILE}
break;
}
-
$sql = "SELECT {$mode}_inherits_id
FROM $sql_from
WHERE {$mode}_id = " . (int) $id;