lib: replace two PG::Connection.connect with PG::Connection.new.
authorMichael Orlitzky <michael@orlitzky.com>
Sat, 25 Jul 2020 01:15:40 +0000 (21:15 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Sat, 25 Jul 2020 01:15:40 +0000 (21:15 -0400)
lib/common/roundcube_plugin.rb
lib/rm/plugins/roundcube.rb

index a4300c4a016bcd8f85d6177edd76f1ee51378426..b66c9f603cf2e4c665de427d33f6210108db3b1f 100644 (file)
@@ -47,7 +47,7 @@ module RoundcubePlugin
   def list_users()
     usernames = []
 
-    connection = PG::Connection.connect(@db_hash)
+    connection = PG::Connection.new(@db_hash)
 
     sql_query = 'SELECT username FROM users;'
 
index c7ccaa4ccba3865e3572afa396ed047ed9f5c83f..cb55af7dfb2394b166c2be856f512ab7cdbf7712 100644 (file)
@@ -29,7 +29,7 @@ class RoundcubeRm
     # records associated with user_id too.
     sql_query = 'DELETE FROM users WHERE user_id = $1::int;'
 
-    connection = PG::Connection.connect(@db_hash)
+    connection = PG::Connection.new(@db_hash)
 
     begin
       connection.query(sql_query, [user_id])