remove old test files
[freeside.git] / FS / FS / ClientAPI.pm
index 1fea28c..c36fd55 100644 (file)
@@ -3,6 +3,7 @@ package FS::ClientAPI;
 use strict;
 use base 'Exporter';
 use vars qw( @EXPORT_OK %handler $domain $DEBUG $me );
+use FS::UID qw( dbh );
 
 @EXPORT_OK = qw( load_clientapi_modules );
 
@@ -35,9 +36,17 @@ sub dispatch {
   my ( $self, $name ) = ( shift, shift );
   $name =~ s(/)(::)g;
   my $sub = "FS::ClientAPI::$name";
+
+  dbh->{'private_profile'} = {};
+
   warn "$me dispatch: calling $sub with args @_\n" if $DEBUG;
   no strict 'refs';
-  &{$sub}(@_);
+  my $rv = &{$sub}(@_);
+
+  warn dbh->sprintProfile if dbh->can('sprintProfile');
+  dbh->{'private_profile'} = {};
+
+  $rv;
 }
 
 1;