Sfoglia il codice sorgente

! [4554] : $txt['digits_only'] not used (Profile.english.php)

Spuds 13 anni fa
parent
commit
e3722cab36

+ 4 - 1
Sources/Profile-Modify.php

@@ -467,7 +467,10 @@ function loadProfileFields($force_reload = false)
 			'size' => 7,
 			'permission' => 'moderate_forum',
 			'input_validate' => create_function('&$value', '
-				$value = $value != \'\' ? strtr($value, array(\',\' => \'\', \'.\' => \'\', \' \' => \'\')) : 0;
+				if (!is_numeric($value))
+					return \'digits_only\';
+				else
+					$value = $value != \'\' ? strtr($value, array(\',\' => \'\', \'.\' => \'\', \' \' => \'\')) : 0;
 				return true;
 			'),
 		),

+ 1 - 0
Themes/default/languages/Errors.english.php

@@ -308,6 +308,7 @@ $txt['error_no_search_daemon'] = 'Unable to access the search daemon';
 $txt['profile_errors_occurred'] = 'The following errors occurred when trying to save your profile';
 $txt['profile_error_bad_offset'] = 'The time offset is out of range';
 $txt['profile_error_no_name'] = 'The name field was left blank';
+$txt['profile_error_digits_only'] = 'The \'number of posts\' box can only contain digits.';
 $txt['profile_error_name_taken'] = 'The selected username/display name has already been taken';
 $txt['profile_error_name_too_long'] = 'The selected name is too long. It should be no greater than 60 characters long';
 $txt['profile_error_no_email'] = 'The email field was left blank';

+ 0 - 1
Themes/default/languages/Profile.english.php

@@ -43,7 +43,6 @@ $txt['max_sig_characters'] = 'Max characters: %1$d; characters remaining: ';
 $txt['send_member_pm'] = 'Send this member a personal message';
 $txt['hidden'] = 'hidden';
 $txt['current_time'] = 'Current forum time';
-$txt['digits_only'] = 'The \'number of posts\' box can only contain digits.';
 
 $txt['language'] = 'Language';
 $txt['avatar_too_big'] = 'Avatar image is too big, please resize it and try again (max';

BIN
avatars/blank.gif