From 42cd2fafdd6051537ddf706a5a95893402593f6c Mon Sep 17 00:00:00 2001 From: hide_d Date: Thu, 12 Apr 2018 02:59:44 +0900 Subject: [PATCH] =?UTF-8?q?Json=EC=97=90=20PASS=5FTHROUGH=20=EC=98=B5?= =?UTF-8?q?=EC=85=98=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/map_history.php | 2 +- src/sammo/Json.php | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/hwe/map_history.php b/hwe/map_history.php index 14003207..4f73dc6c 100644 --- a/hwe/map_history.php +++ b/hwe/map_history.php @@ -39,4 +39,4 @@ if(!$map){ ]); } -Json::die(Json::decode($map)); \ No newline at end of file +Json::die($map, Json::PASS_THROUGH); \ No newline at end of file diff --git a/src/sammo/Json.php b/src/sammo/Json.php index dd5e4a04..10fa3fc6 100644 --- a/src/sammo/Json.php +++ b/src/sammo/Json.php @@ -6,6 +6,7 @@ class Json const PRETTY = 1; const DELETE_NULL = 2; const NO_CACHE = 4; + const PASS_THROUGH = 8; public static function encode($value, $flag = 0) { @@ -33,6 +34,9 @@ class Json header('Content-Type: application/json'); + if($flag & static::PASS_THROUGH){ + die($value); + } die(Json::encode($value, $flag)); } }