1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

[ticket/11201] Fix dropdown tests

The error message is now already the language string including the fieldname
and not the language key anymore.

PHPBB3-11201
This commit is contained in:
Joas Schilling
2014-01-15 12:36:54 +01:00
parent 7fd5f16fa2
commit 1dbc2d6218
3 changed files with 73 additions and 60 deletions

View File

@@ -79,16 +79,16 @@ class lang_helper
*/
public function is_set($field_id, $lang_id = null, $field_value = null)
{
$is_set = isset($this->lang_helper->options_lang[$field_id]);
$is_set = isset($this->options_lang[$field_id]);
if ($is_set && (!is_null($lang_id) || !is_null($field_value)))
{
$is_set = isset($this->lang_helper->options_lang[$field_id][$lang_id]);
$is_set = isset($this->options_lang[$field_id][$lang_id]);
}
if ($is_set && !is_null($field_value))
{
$is_set = isset($this->lang_helper->options_lang[$field_id][$lang_id][$field_value]);
$is_set = isset($this->options_lang[$field_id][$lang_id][$field_value]);
}
return $is_set;
@@ -106,9 +106,9 @@ class lang_helper
{
if (!is_null($field_value))
{
return $this->lang_helper->options_lang[$field_id][$lang_id];
return $this->options_lang[$field_id][$lang_id];
}
return $this->lang_helper->options_lang[$field_id][$lang_id][$field_value];
return $this->options_lang[$field_id][$lang_id][$field_value];
}
}