mirror of
https://github.com/processwire/processwire.git
synced 2025-08-11 09:14:58 +02:00
This commit is contained in:
@@ -2,6 +2,9 @@
|
||||
|
||||
/**
|
||||
* Base class for Page List rendering
|
||||
*
|
||||
* @method array getPageActions(Page $page)
|
||||
* @method string getPageLabel(Page $page)
|
||||
*
|
||||
*/
|
||||
abstract class ProcessPageListRender extends Wire {
|
||||
|
@@ -99,11 +99,15 @@ class ProcessPageListRenderJSON extends ProcessPageListRender {
|
||||
$children = array();
|
||||
|
||||
$extraPages = array(); // pages forced to bottom of list
|
||||
$id404 = $this->wire('config')->http404PageID;
|
||||
|
||||
foreach($this->children as $page) {
|
||||
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;
|
||||
continue;
|
||||
}
|
||||
|
Reference in New Issue
Block a user