mirror of
https://github.com/e107inc/e107.git
synced 2025-04-22 13:41:52 +02:00
Tidy cache handling a little
This commit is contained in:
parent
637b352b13
commit
fe1d116282
11
news.php
11
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']))
|
||||
|
Loading…
x
Reference in New Issue
Block a user