From 710cb109d19a0f84b44264505b788e6fba86151b Mon Sep 17 00:00:00 2001 From: Lucas Bartholemy Date: Mon, 17 Feb 2020 14:21:55 +0100 Subject: [PATCH] Fix #3864: Profile field translations broken --- protected/humhub/docs/CHANGELOG.md | 2 + ...m200217_122108_profile_translation_fix.php | 44 +++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 protected/humhub/modules/user/migrations/m200217_122108_profile_translation_fix.php diff --git a/protected/humhub/docs/CHANGELOG.md b/protected/humhub/docs/CHANGELOG.md index 2980b0ece8..1aeda68ab6 100644 --- a/protected/humhub/docs/CHANGELOG.md +++ b/protected/humhub/docs/CHANGELOG.md @@ -8,6 +8,8 @@ HumHub Change Log - Fix #3849: ModuleCleanupJob produces an error due to ".." in path - Fix #3860: Console/Cli Marketplace actions broken - Fix #3862: Profile field type checkbox list with multiple values broken +- Fix #3864: Profile field translations broken + 1.4.0 (February 4, 2020) ------------------------ diff --git a/protected/humhub/modules/user/migrations/m200217_122108_profile_translation_fix.php b/protected/humhub/modules/user/migrations/m200217_122108_profile_translation_fix.php new file mode 100644 index 0000000000..009bf1da9d --- /dev/null +++ b/protected/humhub/modules/user/migrations/m200217_122108_profile_translation_fix.php @@ -0,0 +1,44 @@ +update('profile_field', ['translation_category' => 'UserModule.models_Profile'], ['translation_category' => 'UserModule.models_Profile']); + $this->update('profile_field', ['title' => 'First name'], ['title' => 'Firstname', 'internal_name' => 'firstname']); + $this->update('profile_field', ['title' => 'Last name'], ['title' => 'Lastname', 'internal_name' => 'lastname']); + } + + /** + * {@inheritdoc} + */ + public function safeDown() + { + echo "m200217_122108_profile_translation_fix cannot be reverted.\n"; + + return false; + } + + /* + // Use up()/down() to run migration code without a transaction. + public function up() + { + + } + + public function down() + { + echo "m200217_122108_profile_translation_fix cannot be reverted.\n"; + + return false; + } + */ +}