mirror of
https://github.com/e107inc/e107.git
synced 2025-08-02 12:48:26 +02:00
Bugtracker #4911 - display cached comments with content item
This commit is contained in:
@@ -1101,11 +1101,13 @@ function show_content_item(){
|
||||
if(!isset($qs[2])){ $cacheid = 1; }else{ $cacheid = $qs[2]; }
|
||||
$cachestr = "$plugintable.content.$qs[1].$cacheid";
|
||||
$cachecheck = CachePre($cachestr);
|
||||
if($cachecheck){
|
||||
if($cachecheck)
|
||||
{
|
||||
echo $cachecheck;
|
||||
return;
|
||||
//return;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
$number = varsettrue($content_pref["content_nextprev_number"],'5');
|
||||
$nextprevquery = (varsettrue($content_pref["content_nextprev"]) ? "LIMIT ".intval($from).",".intval($number) : "");
|
||||
|
||||
@@ -1115,7 +1117,8 @@ function show_content_item(){
|
||||
$CONTENT_CONTENT_TABLE_PREV_PAGE = FALSE;
|
||||
$CONTENT_CONTENT_TABLE_NEXT_PAGE = FALSE;
|
||||
$lastpage = FALSE; //boolean whether or not the current page is the last page
|
||||
if(preg_match_all("/\[newpage.*?]/si", $row['content_text'], $matches)){
|
||||
if(preg_match_all("/\[newpage.*?]/si", $row['content_text'], $matches))
|
||||
{
|
||||
//remove html bbcode (since we're splitting the text, the html bbcode would not be parsed)
|
||||
$row['content_text'] = preg_replace("/\\[html\](.*?)\[\/html\]/si", '\1', $row['content_text']);
|
||||
//split newpage
|
||||
@@ -1330,6 +1333,7 @@ function show_content_item(){
|
||||
$text .= $tp -> parseTemplate($CONTENT_CONTENT_TABLE, FALSE, $content_shortcodes);
|
||||
$ns -> tablerender($row['content_heading'], $text);
|
||||
$cachecheck = CachePost($cachestr);
|
||||
}
|
||||
|
||||
//recheck some thing when caching is enabled
|
||||
$pages = preg_split("/\[newpage.*?]/si", $row['content_text'], -1, PREG_SPLIT_NO_EMPTY);
|
||||
|
Reference in New Issue
Block a user