Commit b466e919 authored by Côme Chilliet's avatar Côme Chilliet

🚑 fix(autofs5) Fix saving of automount entries

issue #2912
parent d4a10f5e
......@@ -54,6 +54,7 @@ class automountMap extends simplePlugin
],
'entries' => [
'name' => _('Entries'),
'class' => ['fullwidth'],
'attrs' => [
new SubNodesAttribute(
_('Entries'), _('Entries in the automount table'),
......@@ -79,4 +80,29 @@ class automountMap extends simplePlugin
]
];
}
public function __construct ($dn = NULL, $object = NULL, $parent = NULL, $mainTab = FALSE)
{
parent::__construct($dn, $object, $parent, $mainTab);
$this->attributesAccess['automountEntries']->setLinearRendering(FALSE);
}
protected function shouldSave (): bool
{
return (parent::shouldSave() || $this->attributesAccess['automountEntries']->hasChanged());
}
protected function ldap_save (): array
{
global $config;
$errors = parent::ldap_save();
$ldap = $config->get_ldap_link();
$this->attributesAccess['automountEntries']->postLdapSave($ldap);
return $errors;
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment