mirror of
https://github.com/e107inc/e107.git
synced 2025-08-01 20:30:39 +02:00
Tidy cache handling a little
This commit is contained in:
11
news.php
11
news.php
@@ -9,9 +9,9 @@
|
|||||||
* News frontend
|
* News frontend
|
||||||
*
|
*
|
||||||
* $Source: /cvs_backup/e107_0.8/news.php,v $
|
* $Source: /cvs_backup/e107_0.8/news.php,v $
|
||||||
* $Revision: 1.15 $
|
* $Revision: 1.16 $
|
||||||
* $Date: 2008-12-03 12:38:07 $
|
* $Date: 2009-07-10 20:30:09 $
|
||||||
* $Author: secretr $
|
* $Author: e107steved $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once("class2.php");
|
require_once("class2.php");
|
||||||
@@ -26,7 +26,7 @@ if (isset($NEWSHEADER))
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
$cacheString = 'news.php_'.e_QUERY;
|
$cacheString = 'news.php_default_';
|
||||||
$action = '';
|
$action = '';
|
||||||
$sub_action = '';
|
$sub_action = '';
|
||||||
$order = "news_datestamp";
|
$order = "news_datestamp";
|
||||||
@@ -44,6 +44,7 @@ if (e_QUERY)
|
|||||||
$sub_action = varset($tmp[1],''); // Usually a numeric category, but don't presume yet
|
$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
|
$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
|
$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));
|
//$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;
|
ORDER BY ".$order." DESC LIMIT ".intval($newsfrom).",".ITEMVIEW;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'default' :
|
||||||
default :
|
default :
|
||||||
$action = '';
|
$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" );
|
// $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']))
|
if(!isset($pref['newsposts_archive']))
|
||||||
|
Reference in New Issue
Block a user