From adaab0ea0fb8ae690ac7c7d5a69a079467252767 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Fri, 24 Jul 2020 21:15:40 -0400 Subject: [PATCH] lib: replace two PG::Connection.connect with PG::Connection.new. --- lib/common/roundcube_plugin.rb | 2 +- lib/rm/plugins/roundcube.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/common/roundcube_plugin.rb b/lib/common/roundcube_plugin.rb index a4300c4..b66c9f6 100644 --- a/lib/common/roundcube_plugin.rb +++ b/lib/common/roundcube_plugin.rb @@ -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;' diff --git a/lib/rm/plugins/roundcube.rb b/lib/rm/plugins/roundcube.rb index c7ccaa4..cb55af7 100644 --- a/lib/rm/plugins/roundcube.rb +++ b/lib/rm/plugins/roundcube.rb @@ -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]) -- 2.44.2