X-Git-Url: http://gitweb.michael.orlitzky.com/?p=mailshears.git;a=blobdiff_plain;f=lib%2Fmv%2Fplugins%2Fagendav.rb;h=a2fb05438dd0cb5808b45d9d64f80d323fa0b037;hp=2177009e67295b07b3762966976668e2a932b3ef;hb=fa7782720ff15fce29b6f875678e9fd0c197485a;hpb=deef740ad4201e9a7db6d9b7411b596ec89c2e89 diff --git a/lib/mv/plugins/agendav.rb b/lib/mv/plugins/agendav.rb index 2177009..a2fb054 100644 --- a/lib/mv/plugins/agendav.rb +++ b/lib/mv/plugins/agendav.rb @@ -40,7 +40,7 @@ class AgendavMv # The "prefs" table uses the normal username as a key... # This should be harmless if the source user does not exist. sql_query0 = 'UPDATE prefs SET username = $1 WHERE username = $2;' - connection.query(sql_query0, [dst.to_s(), src.to_s()]) + connection.sync_exec_params(sql_query0, [dst.to_s(), src.to_s()]) # But the "shares" table uses encoded principal URLs. For the # "shares" table, we need to do a find/replace on the username @@ -58,7 +58,7 @@ class AgendavMv sql_queries << 'UPDATE shares SET "with"=REPLACE("with", $2, $1);' sql_queries.each do |sql_query| - connection.query(sql_query, [encoded_dst, encoded_src]) + connection.sync_exec_params(sql_query, [encoded_dst, encoded_src]) end ensure # Make sure the connection gets closed even if a query explodes.