From 0ebec6ab3ae8bdec70cd04e3d169675d91cd60e2 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Sat, 20 Feb 2016 12:12:17 +0100 Subject: [PATCH] controlapi/config: switch to new plain output format Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/b941eb950ed8ba9e9bc25dc32fda2dec2a626841 Author: vanhofen Date: 2016-02-20 (Sat, 20 Feb 2016) Origin message was: ------------------ - controlapi/config: switch to new plain output format ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/nhttpd/tuxboxapi/controlapi.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/nhttpd/tuxboxapi/controlapi.cpp b/src/nhttpd/tuxboxapi/controlapi.cpp index 7f219e5b0..dbce4ff46 100644 --- a/src/nhttpd/tuxboxapi/controlapi.cpp +++ b/src/nhttpd/tuxboxapi/controlapi.cpp @@ -2996,7 +2996,7 @@ void CControlAPI::ConfigCGI(CyhookHandler *hh) { std::string result = ""; std::string configFileName = hh->ParamList["config"]; - TOutType outType = hh->outStart(true /*old mode*/); + TOutType outType = hh->outStart(); if (hh->ParamList["action"] == "submit") load = false; @@ -3022,13 +3022,9 @@ void CControlAPI::ConfigCGI(CyhookHandler *hh) { replace(key, ".", "_dot_"); replace(key, "-", "_bind_"); if (!(hh->ParamList["config"] == "nhttpd" && it->first == "mod_auth.password")) { - if(outType == plain) - result += key + "=" + it->second + "\n"; - else { - if(it != start) - result += hh->outNext(); - result += hh->outPair(key, it->second, false); - } + if(it != start) + result += hh->outNext(); + result += hh->outPair(key, it->second, false); } } }