From b25f80e114da380b464c9a3295763f74917d43ee Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Sun, 4 Mar 2007 05:35:11 +0000 Subject: [PATCH] placeholder conversion for the ProfileField module --- lib/WebGUI/ProfileField.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/WebGUI/ProfileField.pm b/lib/WebGUI/ProfileField.pm index 59bf595b8..daddc33a4 100644 --- a/lib/WebGUI/ProfileField.pm +++ b/lib/WebGUI/ProfileField.pm @@ -99,8 +99,8 @@ sub create { my $fieldName = shift; my $properties = shift; my $categoryId = shift || "1"; - my ($fieldNameExists) = $session->db->quickArray("select count(*) from userProfileField where fieldName=".$session->db->quote($fieldName)); - return undef if ($fieldNameExists); + my $fieldNameExists = $session->db->quickScalar("select count(*) from userProfileField where fieldName=?", [$fieldName]); + return undef if $fieldNameExists; return undef if $class->isReservedFieldName($fieldName); my $id = $session->db->setRow("userProfileField","fieldName",{fieldName=>"new"},$fieldName); @@ -120,7 +120,7 @@ Deletes this field and all user data attached to it. sub delete { my $self = shift; - $self->session->db->write("delete from userProfileData where fieldName=".$self->session->db->quote($self->getId)); + $self->session->db->write("delete from userProfileData where fieldName=?", [$self->getId]); $self->session->db->deleteRow("userProfileField","fieldName",$self->getId); }