mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 14:00:31 +02:00
Fixed cache expiration and missing lang strings on index/viewforum.
git-svn-id: file:///svn/phpbb/trunk@3362 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -122,8 +122,13 @@ class sql_db
|
||||
if ($query != '')
|
||||
{
|
||||
global $cache;
|
||||
if (!$expire_time || !$cache->sql_load($query))
|
||||
if (!$expire_time || !$cache->sql_load($query, $expire_time))
|
||||
{
|
||||
if ($expire_time)
|
||||
{
|
||||
$cache_result = true;
|
||||
}
|
||||
|
||||
$this->query_result = false;
|
||||
$this->num_queries++;
|
||||
|
||||
@@ -179,18 +184,18 @@ class sql_db
|
||||
|
||||
$this->open_queries[] = $this->query_result;
|
||||
}
|
||||
|
||||
if (!empty($cache_result))
|
||||
{
|
||||
$cache->sql_save($query, $this->query_result);
|
||||
@mysql_free_result(array_pop($this->open_queries));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($expire_time && $this->query_result)
|
||||
{
|
||||
$cache->sql_save($query, $this->query_result);
|
||||
@mysql_free_result(array_pop($this->open_queries));
|
||||
}
|
||||
|
||||
return ( $this->query_result) ? $this->query_result : false;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user