From 376f350af21ea83bcf7db73ae24c9f3618bb96fe Mon Sep 17 00:00:00 2001 From: Bart Visscher Date: Sun, 3 Mar 2013 22:56:42 +0100 Subject: [PATCH] Fix encoding settings ajax getlog --- settings/ajax/getlog.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/settings/ajax/getlog.php b/settings/ajax/getlog.php index 043124fa175..e1fc1689877 100644 --- a/settings/ajax/getlog.php +++ b/settings/ajax/getlog.php @@ -11,6 +11,15 @@ $count=(isset($_GET['count']))?$_GET['count']:50; $offset=(isset($_GET['offset']))?$_GET['offset']:0; $entries=OC_Log_Owncloud::getEntries($count, $offset); +$data = array(); +foreach($entries as $entry) { + $data[] = array( + 'level' => OC_Util::sanitizeHTML($entry->level), + 'app' => OC_Util::sanitizeHTML($entry->app), + 'message' => OC_Util::sanitizeHTML($entry->message), + 'time' => OC_Util::sanitizeHTML($entry->time), + ); +} OC_JSON::success(array( - "data" => OC_Util::sanitizeHTML($entries), + "data" => $data, "remain"=>(count(OC_Log_Owncloud::getEntries(1, $offset + $offset)) != 0) ? true : false));