Fix escapes in Ushahidi update_email
This commit is contained in:
parent
9f6ff9f0ee
commit
db514b6f4f
@ -105,10 +105,10 @@ def update_email(email):
|
||||
replace_file_line('/srv/sigmah/conf/sigmah.properties', 'mail.support.to=', email)
|
||||
# Ushahidi
|
||||
if app_exists('ushahidi'):
|
||||
email_json = '{\\"incoming_type\\":\\"IMAP\\",\\"incoming_server\\":\\"localhost\\",\\"incoming_port\\":143,\\"incoming_security\\":\\"None\\",\\"incoming_username\\":\\"{}\\",\\"incoming_password\\":\\"password\\",\\"outgoing_type\\":\\"SMTP\\",\\"outgoing_server\\":\\"postfix\\",\\"outgoing_port\\":25,\\"outgoing_security\\":\\"None\\",\\"outgoing_username\\":\\"{}\\",\\"outgoing_password\\":\\"password\\",\\"from\\":\\"{}\\",\\"from_name\\":\\"Ushahidi\\"}'.format(email, email, email)
|
||||
email_json = '{{\\"incoming_type\\":\\"IMAP\\",\\"incoming_server\\":\\"localhost\\",\\"incoming_port\\":143,\\"incoming_security\\":\\"None\\",\\"incoming_username\\":\\"{}\\",\\"incoming_password\\":\\"password\\",\\"outgoing_type\\":\\"SMTP\\",\\"outgoing_server\\":\\"postfix\\",\\"outgoing_port\\":25,\\"outgoing_security\\":\\"None\\",\\"outgoing_username\\":\\"{}\\",\\"outgoing_password\\":\\"password\\",\\"from\\":\\"{}\\",\\"from_name\\":\\"Ushahidi\\"}}'.format(email, email, email)
|
||||
query = 'UPDATE `config` SET `config_value` = "{}" WHERE `group_name` LIKE "data-provider" AND `config_key` LIKE "email";'.format(email_json)
|
||||
run_mysql_query(query, 'ushahidi')
|
||||
query = 'UPDATE `config` SET `config_value` = "\"{}\"" WHERE `group_name` LIKE "site" AND `config_key` LIKE "email";'.format(email)
|
||||
query = 'UPDATE `config` SET `config_value` = "\\"{}\\"" WHERE `group_name` LIKE "site" AND `config_key` LIKE "email";'.format(email)
|
||||
run_mysql_query(query, 'ushahidi')
|
||||
|
||||
def update_url(host):
|
||||
|
Loading…
Reference in New Issue
Block a user