1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-06 08:47:45 +02:00

language additions

some small fixes


git-svn-id: file:///svn/phpbb/trunk@4893 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen
2004-05-26 18:55:28 +00:00
parent cf8c2a7df1
commit 00ad9cc498
14 changed files with 93 additions and 22 deletions

View File

@@ -28,7 +28,14 @@ class acm
function load()
{
global $phpEx;
@include($this->cache_dir . 'data_global.' . $phpEx);
if (file_exists($this->cache_dir . 'data_global.' . $phpEx))
{
@include($this->cache_dir . 'data_global.' . $phpEx);
}
else
{
return false;
}
}
function unload()
@@ -230,7 +237,13 @@ class acm
$query = preg_replace('/[\n\r\s\t]+/', ' ', $query);
$query_id = 'Cache id #' . count($this->sql_rowset);
if (!file_exists($this->cache_dir . 'sql_' . md5($query) . ".$phpEx"))
{
return false;
}
@include($this->cache_dir . 'sql_' . md5($query) . ".$phpEx");
if (!isset($expired))
{
return FALSE;

View File

@@ -345,6 +345,16 @@ class sql_db
$query_id = $this->query_result;
}
if ($query_id)
{
// If it is not found within the open queries, we try to free a cached result. ;)
if (!(array_search($query_id, $this->open_queries) > 0))
{
return false;
}
unset($this->open_queries[array_search($query_id, $this->open_queries)]);
}
return ($query_id) ? @mysql_free_result($query_id) : false;
}