From 417018172cd38156f2ffd3a40bbc257ff030df68 Mon Sep 17 00:00:00 2001 From: darthgandalf Date: Sun, 12 Sep 2010 18:19:45 +0000 Subject: [PATCH] Really fixed embedded web stuff after installation. This introduces workaround, but templates can't look the same filename in different directories... git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2135 726aef4b-f618-498e-8847-2d620e286838 --- WebModules.cpp | 7 ++++--- .../{WebadminUser.tmpl => blockuser_WebadminUser.tmpl} | 0 .../tmpl/{WebadminUser.tmpl => lastseen_WebadminUser.tmpl} | 0 .../{WebadminChan.tmpl => stickychan_WebadminChan.tmpl} | 0 4 files changed, 4 insertions(+), 3 deletions(-) rename modules/blockuser/tmpl/{WebadminUser.tmpl => blockuser_WebadminUser.tmpl} (100%) rename modules/lastseen/tmpl/{WebadminUser.tmpl => lastseen_WebadminUser.tmpl} (100%) rename modules/stickychan/tmpl/{WebadminChan.tmpl => stickychan_WebadminChan.tmpl} (100%) diff --git a/WebModules.cpp b/WebModules.cpp index b2c433cf..1b8e9af7 100644 --- a/WebModules.cpp +++ b/WebModules.cpp @@ -293,10 +293,11 @@ VCString CWebSock::GetDirs(CModule* pModule, bool bIsTemplate) { CString CWebSock::FindTmpl(CModule* pModule, const CString& sName) { VCString vsDirs = GetDirs(pModule, true); + CString sFile = pModule->GetModName() + "_" + sName; for (size_t i = 0; i < vsDirs.size(); ++i) { - CString sFilePath(CDir::ChangeDir(vsDirs[i], sName)); - if (CFile::Exists(sFilePath)) { - return sFilePath; + if (CFile::Exists(CDir::ChangeDir(vsDirs[i], sFile))) { + m_Template.AppendPath(vsDirs[i]); + return sFile; } } return sName; diff --git a/modules/blockuser/tmpl/WebadminUser.tmpl b/modules/blockuser/tmpl/blockuser_WebadminUser.tmpl similarity index 100% rename from modules/blockuser/tmpl/WebadminUser.tmpl rename to modules/blockuser/tmpl/blockuser_WebadminUser.tmpl diff --git a/modules/lastseen/tmpl/WebadminUser.tmpl b/modules/lastseen/tmpl/lastseen_WebadminUser.tmpl similarity index 100% rename from modules/lastseen/tmpl/WebadminUser.tmpl rename to modules/lastseen/tmpl/lastseen_WebadminUser.tmpl diff --git a/modules/stickychan/tmpl/WebadminChan.tmpl b/modules/stickychan/tmpl/stickychan_WebadminChan.tmpl similarity index 100% rename from modules/stickychan/tmpl/WebadminChan.tmpl rename to modules/stickychan/tmpl/stickychan_WebadminChan.tmpl