From b5b3f9ba5dbabc862dcfe517689cace86367a690 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Wed, 6 Nov 2019 15:44:45 +0100 Subject: [translation] Get rid of up_json_encode This was needed in pre-5.4.0 times. Long gone. --- modules-available/translation/page.inc.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'modules-available/translation') diff --git a/modules-available/translation/page.inc.php b/modules-available/translation/page.inc.php index 7d5229d7..34389b75 100644 --- a/modules-available/translation/page.inc.php +++ b/modules-available/translation/page.inc.php @@ -1031,10 +1031,8 @@ class Page_Translation extends Page unlink($file); } } else { - // JSON_PRETTY_PRINT is only available starting with php 5.4.0.... Use upgradephp's json_encode - require_once('inc/up_json_encode.php'); ksort($data); // Sort by key, so the diff on the output is cleaner - $json = up_json_encode($data, JSON_PRETTY_PRINT); // Also for better diffability of the json files, we pretty print + $json = json_encode($data, JSON_PRETTY_PRINT); // Also for better diffability of the json files, we pretty print //exits the function in case the action was unsuccessful if (file_put_contents($file, $json) === false) { Message::addError('main.error-write', $file); -- cgit v1.2.3-55-g7522