1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-10 00:37:02 +02:00

Fix issue processwire/processwire-issues#388 where repeater templates could show as selectable options in page editor template field, when they didn't need to

This commit is contained in:
Ryan Cramer
2017-10-12 10:52:47 -04:00
parent e0a2abea07
commit f4971ae5d4

View File

@@ -1960,6 +1960,7 @@ class ProcessPageEdit extends Process implements WirePageEditor, ConfigurableMod
if(in_array($template->id, $this->config->userTemplateIDs) && !in_array($parent->id, $this->config->usersPageIDs)) continue;
if($template->name == 'role' && $parent->id != $this->config->rolesPageID) continue;
if($template->name == 'permission' && $parent->id != $this->config->permissionsPageID) continue;
if(strpos($template->name, 'repeater_') === 0 || strpos($template->name, 'fieldset_') === 0) continue;
}
if(count($template->parentTemplates) && $parent->id && !in_array($parent->template->id, $template->parentTemplates)) {