1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-04-19 23:32:02 +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:
Ludovic Arnaud 2003-01-24 03:56:37 +00:00
parent bbc49787b4
commit 038fd680f1
4 changed files with 14 additions and 11 deletions

View File

@ -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;
}

View File

@ -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',

View File

@ -283,7 +283,7 @@ function hash(form,login_url) {
<!-- ELSE -->
<tr>
<td class="row1" width="50" height="50" align="center" valign="middle">{forumrow.FORUM_FOLDER_IMG}</td>
<td class="row1" width="100%" height="50" valign="top"><span class="gen"><a href="{forumrow.U_VIEWFORUM}" class="forumlink">{forumrow.FORUM_NAME}</a></span><br /><table cellspacing="5" cellpadding="0" border="0"><tr><td><span class="gensmall">{forumrow.FORUM_DESC}</span></td></tr></table><span class="gensmall"><!-- IF forumrow.MODERATORS --><b>{L_MODERATORS}:</b> {forumrow.MODERATORS}<br /><!-- ENDIF --><!-- IF forumrow.SUBFORUMS --><br /><b>{forumrow.L_SUBFORUM}</b> {forumrow.SUBFORUMS}<!-- ENDIF --></span></td>
<td class="row1" width="100%" height="50" valign="top"><span class="gen"><a href="{forumrow.U_VIEWFORUM}" class="forumlink">{forumrow.FORUM_NAME}</a></span><br /><table cellspacing="5" cellpadding="0" border="0"><tr><td><span class="gensmall">{forumrow.FORUM_DESC}</span></td></tr></table><span class="gensmall"><!-- IF forumrow.MODERATORS --><b>{forumrow.L_MODERATOR_STR}:</b> {forumrow.MODERATORS}<br /><!-- ENDIF --><!-- IF forumrow.SUBFORUMS --><br /><b>{forumrow.L_SUBFORUM_STR}</b> {forumrow.SUBFORUMS}<!-- ENDIF --></span></td>
<td class="row2" align="center" valign="middle" height="50"><span class="gensmall">{forumrow.TOPICS}</span></td>
<td class="row2" align="center" valign="middle" height="50"><span class="gensmall">{forumrow.POSTS}</span></td>
<td class="row2" align="center" valign="middle" height="50" nowrap="nowrap"> <span class="gensmall">{forumrow.LAST_POST}</span></td>

View File

@ -13,7 +13,7 @@
<!-- ELSE -->
<tr>
<td class="row1" width="50" height="50" align="center" valign="middle">{forumrow.FORUM_FOLDER_IMG}</td>
<td class="row1" width="100%" height="50" valign="top"><span class="gen"><a href="{forumrow.U_VIEWFORUM}" class="forumlink">{forumrow.FORUM_NAME}</a></span><br /><table cellspacing="5" cellpadding="0" border="0"><tr><td><span class="gensmall">{forumrow.FORUM_DESC}</span></td></tr></table><span class="gensmall"><!-- IF forumrow.MODERATORS --><b>{L_MODERATORS}:</b> {forumrow.MODERATORS}<br /><!-- ENDIF --><!-- IF forumrow.SUBFORUMS --><br /><b>{forumrow.L_SUBFORUM}</b> {forumrow.SUBFORUMS}<!-- ENDIF --></span></td>
<td class="row1" width="100%" height="50" valign="top"><span class="gen"><a href="{forumrow.U_VIEWFORUM}" class="forumlink">{forumrow.FORUM_NAME}</a></span><br /><table cellspacing="5" cellpadding="0" border="0"><tr><td><span class="gensmall">{forumrow.FORUM_DESC}</span></td></tr></table><span class="gensmall"><!-- IF forumrow.MODERATORS --><b>{forumrow.L_MODERATOR_STR}:</b> {forumrow.MODERATORS}<br /><!-- ENDIF --><!-- IF forumrow.SUBFORUMS --><br /><b>{forumrow.L_SUBFORUM_STR}</b> {forumrow.SUBFORUMS}<!-- ENDIF --></span></td>
<td class="row2" align="center" valign="middle" height="50"><span class="gensmall">{forumrow.TOPICS}</span></td>
<td class="row2" align="center" valign="middle" height="50"><span class="gensmall">{forumrow.POSTS}</span></td>
<td class="row2" align="center" valign="middle" height="50" nowrap="nowrap"> <span class="gensmall">{forumrow.LAST_POST}</span></td>