From c83b4b385ced179e7abc1c3412cdfd4d0693838f Mon Sep 17 00:00:00 2001 From: JT Smith Date: Wed, 7 Dec 2005 15:13:40 +0000 Subject: [PATCH] undoing matt's fuck up because he's a big dirty bitch and i told him i'd be saying so in the cvs commit logs --- lib/WebGUI/ProfileField.pm | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/WebGUI/ProfileField.pm b/lib/WebGUI/ProfileField.pm index 57f57bc76..721243050 100644 --- a/lib/WebGUI/ProfileField.pm +++ b/lib/WebGUI/ProfileField.pm @@ -83,7 +83,7 @@ sub create { my $id = WebGUI::SQL->setRow("userProfileField","fieldName",{fieldName=>"new"},undef,$fieldName); my $self = $class->new($id); $self->setCategory($categoryId || "1"); - $self->set($properties); + $self->update($properties); return $self; } @@ -312,17 +312,17 @@ sub set { $properties->{editable} = 0 unless ($properties->{editable} == 1); $properties->{protected} = 0 unless ($properties->{protected} == 1); $properties->{required} = 0 unless ($properties->{required} == 1); - $properties->{fieldLabel} = 'Undefined' if ($properties->{fieldLabel} =~ /^[\"\']*$/); - $properties->{dataType} = 'text' unless ($properties->{dataType}); - if ($properties->{defaultValues} && $properties->{dataType}=~/List$/) { - unless ($properties->{dataValues} =~ /^\[/) { - $properties->{dataValues} = "[".$properties->{defaultValues}; + $properties->{label} = 'Undefined' if ($properties->{label} =~ /^[\"\']*$/); + $properties->{fieldType} = 'text' unless ($properties->{fieldType}); + if ($properties->{defaultValues} && $properties->{fieldType}=~/List$/) { + unless ($properties->{defaultValues} =~ /^\[/) { + $properties->{defaultValues} = "[".$properties->{defaultValues}; } - unless ($properties->{dataValues} =~ /\]$/) { - $properties->{dataValues} .= "]"; + unless ($properties->{defaultValues} =~ /\]$/) { + $properties->{defaultValues} .= "]"; } } - WebGUI::SQL->setRow("userProfileField","profileCategoryId",$properties); + WebGUI::SQL->setRow("userProfileCategory","profileCategoryId",$properties); foreach my $key (keys %{$properties}) { $self->{_property}{$key} = $properties->{$key}; }