diff options
author | madmaxoft <github@xoft.cz> | 2013-10-13 20:29:57 +0200 |
---|---|---|
committer | madmaxoft <github@xoft.cz> | 2013-10-13 20:29:57 +0200 |
commit | efb7d4fd3e9d20facf6a5b3d41bee8ca3d894bbc (patch) | |
tree | 9a39bde0b280721461c7597631182a08d7921c86 /source/WebAdmin.cpp | |
parent | Merge branch 'metadata' of git://github.com/tigerw/MCServer into tigerw-metadata. (diff) | |
download | cuberite-efb7d4fd3e9d20facf6a5b3d41bee8ca3d894bbc.tar cuberite-efb7d4fd3e9d20facf6a5b3d41bee8ca3d894bbc.tar.gz cuberite-efb7d4fd3e9d20facf6a5b3d41bee8ca3d894bbc.tar.bz2 cuberite-efb7d4fd3e9d20facf6a5b3d41bee8ca3d894bbc.tar.lz cuberite-efb7d4fd3e9d20facf6a5b3d41bee8ca3d894bbc.tar.xz cuberite-efb7d4fd3e9d20facf6a5b3d41bee8ca3d894bbc.tar.zst cuberite-efb7d4fd3e9d20facf6a5b3d41bee8ca3d894bbc.zip |
Diffstat (limited to 'source/WebAdmin.cpp')
-rw-r--r-- | source/WebAdmin.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/source/WebAdmin.cpp b/source/WebAdmin.cpp index 08817139a..daec2f925 100644 --- a/source/WebAdmin.cpp +++ b/source/WebAdmin.cpp @@ -185,8 +185,19 @@ void cWebAdmin::HandleWebadminRequest(cHTTPConnection & a_Connection, cHTTPReque HTTPfd.Name = itr->first; TemplateRequest.Request.FormData[itr->first] = HTTPfd; TemplateRequest.Request.PostParams[itr->first] = itr->second; - TemplateRequest.Request.Params[itr->first] = itr->second; } // for itr - Data->m_Form[] + + // Parse the URL into individual params: + size_t idxQM = a_Request.GetURL().find('?'); + if (idxQM != AString::npos) + { + cHTTPFormParser URLParams(cHTTPFormParser::fpkURL, a_Request.GetURL().c_str() + idxQM + 1, a_Request.GetURL().length() - idxQM - 1, *Data); + URLParams.Finish(); + for (cHTTPFormParser::const_iterator itr = URLParams.begin(), end = URLParams.end(); itr != end; ++itr) + { + TemplateRequest.Request.Params[itr->first] = itr->second; + } // for itr - URLParams[] + } } // Try to get the template from the Lua template script |