X-Git-Url: http://gitweb.michael.orlitzky.com/?p=mailshears.git;a=blobdiff_plain;f=lib%2Fcommon%2Froundcube_plugin.rb;h=6d522bb371847e433906af3792f74545916bd7cc;hp=b66c9f603cf2e4c665de427d33f6210108db3b1f;hb=HEAD;hpb=adaab0ea0fb8ae690ac7c7d5a69a079467252767 diff --git a/lib/common/roundcube_plugin.rb b/lib/common/roundcube_plugin.rb index b66c9f6..2ba9a98 100644 --- a/lib/common/roundcube_plugin.rb +++ b/lib/common/roundcube_plugin.rb @@ -19,7 +19,6 @@ module RoundcubePlugin :host => cfg.roundcube_dbhost, :port => cfg.roundcube_dbport, :options => cfg.roundcube_dbopts, - :tty => cfg.roundcube_dbtty, :dbname => cfg.roundcube_dbname, :user => cfg.roundcube_dbuser, :password => cfg.roundcube_dbpass } @@ -52,7 +51,7 @@ module RoundcubePlugin sql_query = 'SELECT username FROM users;' begin - connection.query(sql_query) do |result| + connection.sync_exec(sql_query) do |result| usernames = result.field_values('username') end ensure @@ -79,7 +78,7 @@ module RoundcubePlugin sql_query = 'SELECT user_id FROM users WHERE username = $1;' begin - connection.query(sql_query, [user.to_s()]) do |result| + connection.sync_exec_params(sql_query, [user.to_s()]) do |result| if result.num_tuples > 0 user_id = result[0]['user_id'] end