summaryrefslogtreecommitdiffstats
path: root/src/WebAdmin.cpp
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-08-14 01:04:01 +0200
committermadmaxoft <github@xoft.cz>2014-08-14 01:04:01 +0200
commit45068f9bf45fe952429bd200d9d9d747eeba61e8 (patch)
tree94adc35088c801f5f1842aa95578b06831da6b53 /src/WebAdmin.cpp
parentRankMgr: Fixed multithreading issues. (diff)
parentCheckBasicStyle checks the src folder as well. (diff)
downloadcuberite-45068f9bf45fe952429bd200d9d9d747eeba61e8.tar
cuberite-45068f9bf45fe952429bd200d9d9d747eeba61e8.tar.gz
cuberite-45068f9bf45fe952429bd200d9d9d747eeba61e8.tar.bz2
cuberite-45068f9bf45fe952429bd200d9d9d747eeba61e8.tar.lz
cuberite-45068f9bf45fe952429bd200d9d9d747eeba61e8.tar.xz
cuberite-45068f9bf45fe952429bd200d9d9d747eeba61e8.tar.zst
cuberite-45068f9bf45fe952429bd200d9d9d747eeba61e8.zip
Diffstat (limited to 'src/WebAdmin.cpp')
-rw-r--r--src/WebAdmin.cpp32
1 files changed, 5 insertions, 27 deletions
diff --git a/src/WebAdmin.cpp b/src/WebAdmin.cpp
index ab6925e55..23eedbd14 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())
@@ -198,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());
@@ -215,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())
{
@@ -258,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;