[ticket/8904] Show default value for numeric custom profile fields when editing

When displaying the default value for a numeric custom profile field, only use
request_var to obtain the value on creation. When editing, it will always
override the actual value with an empty string, as this is request_var's default
return value.

PHPBB3-8904
This commit is contained in:
Niklas Schmidtmer 2011-02-13 18:29:30 +01:00 committed by Igor Wiedler
parent 42707053a2
commit c717e44094

View file

@ -512,7 +512,7 @@ class acp_profile
else if ($field_type == FIELD_INT && $key == 'field_default_value') else if ($field_type == FIELD_INT && $key == 'field_default_value')
{ {
// Permit an empty string // Permit an empty string
if (request_var('field_default_value', '') === '') if ($action == 'create' && request_var('field_default_value', '') === '')
{ {
$var = ''; $var = '';
} }