1
0
mirror of https://github.com/e107inc/e107.git synced 2025-09-09 05:40:44 +02:00

News: Fix for list view caching. Fixed meta data so it is retained when cache is active.

This commit is contained in:
Cameron
2016-12-18 09:13:35 -08:00
parent e25316d95f
commit ad170838b9

View File

@@ -586,10 +586,15 @@ class news_front
global $NEWSLISTSTYLE, $NEWSLISTTITLE;
if($newsCachedPage = checkCache($this->cacheString))
if($newsCachedPage = $this->checkCache($this->cacheString))
{
$this->addDebug("Cache", 'active');
return $this->renderCache($newsCachedPage, TRUE);
}
else
{
$this->addDebug("Cache", 'inactive: '.$this->cacheString);
}
$category = intval($this->subAction);
if ($this->action == 'cat' && $category != 0)
@@ -862,6 +867,7 @@ class news_front
$rows = $this->getNewsCache($this->cacheString,'rows');
e107::getEvent()->trigger('user_news_item_viewed', $rows);
$this->addDebug("Event-triggered:user_news_item_viewed", $rows);
$this->setNewsFrontMeta($rows);
$text = $this->renderCache($newsCachedPage, TRUE); // This exits if cache used
$text .= $this->renderComments($rows);
return $text;
@@ -1238,8 +1244,6 @@ class news_front
if ($sql->gen($query))
{
$newsAr = $sql -> db_getList();
if($newsarchive = $this->checkCache('newsarchive'))