1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-21 16:01:40 +02:00

[ticket/11201] Move grabbing the input of the language options to type class

PHPBB3-11201
This commit is contained in:
Joas Schilling
2014-01-16 16:00:52 +01:00
parent 78603bb96d
commit 0bdec35cd4
8 changed files with 99 additions and 27 deletions

View File

@@ -48,6 +48,14 @@ class lang_helper
foreach ($lang_options as $num => $var)
{
if (!isset($this->options_lang[$field_id]))
{
$this->options_lang[$field_id] = array();
}
if (!isset($this->options_lang[$field_id][$lang_id]))
{
$this->options_lang[$field_id][$lang_id] = array();
}
$this->options_lang[$field_id][$lang_id][($num + 1)] = $var;
}
}
@@ -104,7 +112,7 @@ class lang_helper
*/
public function get($field_id, $lang_id, $field_value = null)
{
if (!is_null($field_value))
if (is_null($field_value))
{
return $this->options_lang[$field_id][$lang_id];
}