1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-17 20:11:46 +02:00

Fix issue with PageRender and cache clearing of single page

This commit is contained in:
Ryan Cramer
2016-10-30 08:00:54 -04:00
parent f7c613d39d
commit 0c84379255

View File

@@ -306,6 +306,7 @@ class PageRender extends WireData implements Module, ConfigurableModule {
));
}
$items = array();
if(count($pageIDs)) {
$items = $this->wire('pages')->getById($pageIDs, array(
'cache' => false,
@@ -314,8 +315,14 @@ class PageRender extends WireData implements Module, ConfigurableModule {
'findTemplates' => false,
'joinSortfield' => false
));
if(!$items->has($page)) $items->add($page);
} else {
$items = new PageArray();
$items->add($page);
}
if(count($items)) {
$this->clearCacheFilePages($items, $page);
$this->message(sprintf($this->_('Cleared cache file for %d page(s)'), count($pageIDs)), Notice::debug);
$this->message(sprintf($this->_('Cleared cache file for %d page(s)'), count($items)), Notice::debug);
}
}
}