From 038fd680f1a8ef48b2a678b1ec47280fd6ded1d7 Mon Sep 17 00:00:00 2001 From: Ludovic Arnaud Date: Fri, 24 Jan 2003 03:56:37 +0000 Subject: Fixed cache expiration and missing lang strings on index/viewforum. git-svn-id: file:///svn/phpbb/trunk@3362 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/db/mysql.php | 19 ++++++++++++------- phpBB/language/en/lang_main.php | 2 -- phpBB/templates/subSilver/index_body.html | 2 +- phpBB/templates/subSilver/viewforum_subforum.html | 2 +- 4 files changed, 14 insertions(+), 11 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; } diff --git a/phpBB/language/en/lang_main.php b/phpBB/language/en/lang_main.php index af70e6f6f8..a2d678d36f 100644 --- a/phpBB/language/en/lang_main.php +++ b/phpBB/language/en/lang_main.php @@ -29,7 +29,6 @@ $lang = array_merge($lang, array( 'FORUM' => 'Forum', 'SUBFORUM' => 'Subforum', 'SUBFORUMS' => 'Subforums', - 'CATEGORY' => 'Category', 'TOPIC' => 'Topic', 'TOPICS' => 'Topics', 'REPLIES' => 'Replies', @@ -177,7 +176,6 @@ $lang = array_merge($lang, array( 'Index' => 'Index', 'No_Posts' => 'No Posts', 'No_forums' => 'This board has no forums', - 'Category_not_exist' => 'The category you selected does not exist', 'Private_Message' => 'Private Message', 'Private_Messages' => 'Private Messages', 'Who_is_Online' => 'Who is Online', diff --git a/phpBB/templates/subSilver/index_body.html b/phpBB/templates/subSilver/index_body.html index cf3ab9d5db..bae95e90fd 100644 --- a/phpBB/templates/subSilver/index_body.html +++ b/phpBB/templates/subSilver/index_body.html @@ -283,7 +283,7 @@ function hash(form,login_url) { {forumrow.FORUM_FOLDER_IMG} - {forumrow.FORUM_NAME}
{forumrow.FORUM_DESC}
{L_MODERATORS}: {forumrow.MODERATORS}

{forumrow.L_SUBFORUM} {forumrow.SUBFORUMS}
+ {forumrow.FORUM_NAME}
{forumrow.FORUM_DESC}
{forumrow.L_MODERATOR_STR}: {forumrow.MODERATORS}

{forumrow.L_SUBFORUM_STR} {forumrow.SUBFORUMS}
{forumrow.TOPICS} {forumrow.POSTS} {forumrow.LAST_POST} diff --git a/phpBB/templates/subSilver/viewforum_subforum.html b/phpBB/templates/subSilver/viewforum_subforum.html index 0efd298888..dff4565069 100644 --- a/phpBB/templates/subSilver/viewforum_subforum.html +++ b/phpBB/templates/subSilver/viewforum_subforum.html @@ -13,7 +13,7 @@ {forumrow.FORUM_FOLDER_IMG} - {forumrow.FORUM_NAME}
{forumrow.FORUM_DESC}
{L_MODERATORS}: {forumrow.MODERATORS}

{forumrow.L_SUBFORUM} {forumrow.SUBFORUMS}
+ {forumrow.FORUM_NAME}
{forumrow.FORUM_DESC}
{forumrow.L_MODERATOR_STR}: {forumrow.MODERATORS}

{forumrow.L_SUBFORUM_STR} {forumrow.SUBFORUMS}
{forumrow.TOPICS} {forumrow.POSTS} {forumrow.LAST_POST} -- cgit v1.2.1