mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-11 00:40:56 +02:00
[ticket/12771] Bug in profilefield_base_migration when used in ext
The base migration class should create lang entry for the new CPF but it is supposed to strip it of phpbb_ prefix. As extensions CPFs do not use phpbb_ prefix it will not create a lang entry. This is as simple solution as it can be done. PHPBB3-12771
This commit is contained in:
@ -79,12 +79,13 @@ abstract class profilefield_base_migration extends \phpbb\db\migration\migration
|
||||
$sql = 'SELECT lang_id
|
||||
FROM ' . LANG_TABLE;
|
||||
$result = $this->db->sql_query($sql);
|
||||
$field_name = (substr($this->profilefield_name, 6) == 'phpbb_') ? strtoupper(substr($this->profilefield_name, 6)) : strtoupper($this->profilefield_name);
|
||||
while ($lang_id = (int) $this->db->sql_fetchfield('lang_id'))
|
||||
{
|
||||
$insert_buffer->insert(array(
|
||||
'field_id' => $field_id,
|
||||
'lang_id' => $lang_id,
|
||||
'lang_name' => strtoupper(substr($this->profilefield_name, 6)),// Remove phpbb_ from field name
|
||||
'lang_name' => $field_name,
|
||||
'lang_explain' => '',
|
||||
'lang_default_value' => '',
|
||||
));
|
||||
|
Reference in New Issue
Block a user