diff options
author | Simon Rettberg | 2015-02-04 17:58:01 +0100 |
---|---|---|
committer | Simon Rettberg | 2015-02-04 17:58:01 +0100 |
commit | 43bc68c732338be2e82c5c516f20704e12d82a7c (patch) | |
tree | 3cd7b72884b70906e2898bcff643720d88d4cbac /inc/up_json_encode.php | |
parent | Config.tgz improvements, automatic rebuilds etc. (diff) | |
download | slx-admin-43bc68c732338be2e82c5c516f20704e12d82a7c.tar.gz slx-admin-43bc68c732338be2e82c5c516f20704e12d82a7c.tar.xz slx-admin-43bc68c732338be2e82c5c516f20704e12d82a7c.zip |
Finish config module editing
Diffstat (limited to 'inc/up_json_encode.php')
-rw-r--r-- | inc/up_json_encode.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/inc/up_json_encode.php b/inc/up_json_encode.php index 28556923..c33cb012 100644 --- a/inc/up_json_encode.php +++ b/inc/up_json_encode.php @@ -1,5 +1,10 @@ <?php +if (defined('JSON_PRETTY_PRINT')) + define('JSON_NATIVE', true); +else + define('JSON_NATIVE', false); + /** * api: php * title: upgrade.php @@ -78,6 +83,8 @@ if (!defined("JSON_UNESCAPED_SLASHES")) { function up_json_encode($var, $options = 0, $_indent = "") { + if (defined('JSON_NATIVE') && JSON_NATIVE) + return json_encode($var, $options); global ${'.json_last_error'}; ${'.json_last_error'} = JSON_ERROR_NONE; |