summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/Bindings/ManualBindings.cpp87
-rw-r--r--src/WebAdmin.h23
2 files changed, 10 insertions, 100 deletions
diff --git a/src/Bindings/ManualBindings.cpp b/src/Bindings/ManualBindings.cpp
index 34357eb65..ac349689a 100644
--- a/src/Bindings/ManualBindings.cpp
+++ b/src/Bindings/ManualBindings.cpp
@@ -2243,90 +2243,6 @@ static int tolua_cWebAdmin_GetAllWebTabs(lua_State * tolua_S)
-/** Binding for cWebAdmin::GetBaseURL.
-Manual code required because ToLua generates an extra return value */
-static int tolua_cWebAdmin_GetBaseURL(lua_State * tolua_S)
-{
- // Check the param types:
- cLuaState S(tolua_S);
- if (
- // Don't care whether the first param is a cWebAdmin instance or class
- !S.CheckParamString(2) ||
- !S.CheckParamEnd(3)
- )
- {
- return 0;
- }
-
- // Get the parameters:
- AString Input;
- S.GetStackValue(2, Input);
-
- // Convert and return:
- S.Push(cWebAdmin::GetBaseURL(Input));
- return 1;
-}
-
-
-
-
-
-/** Binding for cWebAdmin::GetContentTypeFromFileExt.
-Manual code required because ToLua generates an extra return value */
-static int tolua_cWebAdmin_GetContentTypeFromFileExt(lua_State * tolua_S)
-{
- // Check the param types:
- cLuaState S(tolua_S);
- if (
- // Don't care whether the first param is a cWebAdmin instance or class
- !S.CheckParamString(2) ||
- !S.CheckParamEnd(3)
- )
- {
- return 0;
- }
-
- // Get the parameters:
- AString Input;
- S.GetStackValue(2, Input);
-
- // Convert and return:
- S.Push(cWebAdmin::GetContentTypeFromFileExt(Input));
- return 1;
-}
-
-
-
-
-
-/** Binding for cWebAdmin::GetHTMLEscapedString.
-Manual code required because ToLua generates an extra return value */
-static int tolua_cWebAdmin_GetHTMLEscapedString(lua_State * tolua_S)
-{
- // Check the param types:
- cLuaState S(tolua_S);
- if (
- // Don't care whether the first param is a cWebAdmin instance or class
- !S.CheckParamString(2) ||
- !S.CheckParamEnd(3)
- )
- {
- return 0;
- }
-
- // Get the parameters:
- AString Input;
- S.GetStackValue(2, Input);
-
- // Convert and return:
- S.Push(cWebAdmin::GetHTMLEscapedString(Input));
- return 1;
-}
-
-
-
-
-
/** Binding for cWebAdmin::GetPage. */
static int tolua_cWebAdmin_GetPage(lua_State * tolua_S)
{
@@ -4096,9 +4012,6 @@ void cManualBindings::Bind(lua_State * tolua_S)
tolua_beginmodule(tolua_S, "cWebAdmin");
tolua_function(tolua_S, "AddWebTab", tolua_cWebAdmin_AddWebTab);
tolua_function(tolua_S, "GetAllWebTabs", tolua_cWebAdmin_GetAllWebTabs);
- tolua_function(tolua_S, "GetBaseURL", tolua_cWebAdmin_GetBaseURL);
- tolua_function(tolua_S, "GetContentTypeFromFileExt", tolua_cWebAdmin_GetContentTypeFromFileExt);
- tolua_function(tolua_S, "GetHTMLEscapedString", tolua_cWebAdmin_GetHTMLEscapedString);
tolua_function(tolua_S, "GetPage", tolua_cWebAdmin_GetPage);
tolua_function(tolua_S, "GetURLEncodedString", tolua_cWebAdmin_GetURLEncodedString);
tolua_endmodule(tolua_S);
diff --git a/src/WebAdmin.h b/src/WebAdmin.h
index b76ca6df8..50a0487b0 100644
--- a/src/WebAdmin.h
+++ b/src/WebAdmin.h
@@ -192,6 +192,16 @@ public:
/** Returns the list of ports on which the webadmin is configured to listen. */
AString GetPorts(void) const { return StringsConcat(m_Ports, ','); }
+
+ /** Returns the prefix needed for making a link point to the webadmin root from the given URL ("../../../webadmin"-style). */
+ static AString GetBaseURL(const AString & a_URL);
+
+ /** Returns the content type from the file extension.
+ If the extension isn't in the list, the function returns an empty string. */
+ static AString GetContentTypeFromFileExt(const AString & a_FileExtension);
+
+ /** Escapes text passed into it, so it can be embedded into html. */
+ static AString GetHTMLEscapedString(const AString & a_Input);
// tolua_end
/** Adds a new WebTab handler.
@@ -212,26 +222,13 @@ public:
Exported in ManualBindings.cpp */
bool DelWebTab(const AString & a_UrlPath);
- /** Escapes text passed into it, so it can be embedded into html.
- Exported to Lua in ManualBindings.cpp. */
- static AString GetHTMLEscapedString(const AString & a_Input);
-
/** Escapes the string for use in an URL
Exported to Lua in ManualBindings.cpp. */
static AString GetURLEncodedString(const AString & a_Input);
- /** Returns the prefix needed for making a link point to the webadmin root from the given URL ("../../../webadmin"-style).
- Exported to Lua in ManualBindings.cpp. */
- static AString GetBaseURL(const AString & a_URL);
-
/** Returns the prefix needed for making a link point to the webadmin root from the given URL ("../../../webadmin"-style) */
static AString GetBaseURL(const AStringVector & a_URLSplit);
- /** Returns the content type from the file extension.
- If the extension isn't in the list, the function returns an empty string.
- Exported to Lua in ManualBindings.cpp. */
- static AString GetContentTypeFromFileExt(const AString & a_FileExtension);
-
protected:
/** Protects m_WebTabs, m_TemplateScript, m_LoginTemplate and m_IniFile against multithreaded access. */