Commit 72ba4763 authored by Côme Chilliet's avatar Côme Chilliet

🚜 fix(plugins) Adapt code to addValue new signature

issue #6007
parent 9d8199f6
......@@ -156,14 +156,14 @@ class DnsRecordDialog extends GenericDialog
$relativeSubdomainName = '';
}
$ret = array_merge([$relativeSubdomainName], $this->dialog->dnsRecord);
$this->attribute->addValue($ret);
$this->attribute->addValue('', $ret);
return FALSE;
}
function handle_cancel ()
{
if ($this->initialDialogValue !== NULL) {
$this->attribute->addValue($this->initialDialogValue);
$this->attribute->addValue('', $this->initialDialogValue);
}
return FALSE;
}
......
......@@ -528,7 +528,7 @@ class dnsHost extends simplePlugin
return FALSE;
}
$attrId = 'zoneRecords'.$zoneid;
$this->attributesAccess[$attrId]->addValue($record);
$this->attributesAccess[$attrId]->addValue('', $record);
}
static function removeIpsFromZones (array $zoneDns, array $ips)
......
......@@ -32,7 +32,7 @@ class EjbcaCertsAttribute extends ObjectsAttribute
];
}
function addValue ($dn, $entry)
function addValue (string $dn, $entry = NULL)
{
if (!in_array($dn, $this->value)) {
$this->value[] = $dn;
......
......@@ -149,7 +149,7 @@ class PgpKeyAttribute extends GenericDialogAttribute
];
}
function addValue ($dn, $entry)
function addValue (string $dn, $entry = NULL)
{
if (!in_array($dn, $this->value)) {
$this->value[] = $dn;
......
......@@ -53,11 +53,11 @@ class SudoSystemsAttribute extends SystemsAttribute
}
}
function addValue ($value, $attrs)
function addValue (string $dn, $entry = NULL)
{
if (isset($this->value[0]) && ($this->value[0] === 'ALL')) {
unset($this->value[0]);
}
parent::addValue($value, $attrs);
parent::addValue($dn, $entry);
}
}
......@@ -24,7 +24,7 @@ class SudoUsersGroupsAttribute extends DialogAttribute
{
protected $dialogClass = 'UserGroupSelectDialog';
function addValue ($dn, $entry)
function addValue (string $dn, $entry = NULL)
{
if (in_array('posixGroup', $entry['objectClass']) || in_array('groupOfNames', $entry['objectClass'])) {
$name = trim("%".$entry['cn'][0]);
......
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