Skip to content

Commit

Permalink
Escape " in JSON Arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
darknoon29 committed Feb 5, 2020
1 parent d7f877b commit f96507c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions install.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@
$db->sql_query($query);

// on insère les valeurs de configuration par défaut
$sqldata = '{"transp":75,"layer":1,"defenseur":1,"histo":1}';
$sqldata = '{\"transp\":75,\"layer\":1,\"defenseur\":1,\"histo\":1}';
mod_set_option('config', $sqldata);

// on insère les valeurs bbcodes par défaut
$sqldata = '{"title":"#FFA500","m_g":"#00FF40","c_g":"#00FF40","d_g":"#00FF40","m_r":"#00FF40","c_r":"#00FF40","perte":"#FF0000","renta":"#00FF40"}';
$sqldata = '{\"title\":\"#FFA500\",\"m_g\":\"#00FF40\",\"c_g\":\"#00FF40\",\"d_g\":\"#00FF40\",\"m_r\":\"#00FF40\",\"c_r\":\"#00FF40\",\"perte\":\"#FF0000\",\"renta\":\"#00FF40\"}';
mod_set_option('bbcodes', $sqldata);

//On vérifie que la table xtense_callbacks existe (Xtense2)
Expand Down
4 changes: 2 additions & 2 deletions update.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@
if (version_compare( $version , '2.0.0.', '<')) {

// on insère les valeurs de configuration par défaut car changement de format de données
$sqldata = '{"transp":75,"layer":1,"defenseur":1,"histo":1}';
$sqldata = '{\"transp\":75,\"layer\":1,\"defenseur\":1,\"histo\":1}';
mod_set_option('config', $sqldata);

// on insère les valeurs bbcodes par défaut
$sqldata = '{"title":"#FFA500","m_g":"#00FF40","c_g":"#00FF40","d_g":"#00FF40","m_r":"#00FF40","c_r":"#00FF40","perte":"#FF0000","renta":"#00FF40"}';
$sqldata = '{\"title\":\"#FFA500\",\"m_g\":\"#00FF40\",\"c_g\":\"#00FF40\",\"d_g\":\"#00FF40\",\"m_r\":\"#00FF40\",\"c_r\":\"#00FF40\",\"perte\":\"#FF0000\",\"renta\":\"#00FF40\"}';
mod_set_option('bbcodes', $sqldata);
}

Expand Down

0 comments on commit f96507c

Please sign in to comment.