diff --git a/include/znc/Modules.h b/include/znc/Modules.h index b7e3e995..ca075add 100644 --- a/include/znc/Modules.h +++ b/include/znc/Modules.h @@ -376,6 +376,8 @@ public: * @return The Title. */ virtual CString GetWebMenuTitle() { return ""; } + virtual CString GetWebPath(); + virtual CString GetWebFilesPath(); /** For WebMods: Called before the list of registered SubPages will be checked. * Important: If you return true, you need to take care of calling WebSock.Close! * This allows for stuff like returning non-templated data, long-polling and other fun. diff --git a/modules/cert.cpp b/modules/cert.cpp index a756b609..25e20d5b 100644 --- a/modules/cert.cpp +++ b/modules/cert.cpp @@ -73,11 +73,11 @@ public: fPemFile.Close(); } - WebSock.Redirect("/mods/cert/"); + WebSock.Redirect(GetWebPath()); return true; } else if (sPageName == "delete") { CFile::Delete(PemFile()); - WebSock.Redirect("/mods/cert/"); + WebSock.Redirect(GetWebPath()); return true; } diff --git a/modules/certauth.cpp b/modules/certauth.cpp index c5f2ff42..96e6a245 100644 --- a/modules/certauth.cpp +++ b/modules/certauth.cpp @@ -249,7 +249,7 @@ public: return true; } else if (sPageName == "add") { AddKey(pUser, WebSock.GetParam("key")); - WebSock.Redirect("/mods/certauth/"); + WebSock.Redirect(GetWebPath()); return true; } else if (sPageName == "delete") { MSCString::iterator it = m_PubKeys.find(pUser->GetUserName()); @@ -263,7 +263,7 @@ public: } } - WebSock.Redirect("/mods/certauth/"); + WebSock.Redirect(GetWebPath()); return true; } diff --git a/modules/data/cert/tmpl/index.tmpl b/modules/data/cert/tmpl/index.tmpl index 84356b63..5066573f 100644 --- a/modules/data/cert/tmpl/index.tmpl +++ b/modules/data/cert/tmpl/index.tmpl @@ -1,12 +1,12 @@ INC Header.tmpl ?> IF Cert ?> -
You already have a certificate set, use the form below to overwrite the current certificate. Alternatively click here to delete your certificate.
+You already have a certificate set, use the form below to overwrite the current certificate. Alternatively click here to delete your certificate.
ELSE ?>You do not have a cert.
ENDIF ?> -