diff options
| author | Stanislav Atanasov <lucifer@anavaro.com> | 2014-06-26 11:28:52 +0300 | 
|---|---|---|
| committer | Stanislav Atanasov <lucifer@anavaro.com> | 2014-06-26 13:18:27 +0300 | 
| commit | 5a76b36dfb7b2144e63cef51042c5b60fc049ac0 (patch) | |
| tree | e43abda1b6b85fc35e7fe4bb29042d360578a89b /phpBB/phpbb | |
| parent | 69b9aa2859441116c02ea0b36f6f3a53b8c1eda1 (diff) | |
| download | forums-5a76b36dfb7b2144e63cef51042c5b60fc049ac0.tar forums-5a76b36dfb7b2144e63cef51042c5b60fc049ac0.tar.gz forums-5a76b36dfb7b2144e63cef51042c5b60fc049ac0.tar.bz2 forums-5a76b36dfb7b2144e63cef51042c5b60fc049ac0.tar.xz forums-5a76b36dfb7b2144e63cef51042c5b60fc049ac0.zip  | |
[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
Diffstat (limited to 'phpBB/phpbb')
| -rw-r--r-- | phpBB/phpbb/db/migration/profilefield_base_migration.php | 3 | 
1 files changed, 2 insertions, 1 deletions
diff --git a/phpBB/phpbb/db/migration/profilefield_base_migration.php b/phpBB/phpbb/db/migration/profilefield_base_migration.php index 9cdd5d0927..7927154ded 100644 --- a/phpBB/phpbb/db/migration/profilefield_base_migration.php +++ b/phpBB/phpbb/db/migration/profilefield_base_migration.php @@ -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'	=> '',  			));  | 
