Skip to content

Commit

Permalink
More precise WHERE clause and a bit code style.
Browse files Browse the repository at this point in the history
Co-authored-by: Richard Fath <richard67@users.noreply.github.com>
  • Loading branch information
tatankat and richard67 committed Jun 16, 2022
1 parent 1364b8f commit 34e2f4d
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
UPDATE `#__extensions`
SET `params` = REPLACE(`params`,'"negotiate_tls":1','"encryption":"tls"')
WHERE `client_id` = 0
AND `name` = 'plg_authentication_ldap'
SET `params` = REPLACE(`params`, '"negotiate_tls":1', '"encryption":"tls"')
WHERE `name` = 'plg_authentication_ldap'
AND `type` = 'plugin'
AND `element` = 'plugin'
AND `folder` = 'authentication'
AND `client_id` = 0
AND `params` LIKE '{%"negotiate_tls":1%}';

UPDATE `#__extensions`
SET `params` = REPLACE(`params`,'"negotiate_tls":0','"encryption":"none"')
WHERE `client_id` = 0
AND `name` = 'plg_authentication_ldap'
SET `params` = REPLACE(`params`, '"negotiate_tls":0', '"encryption":"none"')
WHERE `name` = 'plg_authentication_ldap'
AND `type` = 'plugin'
AND `element` = 'plugin'
AND `folder` = 'authentication'
AND `client_id` = 0
AND `params` LIKE '{%"negotiate_tls":0%}';

Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
UPDATE "#__extensions"
SET "params" = REPLACE("params",'"negotiate_tls":1','"encryption":"tls"')
WHERE "client_id" = 0
AND "name" = 'plg_authentication_ldap'
SET "params" = REPLACE("params", '"negotiate_tls":1', '"encryption":"tls"')
WHERE "name" = 'plg_authentication_ldap'
AND "type" = 'plugin'
AND "element" = 'plugin'
AND "folder" = 'authentication'
AND "client_id" = 0
AND "params" LIKE '{%"negotiate_tls":1%}';

UPDATE "#__extensions"
SET "params" = REPLACE("params",'"negotiate_tls":0','"encryption":"none"')
WHERE "client_id" = 0
AND "name" = 'plg_authentication_ldap'
SET "params" = REPLACE("params", '"negotiate_tls":0', '"encryption":"none"')
WHERE "name" = 'plg_authentication_ldap'
AND "type" = 'plugin'
AND "element" = 'plugin'
AND "folder" = 'authentication'
AND "client_id" = 0
AND "params" LIKE '{%"negotiate_tls":0%}';

0 comments on commit 34e2f4d

Please sign in to comment.