diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2014-06-27 15:30:49 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2014-06-27 15:30:49 +0200 |
commit | 8fa4ca49e0797bd04be3e2a9d7733784e5a5ec11 (patch) | |
tree | e3367103e00cc747c8c8a8e41389c03944088b3e | |
parent | b0286bf8544490f4faa1ca7e20b5769311e5a43a (diff) | |
parent | deb393bff3d829b6531dd8ef18023e41f8d3357c (diff) | |
download | forums-8fa4ca49e0797bd04be3e2a9d7733784e5a5ec11.tar forums-8fa4ca49e0797bd04be3e2a9d7733784e5a5ec11.tar.gz forums-8fa4ca49e0797bd04be3e2a9d7733784e5a5ec11.tar.bz2 forums-8fa4ca49e0797bd04be3e2a9d7733784e5a5ec11.tar.xz forums-8fa4ca49e0797bd04be3e2a9d7733784e5a5ec11.zip |
Merge pull request #2658 from lucifer4o/ticket/12771
[ticket/12771] Bug in profilefield_base_migration when used in ext
* lucifer4o/ticket/12771:
[ticket/12771] Shanging substr to strpos
[ticket/12771] Change var name
[ticket/12771] Bug in profilefield_base_migration when used in ext
-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..d416a9b228 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); + $lang_name = (strpos($this->profilefield_name, 'phpbb_') === 0) ? 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' => $lang_name, 'lang_explain' => '', 'lang_default_value' => '', )); |