RT 3.8.17
[freeside.git] / rt / lib / RT / Handle.pm
index 38905de..e9ee4ab 100644 (file)
@@ -2,7 +2,7 @@
 #
 # COPYRIGHT:
 #
-# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC
 #                                          <sales@bestpractical.com>
 #
 # (Except where explicitly superseded by other copyright notices)
@@ -239,8 +239,9 @@ sub CheckIntegrity {
         return (0, 'no connection', "Failed to connect to $dsn as user '$user': ". $DBI::errstr);
     }
 
-    RT::ConnectToDatabase();
-    RT::InitLogging();
+    unless ($RT::Handle and $RT::Handle->dbh) {
+        RT::ConnectToDatabase();
+    }
 
     require RT::CurrentUser;
     my $test_user = new RT::CurrentUser;