diff options
| author | Ludovic Arnaud <ludovic_arnaud@users.sourceforge.net> | 2003-01-24 03:56:37 +0000 |
|---|---|---|
| committer | Ludovic Arnaud <ludovic_arnaud@users.sourceforge.net> | 2003-01-24 03:56:37 +0000 |
| commit | 038fd680f1a8ef48b2a678b1ec47280fd6ded1d7 (patch) | |
| tree | 21a2e38bf3b35b108c45d442813e0e94269cff78 /phpBB/db/mysql.php | |
| parent | bbc49787b4efd62ce5904af572eb336758416140 (diff) | |
| download | forums-038fd680f1a8ef48b2a678b1ec47280fd6ded1d7.tar forums-038fd680f1a8ef48b2a678b1ec47280fd6ded1d7.tar.gz forums-038fd680f1a8ef48b2a678b1ec47280fd6ded1d7.tar.bz2 forums-038fd680f1a8ef48b2a678b1ec47280fd6ded1d7.tar.xz forums-038fd680f1a8ef48b2a678b1ec47280fd6ded1d7.zip | |
Fixed cache expiration and missing lang strings on index/viewforum.
git-svn-id: file:///svn/phpbb/trunk@3362 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/db/mysql.php')
| -rw-r--r-- | phpBB/db/mysql.php | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/phpBB/db/mysql.php b/phpBB/db/mysql.php index 9925779e33..ba6a632b12 100644 --- a/phpBB/db/mysql.php +++ b/phpBB/db/mysql.php @@ -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; } |
