From 1c0e77d3c6f080d5a96ca0f29faee5de40680144 Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Thu, 25 Jul 2013 16:18:02 -0300 Subject: Simplify a bit this copy/pasted function --- config/openbgpd/openbgpd_status.php | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'config/openbgpd') diff --git a/config/openbgpd/openbgpd_status.php b/config/openbgpd/openbgpd_status.php index c7987ec4..1eaee2ea 100644 --- a/config/openbgpd/openbgpd_status.php +++ b/config/openbgpd/openbgpd_status.php @@ -173,16 +173,8 @@ function execCmds() { function update_count_callback(transport) { // First line contain field id to be updated var responseTextArr = transport.responseText.split("\n"); - var result = ""; - var i; - - for (i = 1; i < responseTextArr.length; i++) { - result += responseTextArr[i]; - if (i < responseTextArr.length - 1) - result += "\n"; - } - document.getElementById(responseTextArr[0] + "_count").innerHTML = result; + document.getElementById(responseTextArr[0] + "_count").innerHTML = responseTextArr[1]; } function update_filter(cmd, header_size) { -- cgit v1.2.3