diff --git a/app/views/settings/account/index.php b/app/views/settings/account/index.php index f4d7d565fbf75bfdeec287d13959cee87fc41b40..eaa2631a387e6b21771058ca7e97471499a044e5 100644 --- a/app/views/settings/account/index.php +++ b/app/views/settings/account/index.php @@ -8,8 +8,7 @@ $genders = [ ?> <? if ($user->auth_plugin !== 'standard'): ?> - <?= MessageBox::info(sprintf(_('Einige Ihrer persönlichen Daten werden nicht in Stud.IP verwaltet ' - . 'und können daher hier nicht geändert werden.'))) ?> + <?= MessageBox::info(Config::get()->PERSONAL_DETAILS_INFO_TEXT) ?> <? endif; ?> <? if ($locked_info): ?> diff --git a/db/migrations/5.4.4_add_personal_details_info_text_config.php b/db/migrations/5.4.4_add_personal_details_info_text_config.php new file mode 100644 index 0000000000000000000000000000000000000000..0cf52d8fb2b3aea3bb960a5ae6499b9a7c338450 --- /dev/null +++ b/db/migrations/5.4.4_add_personal_details_info_text_config.php @@ -0,0 +1,44 @@ +<?php + +class AddPersonalDetailsInfoTextConfig extends Migration +{ + public function description() + { + return 'Adds the configuration PERSONAL_DETAILS_INFO_TEXT, if it doesn\'t exist yet. Also adds english translation.'; + } + + protected function up() + { + $db = DBManager::get(); + + $db->exec( + "INSERT IGNORE INTO `config` + (`field`, `value`, `type`, `range`, `section`, `mkdate`, `chdate`, `description`) + VALUES + ( + 'PERSONAL_DETAILS_INFO_TEXT', 'Einige Ihrer persönlichen Daten werden nicht in Stud.IP verwaltet und können daher hier nicht geändert werden.', + 'i18n', 'global', 'global', UNIX_TIMESTAMP(), UNIX_TIMESTAMP(), + 'Der Infotext der unter Profil->Persönliche Angaben->Grunddaten angezeigt wird, wenn man nicht die Standard-Auth nutzt.' + )" + ); + + $db->execute( + "INSERT IGNORE INTO `i18n` + (`object_id`, `table`, `field`, `lang`, `value`) + VALUES + ( + MD5('PERSONAL_DETAILS_INFO_TEXT'), 'config', 'value', 'en_GB', + 'Some of your personal data is not managed in Stud.IP and therefore cannot be changed here.' + )" + ); + } + + protected function down() + { + $db = DBManager::get(); + + $db->exec("DELETE FROM `config_values` WHERE `field` = 'PERSONAL_DETAILS_INFO_TEXT'"); + $db->exec("DELETE FROM `config` WHERE `field` = 'PERSONAL_DETAILS_INFO_TEXT'"); + $db->exec("DELETE FROM `i18n` WHERE `object_id` = MD5('PERSONAL_DETAILS_INFO_TEXT') AND `table` = 'config' AND `field` = 'value'"); + } +}