diff --git a/Modules/Wiki/Setup/class.Agent.php b/Modules/Wiki/Setup/class.Agent.php index 36c05193e79f..cc971d53b0fe 100644 --- a/Modules/Wiki/Setup/class.Agent.php +++ b/Modules/Wiki/Setup/class.Agent.php @@ -29,7 +29,13 @@ class Agent extends Setup\Agent\NullAgent { public function getUpdateObjective(Setup\Config $config = null): Setup\Objective { - return new \ilDatabaseUpdateStepsExecutedObjective(new ilWikiDBUpdateSteps()); + return new Setup\ObjectiveCollection( + 'Wiki Update', + true, + new \ilDatabaseUpdateStepsExecutedObjective(new ilWikiDBUpdateSteps()), + new \ilDatabaseUpdateStepsExecutedObjective(new ilWiki8HotfixDBUpdateSteps()) + ); + } public function getStatusObjective(Metrics\Storage $storage): Objective diff --git a/Modules/Wiki/Setup/class.ilWiki8HotfixDBUpdateSteps.php b/Modules/Wiki/Setup/class.ilWiki8HotfixDBUpdateSteps.php new file mode 100644 index 000000000000..7242db4752da --- /dev/null +++ b/Modules/Wiki/Setup/class.ilWiki8HotfixDBUpdateSteps.php @@ -0,0 +1,42 @@ + + */ +class ilWiki8HotfixDBUpdateSteps implements \ilDatabaseUpdateSteps +{ + protected \ilDBInterface $db; + + public function prepare(\ilDBInterface $db): void + { + $this->db = $db; + } + + public function step_1(): void + { + $db = $this->db; + $db->manipulateF("DELETE FROM notification WHERE " . + " user_id = %s", + ["integer"], + [13] + ); + } +} diff --git a/Modules/Wiki/classes/class.ilWikiPageGUI.php b/Modules/Wiki/classes/class.ilWikiPageGUI.php index bea4d8c9ab10..0474eae658ac 100755 --- a/Modules/Wiki/classes/class.ilWikiPageGUI.php +++ b/Modules/Wiki/classes/class.ilWikiPageGUI.php @@ -185,7 +185,8 @@ public function executeCommand(): string self::initEditingJS($this->tpl); } - if ($this->wiki_request->getNotification() > 0) { + if ($this->wiki_request->getNotification() > 0 + && $ilUser->getId() !== ANONYMOUS_USER_ID) { switch ($this->wiki_request->getNotification()) { case 1: ilNotification::setNotification(ilNotification::TYPE_WIKI, $ilUser->getId(), $this->getPageObject()->getParentId(), false);