Bugfix double entry of module_action upon initialisation -> Insert / Update

This commit is contained in:
Xenomporio 2022-06-22 10:27:28 +02:00
parent 06143f98b1
commit d657f52491

View File

@ -6379,11 +6379,16 @@ title: 'Abschicken',
return; return;
} }
foreach($actions as $action) { foreach($actions as $action) {
$this->app->DB->Insert(
$sql =
sprintf( sprintf(
"INSERT INTO `module_action` (`module`,`action`) VALUES ('%s','%s')", "INSERT INTO `module_action` (`module`,`action`) VALUES ('%s','%s') ON DUPLICATE KEY UPDATE `module`='%s', `action`='%s'",
$this->app->DB->real_escape_string($module), $this->app->DB->real_escape_string($action) $this->app->DB->real_escape_string($module), $this->app->DB->real_escape_string($action),
) $this->app->DB->real_escape_string($module), $this->app->DB->real_escape_string($action)
);
$this->app->DB->Insert(
$sql
); );
$this->moduleActions[$module][] = $action; $this->moduleActions[$module][] = $action;
} }