1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-10 18:54:08 +02:00

some bugs fixed

git-svn-id: file:///svn/phpbb/trunk@8033 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen
2007-08-15 17:32:48 +00:00
parent 3ada3b76f0
commit 2bbd2fb1f9
23 changed files with 119 additions and 60 deletions

View File

@@ -46,7 +46,7 @@ if (strspn($sid, 'abcdefABCDEF0123456789') !== strlen($sid))
// happen to have a current session it will output nothing. We will also cache the
// resulting CSS data for five minutes ... anything to reduce the load on the SQL
// server a little
if ($id && $sid)
if ($id)
{
if (empty($acm_type) || empty($dbms))
{
@@ -101,6 +101,11 @@ if ($id && $sid)
$theme = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
if (!$theme)
{
exit;
}
if ($user['user_id'] == ANONYMOUS)
{
$user['user_lang'] = $config['default_lang'];
@@ -115,16 +120,11 @@ if ($id && $sid)
$result = $db->sql_query($sql, 3600);
$img_array = array();
while ($row = $db->sql_fetchrow($result))
{
$img_array[$row['image_name']] = $row;
}
if (!$theme)
{
exit;
}
$db->sql_freeresult($result);
// gzip_compression
if ($config['gzip_compress'])
@@ -191,7 +191,11 @@ if ($id && $sid)
$db->sql_query($sql);
$cache->destroy('sql', STYLES_THEME_TABLE);
}
// Only set the expire time if the theme changed data is older than 30 minutes - to cope with changes from the ACP
if ($recache || $theme['theme_mtime'] > (time() - 1800))
{
header('Cache-Control: private, no-cache="set-cookie"');
header('Expires: 0');
header('Pragma: no-cache');