Fix #3864: Profile field translations broken

This commit is contained in:
Lucas Bartholemy 2020-02-17 14:21:55 +01:00
parent 501c8448d8
commit 710cb109d1
2 changed files with 46 additions and 0 deletions

View File

@ -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)
------------------------

View File

@ -0,0 +1,44 @@
<?php
use yii\db\Migration;
/**
* Class m200217_122108_profile_translation_fix
*/
class m200217_122108_profile_translation_fix extends Migration
{
/**
* {@inheritdoc}
*/
public function safeUp()
{
$this->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;
}
*/
}