changelog für TopQuickSearch Benutzereinstellung
[kivitendo-erp.git] / SL / CT.pm
index d8497d0..57ee031 100644 (file)
--- a/SL/CT.pm
+++ b/SL/CT.pm
@@ -25,7 +25,8 @@
 # GNU General Public License for more details.
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+# MA 02110-1335, USA.
 #======================================================================
 #
 # backend code for customers and vendors
@@ -40,6 +41,7 @@ package CT;
 use SL::Common;
 use SL::CVar;
 use SL::DBUtils;
+use SL::DB;
 use Text::ParseWords;
 
 use strict;
@@ -341,7 +343,7 @@ sub get_contact {
 
   die 'Missing argument: cp_id' unless $::form->{cp_id};
 
-  my $dbh   = $form->dbconnect($myconfig);
+  my $dbh   = SL::DB->client->dbh;
   my $query =
     qq|SELECT * FROM contacts c | .
     qq|WHERE cp_id = ? ORDER BY cp_id limit 1|;
@@ -359,7 +361,6 @@ sub get_contact {
   ($form->{cp_used}) = selectfirst_array_query($form, $dbh, $query, ($form->{cp_id})x2);
 
   $sth->finish;
-  $dbh->disconnect;
 
   $main::lxdebug->leave_sub();
 }