Skip to content
Snippets Groups Projects
Commit 4448e403 authored by Jan-Hendrik Willms's avatar Jan-Hendrik Willms
Browse files

add missing configurations for personal notifications, fixes #4711

Closes #4711

Merge request studip/studip!3504
parent 040d121f
No related branches found
No related tags found
No related merge requests found
<?php
final class AddPersonalNotificationConfigurations extends Migration
{
public function description()
{
return 'Adds missing configurations for "PERSONAL_NOTIFICATIONS_DEACTIVATED" and "PERSONAL_NOTIFICATIONS_AUDIO_DEACTIVATED"';
}
protected function up()
{
$query = "INSERT IGNORE INTO `config`
(`field`, `value`, `type`, `range`, `mkdate`, `chdate`, `description`)
VALUES (:field, :value, 'boolean', 'user', UNIX_TIMESTAMP(), UNIX_TIMESTAMP(), :description)";
$statement = DBManager::get()->prepare($query);
$statement->execute([
':field' => 'PERSONAL_NOTIFICATIONS_DEACTIVATED',
':value' => '0',
':description' => 'Deaktiviert die persönlichen Benachrichtigungen',
]);
$statement->execute([
':field' => 'PERSONAL_NOTIFICATIONS_AUDIO_DEACTIVATED',
':value' => '0',
':description' => 'Deaktiviert das Abspielen von Tönen für die persönlichen Benachrichtigungen',
]);
}
protected function down()
{
$query = "DELETE FROM `config`
WHERE `field` IN (
'PERSONAL_NOTIFICATIONS_DEACTIVATED',
'PERSONAL_NOTIFICATIONS_AUDIO_DEACTIVATED'
)";
DBManager::get()->execute($query);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment