added direct actions are always selected !

This commit is contained in:
Jean-Christian Paul Denis 2023-05-09 10:24:14 +02:00
parent f6f02cf03d
commit f79de46939
Signed by: JcDenis
GPG Key ID: 1B5B8C5B90B6C951

View File

@ -163,18 +163,15 @@ class Uninstaller
* user will NOT be prompted before these actions execution.
* Note: If module is disabled, direct actions are not executed.
*
* Leave $default param to null to let Cleaner decide.
*
* @param string $cleaner The cleaner ID
* @param string $action The action ID
* @param string $ns Name of setting related to module
* @param null|null $default The default state of form field (checked)
*
* @return Uninstaller Uninstaller instance
*/
public function addDirectAction(string $cleaner, string $action, string $ns, ?bool $default = null): Uninstaller
public function addDirectAction(string $cleaner, string $action, string $ns): Uninstaller
{
if (null !== $this->module && null !== ($res = $this->addAction($cleaner, $action, $ns, $default))) {
if (null !== $this->module && null !== ($res = $this->addAction($cleaner, $action, $ns, true))) {
if (!isset($this->direct_actions[$this->module->getId()])) {
$this->direct_actions[$this->module->getId()] = new ActionsStack();
}