mirror of
https://github.com/processwire/processwire.git
synced 2025-08-10 16:54:44 +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)) {
|
||||
$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);
|
||||
}
|
||||
return $this;
|
||||
|
@@ -1422,9 +1422,8 @@ class PagesPathFinder extends Wire {
|
||||
$this->admin = true;
|
||||
} else {
|
||||
$template = $this->getResultTemplate();
|
||||
if(!$template) {
|
||||
return false; // may need to detect later
|
||||
} if(in_array($template->name, $config->adminTemplates, true)) {
|
||||
if(!$template) return false; // may need to detect later
|
||||
if(in_array($template->name, $config->adminTemplates, true)) {
|
||||
$this->admin = true;
|
||||
} else if(in_array($template->name, array('user', 'role', 'permission', 'language'))) {
|
||||
$this->admin = true;
|
||||
|
Reference in New Issue
Block a user