From 6f20ebf5cfb1fa47fb84cb14729b5000449955de Mon Sep 17 00:00:00 2001 From: Tyron Madlener Date: Sun, 21 Aug 2011 17:58:30 +0300 Subject: [PATCH] Fix: Monitor broken from a change by michal --- libraries/core.lib.php | 9 +++++++-- server_status.php | 3 ++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/libraries/core.lib.php b/libraries/core.lib.php index a277f29629..fbc111002f 100644 --- a/libraries/core.lib.php +++ b/libraries/core.lib.php @@ -724,11 +724,16 @@ function PMA_AddJSCode($str) * * @param string $key Name of value to set * @param mixed $value Value to set, can be either string or array of strings + * @param string $escaping Handle value as-is, don't use PMA_formatJsVal() on it * */ -function PMA_AddJSVar($key, $value) +function PMA_AddJSVar($key, $value, $escaping = true) { - PMA_AddJsCode(PMA_getJsValue($key, $value)); + if($escaping) { + PMA_AddJsCode($key . '=' . PMA_formatJsVal($value) . ';'); + } else { + PMA_AddJsCode($key . '=' . $value . ';'); + } } ?> diff --git a/server_status.php b/server_status.php index 1dd4852369..8d8ecf267b 100644 --- a/server_status.php +++ b/server_status.php @@ -683,7 +683,8 @@ PMA_AddJSVar( ); PMA_AddJSVar( 'server_time_diff', - 'new Date().getTime() - ' . (microtime(true) * 1000) + 'new Date().getTime() - ' . (microtime(true) * 1000), + false ); PMA_AddJSVar( 'server_os',