aboutsummaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorJan-Hendrik Willms <tleilax+studip@gmail.com>2025-04-25 12:51:02 +0200
committerJan-Hendrik Willms <tleilax+studip@gmail.com>2025-04-25 12:51:02 +0200
commit7cf12c2e8ef1a02ac921f73a5ec1a3b470e0c959 (patch)
treeb6e5ec88fccf6a1e2a23928f5e523312cecb22d6 /db
parent9f257f656edfa6c0944b2407984d3b40f515b460 (diff)
remove wiki comments, fixes #5511
Closes #5511 Merge request studip/studip!4180
Diffstat (limited to 'db')
-rw-r--r--db/migrations/5.5.30_remove_wiki_comments.php30
1 files changed, 30 insertions, 0 deletions
diff --git a/db/migrations/5.5.30_remove_wiki_comments.php b/db/migrations/5.5.30_remove_wiki_comments.php
new file mode 100644
index 0000000..9329017
--- /dev/null
+++ b/db/migrations/5.5.30_remove_wiki_comments.php
@@ -0,0 +1,30 @@
+<?php
+final class RemoveWikiComments extends Migration
+{
+ public function description()
+ {
+ return 'Remove wiki comments configuration setting';
+ }
+
+ protected function up()
+ {
+ $query = "DELETE `config`, `config_values`
+ FROM `config`
+ LEFT JOIN `config_values` USING(`field`)
+ WHERE `field` = 'WIKI_COMMENTS_ENABLE'";
+ DBManager::get()->exec($query);
+ }
+
+ protected function down()
+ {
+ $query = "INSERT INTO `config` (`field`, `value`, `type`, `range`, `mkdate`, `chdate`, `description`)
+ VALUES (:name, :value, :type, :range, UNIX_TIMESTAMP(), UNIX_TIMESTAMP(), :description)";
+ DBManager::get()->execute($query, [
+ ':name' => 'WIKI_COMMENTS_ENABLE',
+ ':description' => 'Einstellung für die Anzeige von Kommentaren in Wiki als Icon',
+ ':range' => 'user',
+ ':type' => 'boolean',
+ ':value' => '0'
+ ]);
+ }
+}