From fe1d116282a991369fe11608b777e2bf1f12255b Mon Sep 17 00:00:00 2001 From: e107steved Date: Fri, 10 Jul 2009 20:30:09 +0000 Subject: [PATCH] Tidy cache handling a little --- news.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/news.php b/news.php index 80ecfb59b..9a5985b89 100644 --- a/news.php +++ b/news.php @@ -9,9 +9,9 @@ * News frontend * * $Source: /cvs_backup/e107_0.8/news.php,v $ - * $Revision: 1.15 $ - * $Date: 2008-12-03 12:38:07 $ - * $Author: secretr $ + * $Revision: 1.16 $ + * $Date: 2009-07-10 20:30:09 $ + * $Author: e107steved $ */ require_once("class2.php"); @@ -26,7 +26,7 @@ if (isset($NEWSHEADER)) exit; } -$cacheString = 'news.php_'.e_QUERY; +$cacheString = 'news.php_default_'; $action = ''; $sub_action = ''; $order = "news_datestamp"; @@ -44,6 +44,7 @@ if (e_QUERY) $sub_action = varset($tmp[1],''); // Usually a numeric category, but don't presume yet $id = varset($tmp[2],''); // ID of specific news item where required $newsfrom = intval(varset($tmp[2],0)); // Item number for first item on multi-page lists + $cacheString = 'news.php_'.e_QUERY; } //$newsfrom = (!is_numeric($action) || !e_QUERY ? 0 : ($action ? $action : e_QUERY)); @@ -322,8 +323,10 @@ switch ($action) ORDER BY ".$order." DESC LIMIT ".intval($newsfrom).",".ITEMVIEW; break; + case 'default' : default : $action = ''; + $cacheString = 'news.php_default_'; // Make sure its sensible // $news_total = $sql->db_Count("news", "(*)", "WHERE news_class REGEXP '".e_CLASS_REGEXP."' AND NOT (news_class REGEXP ".$nobody_regexp.") AND news_start < ".time()." AND (news_end=0 || news_end>".time().") AND news_render_type<2" ); if(!isset($pref['newsposts_archive']))