mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
Prepend URIPrefix to web interface links
Prefix links in templates with URIPrefix and add the input field to the Listener editor. The URIPrefix is provided as a top-level template variable. All URIs have been changed to have the prefix prepended.
This commit is contained in:
@@ -325,6 +325,7 @@ void CWebSock::SetVars() {
|
||||
m_Template["Version"] = CZNC::GetVersion();
|
||||
m_Template["SkinName"] = GetSkinName();
|
||||
m_Template["_CSRF_Check"] = GetCSRFCheck();
|
||||
m_Template["URIPrefix"] = GetURIPrefix();
|
||||
|
||||
if (GetSession()->IsAdmin()) {
|
||||
m_Template["IsAdmin"] = "true";
|
||||
@@ -473,6 +474,7 @@ CWebSock::EPageReqResult CWebSock::PrintStaticFile(const CString& sPath, CString
|
||||
|
||||
CWebSock::EPageReqResult CWebSock::PrintTemplate(const CString& sPageName, CString& sPageRet, CModule* pModule) {
|
||||
SetVars();
|
||||
|
||||
m_Template["PageName"] = sPageName;
|
||||
|
||||
if (pModule) {
|
||||
|
||||
Reference in New Issue
Block a user