From 408642c80532fe19db6bcb405cfd4248d7127c94 Mon Sep 17 00:00:00 2001 From: rockiee281 Date: Mon, 16 Sep 2013 15:18:36 +0800 Subject: [PATCH] Update ums.php --- web/application/controllers/ums.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/web/application/controllers/ums.php b/web/application/controllers/ums.php index 21264bda..465fce28 100644 --- a/web/application/controllers/ums.php +++ b/web/application/controllers/ums.php @@ -197,12 +197,15 @@ function postActivityLog() { */ function uploadLog() { $this -> load -> model('servicepublicclass/uploadlogpublic', 'uploadlogpublic'); - if (!isset($_POST["content"])) { - $ret = array('flag' => -3, 'msg' => 'Invalid content.'); - echo json_encode($ret); - return; + if(isset($_POST ["content"])){ +# foreach($_POST as $key => $value){ +# log_message ( "error",'upload log ' . $key . '=' . $value); +# } + $encoded_content = $_POST ["content"]; + }else{ + if ( !isset( $HTTP_RAW_POST_DATA ) ) $HTTP_RAW_POST_DATA =file_get_contents( 'php://input' ); + $encoded_content = gzinflate( substr($HTTP_RAW_POST_DATA,10,-8) ); } - $encoded_content = $_POST['content']; log_message("debug", $encoded_content); $content = json_decode($encoded_content); $uploadlog = new uploadlogpublic();