Changed a comment in UserField.pm to be more accurate: it is actually safe to change the userID on the fly from an undefined value to a defined value because the code only uses it at two points: creation, if it was defined (used by the caller) and destruction (at which point it is passed to the data source to save any changes).

This commit is contained in:
ian%hixie.ch 2001-11-10 20:53:37 +00:00
Родитель ceb11d6d7f
Коммит 503d696c7e
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -58,7 +58,7 @@ sub init {
my($app, $user, $fieldID, $fieldCategory, $fieldName, $fieldTypeData, $fieldMode, $fieldData) = @_;
# do not hold on to $user!
$self->app($app);
$self->userID($user->userID); # change this at your peril
$self->userID($user->userID); # only change this if it started as undef
$self->fieldID($fieldID); # change this at your peril
$self->category($fieldCategory); # change this at your peril
$self->name($fieldName); # change this at your peril