mirror of
https://github.com/processwire/processwire.git
synced 2025-08-09 00:06:55 +02:00
This commit is contained in:
@@ -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 {
|
||||||
|
|
||||||
|
@@ -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;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user