mirror of
https://github.com/processwire/processwire.git
synced 2025-08-11 01:04:16 +02:00
Add PR #262 - Fix potentially missed else conditionals
This commit is contained in:
@@ -549,7 +549,7 @@ class InputfieldWrapper extends Inputfield implements \Countable, \IteratorAggre
|
|||||||
}
|
}
|
||||||
if($this->children()->has($item)) {
|
if($this->children()->has($item)) {
|
||||||
$this->children()->remove($item);
|
$this->children()->remove($item);
|
||||||
} if($this->getChildByName($item->attr('name')) && $item->parent) {
|
} else if($this->getChildByName($item->attr('name')) && $item->parent) {
|
||||||
$item->parent->remove($item);
|
$item->parent->remove($item);
|
||||||
}
|
}
|
||||||
return $this;
|
return $this;
|
||||||
|
@@ -1422,9 +1422,8 @@ class PagesPathFinder extends Wire {
|
|||||||
$this->admin = true;
|
$this->admin = true;
|
||||||
} else {
|
} else {
|
||||||
$template = $this->getResultTemplate();
|
$template = $this->getResultTemplate();
|
||||||
if(!$template) {
|
if(!$template) return false; // may need to detect later
|
||||||
return false; // may need to detect later
|
if(in_array($template->name, $config->adminTemplates, true)) {
|
||||||
} if(in_array($template->name, $config->adminTemplates, true)) {
|
|
||||||
$this->admin = true;
|
$this->admin = true;
|
||||||
} else if(in_array($template->name, array('user', 'role', 'permission', 'language'))) {
|
} else if(in_array($template->name, array('user', 'role', 'permission', 'language'))) {
|
||||||
$this->admin = true;
|
$this->admin = true;
|
||||||
|
Reference in New Issue
Block a user