prevent stuff passed from template/user from being used in searches by signup server
[freeside.git] / FS / FS / cust_pkg.pm
index b7633c1..a4256ea 100644 (file)
@@ -145,7 +145,7 @@ sub insert {
   my $agent = qsearchs( 'agent', { 'agentnum' => $cust_main->agentnum } );
   my $pkgpart_href = $agent->pkgpart_hashref;
   return "agent ". $agent->agentnum. " can't purchase pkgpart ". $self->pkgpart
-    unless $pkgpart_href->{ $self->{pkgpart} };
+    unless $pkgpart_href->{ $self->pkgpart };
 
   $self->SUPER::insert;
 
@@ -225,7 +225,7 @@ sub check {
     return "Unknown customer ". $self->custnum unless $self->cust_main;
   }
 
-  return "Unknown pkgpart"
+  return "Unknown pkgpart: ". $self->pkgpart
     unless qsearchs( 'part_pkg', { 'pkgpart' => $self->pkgpart } );
 
   $self->otaker(getotaker) unless $self->otaker;
@@ -701,7 +701,7 @@ sub order {
 
 =head1 VERSION
 
-$Id: cust_pkg.pm,v 1.19 2002-04-22 20:47:21 ivan Exp $
+$Id: cust_pkg.pm,v 1.21 2002-05-04 00:47:24 ivan Exp $
 
 =head1 BUGS