phpBB

Code Changes

File: phpbb/profilefields/type/type_dropdown.php

  Unmodified   Added   Modified   Removed
Line 282Line 282
	*/
public function validate_options_on_submit($error, $field_data)
{

	*/
public function validate_options_on_submit($error, $field_data)
{

		if (!sizeof($field_data['lang_options']))

		if (!count($field_data['lang_options']))

		{
$error[] = $this->user->lang['NO_FIELD_ENTRIES'];
}

		{
$error[] = $this->user->lang['NO_FIELD_ENTRIES'];
}

Line 298Line 298
		if ($step == 2 && $key == 'field_maxlen')
{
// Get the number of options if this key is 'field_maxlen'

		if ($step == 2 && $key == 'field_maxlen')
{
// Get the number of options if this key is 'field_maxlen'

			return sizeof(explode("\n", $this->request->variable('lang_options', '', true)));

			return count(explode("\n", $this->request->variable('lang_options', '', true)));

		}

return parent::get_excluded_options($key, $action, $current_value, $field_data, $step);

		}

return parent::get_excluded_options($key, $action, $current_value, $field_data, $step);

Line 310Line 310
	public function display_options(&$template_vars, &$field_data)
{
// Initialize these array elements if we are creating a new field

	public function display_options(&$template_vars, &$field_data)
{
// Initialize these array elements if we are creating a new field

		if (!sizeof($field_data['lang_options']))

		if (!count($field_data['lang_options']))

		{
// No options have been defined for the dropdown menu
$field_data['lang_options'] = array();

		{
// No options have been defined for the dropdown menu
$field_data['lang_options'] = array();