mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-12 03:34:04 +02:00
- file_get_contents instead of imploding file()s or fread()ing till the maximum filesize
- language and style properly use compression - language now prompts user for methods - functions_compress does not need to eval() to get a hex date, instead calls pack() - A writing method is defined at the end of tar operations only if data has been sent to the archive - BBCode parser does not have to eval(), it instead uses the regex to loop around the matches Hopefully nothing broke :-) git-svn-id: file:///svn/phpbb/trunk@5422 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -84,10 +84,10 @@ if ($id && $sid)
|
||||
}
|
||||
|
||||
$force_load = true; // Ideally this needs to be based on $config['load_tplcompile']
|
||||
|
||||
|
||||
if ($theme['theme_mtime'] < filemtime("{$phpbb_root_path}styles/" . $theme['theme_path'] . '/theme/stylesheet.css') || $force_load)
|
||||
{
|
||||
$theme['theme_data'] = implode('', file("{$phpbb_root_path}styles/" . $theme['theme_path'] . '/theme/stylesheet.css'));
|
||||
$theme['theme_data'] = file_get_contents("{$phpbb_root_path}styles/" . $theme['theme_path'] . '/theme/stylesheet.css');
|
||||
|
||||
// Match CSS imports
|
||||
$matches = array();
|
||||
@@ -97,7 +97,7 @@ if ($id && $sid)
|
||||
{
|
||||
foreach ($matches[0] as $idx => $match)
|
||||
{
|
||||
$theme['theme_data'] = str_replace($match, load_css_file($matches[1][$idx]), $theme['theme_data']);
|
||||
$theme['theme_data'] = str_replace($match, file_get_contents("{$phpbb_root_path}styles/" . $theme['theme_path'] . '/theme/' . $matches[1][$idx]), $theme['theme_data']);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -132,24 +132,4 @@ if ($id && $sid)
|
||||
$db->sql_close();
|
||||
}
|
||||
|
||||
function load_css_file($filename)
|
||||
{
|
||||
global $phpbb_root_path, $theme;
|
||||
|
||||
$handle = "{$phpbb_root_path}styles/" . $theme['theme_path'] . '/theme/' . $filename;
|
||||
|
||||
if ($fp = @fopen($handle, 'r'))
|
||||
{
|
||||
$content = trim(@fread($fp, filesize($handle)));
|
||||
@fclose($fp);
|
||||
}
|
||||
else
|
||||
{
|
||||
$content = '';
|
||||
}
|
||||
|
||||
return $content;
|
||||
}
|
||||
|
||||
|
||||
?>
|
Reference in New Issue
Block a user