From 60ea4bb937ba56c6dcaf57dda377beed972cf0a5 Mon Sep 17 00:00:00 2001 From: Tycho Date: Wed, 13 Aug 2014 11:56:47 +0100 Subject: Removed unused method --- src/WebAdmin.cpp | 22 ---------------------- src/WebAdmin.h | 3 --- 2 files changed, 25 deletions(-) diff --git a/src/WebAdmin.cpp b/src/WebAdmin.cpp index ab6925e55..6882d7bc4 100644 --- a/src/WebAdmin.cpp +++ b/src/WebAdmin.cpp @@ -159,28 +159,6 @@ void cWebAdmin::Stop(void) -AString cWebAdmin::GetTemplate() -{ - AString retVal = ""; - - char SourceFile[] = "webadmin/template.html"; - - cFile f; - if (!f.Open(SourceFile, cFile::fmRead)) - { - return ""; - } - - // copy the file into the buffer: - f.ReadRestOfFile(retVal); - - return retVal; -} - - - - - void cWebAdmin::HandleWebadminRequest(cHTTPConnection & a_Connection, cHTTPRequest & a_Request) { if (!a_Request.HasAuth()) diff --git a/src/WebAdmin.h b/src/WebAdmin.h index f48e8ce9e..aefc1d145 100644 --- a/src/WebAdmin.h +++ b/src/WebAdmin.h @@ -208,9 +208,6 @@ protected: /** The HTTP server which provides the underlying HTTP parsing, serialization and events */ cHTTPServer m_HTTPServer; - - AString GetTemplate(void); - /** Handles requests coming to the "/webadmin" or "/~webadmin" URLs */ void HandleWebadminRequest(cHTTPConnection & a_Connection, cHTTPRequest & a_Request); -- cgit v1.2.3 From 2321d2af41e935d8353b18592c29d58c766a5658 Mon Sep 17 00:00:00 2001 From: Tycho Date: Wed, 13 Aug 2014 12:01:13 +0100 Subject: Fixed shadowing variable --- src/WebAdmin.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/WebAdmin.cpp b/src/WebAdmin.cpp index 6882d7bc4..23eedbd14 100644 --- a/src/WebAdmin.cpp +++ b/src/WebAdmin.cpp @@ -176,9 +176,9 @@ void cWebAdmin::HandleWebadminRequest(cHTTPConnection & a_Connection, cHTTPReque } // Check if the contents should be wrapped in the template: - AString URL = a_Request.GetBareURL(); - ASSERT(URL.length() > 0); - bool ShouldWrapInTemplate = ((URL.length() > 1) && (URL[1] != '~')); + AString BareURL = a_Request.GetBareURL(); + ASSERT(BareURL.length() > 0); + bool ShouldWrapInTemplate = ((BareURL.length() > 1) && (BareURL[1] != '~')); // Retrieve the request data: cWebadminRequestData * Data = (cWebadminRequestData *)(a_Request.GetUserData()); @@ -193,7 +193,7 @@ void cWebAdmin::HandleWebadminRequest(cHTTPConnection & a_Connection, cHTTPReque HTTPTemplateRequest TemplateRequest; TemplateRequest.Request.Username = a_Request.GetAuthUsername(); TemplateRequest.Request.Method = a_Request.GetMethod(); - TemplateRequest.Request.Path = URL.substr(1); + TemplateRequest.Request.Path = BareURL.substr(1); if (Data->m_Form.Finish()) { @@ -236,7 +236,7 @@ void cWebAdmin::HandleWebadminRequest(cHTTPConnection & a_Connection, cHTTPReque return; } - AString BaseURL = GetBaseURL(URL); + AString BaseURL = GetBaseURL(BareURL); AString Menu; Template = "{CONTENT}"; AString FoundPlugin; -- cgit v1.2.3