1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-09 00:06:55 +02:00
This commit is contained in:
Ryan Cramer
2016-09-26 09:59:24 -04:00
parent 835b7ce07d
commit 2260d52140
2 changed files with 8 additions and 1 deletions

View File

@@ -3,6 +3,9 @@
/** /**
* Base class for Page List rendering * Base class for Page List rendering
* *
* @method array getPageActions(Page $page)
* @method string getPageLabel(Page $page)
*
*/ */
abstract class ProcessPageListRender extends Wire { abstract class ProcessPageListRender extends Wire {

View File

@@ -99,11 +99,15 @@ class ProcessPageListRenderJSON extends ProcessPageListRender {
$children = array(); $children = array();
$extraPages = array(); // pages forced to bottom of list $extraPages = array(); // pages forced to bottom of list
$id404 = $this->wire('config')->http404PageID;
foreach($this->children as $page) { foreach($this->children as $page) {
if(!$this->superuser && !$page->listable()) continue; if(!$this->superuser && !$page->listable()) continue;
if(in_array($page->id, $this->systemIDs)) { if($page->id == $id404 && !$this->superuser) {
// allow showing 404 page, only if it's editable
if(!$page->editable()) continue;
} else if(in_array($page->id, $this->systemIDs)) {
$extraPages[] = $page; $extraPages[] = $page;
continue; continue;
} }