mirror of
https://github.com/znc/znc.git
synced 2026-08-06 17:03:14 +02:00
WebMods: Clean some stuff up
This removes two unused methods (ResolveModule() and FillErrorPage()) and marks some other methods const/static/protected. git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2236 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
+2
-29
@@ -160,34 +160,7 @@ void CWebSock::ParsePath() {
|
||||
DEBUG("Path [" + m_sPath + "], Module [" + m_sModName + "], Page [" + m_sPage + "]");
|
||||
}
|
||||
|
||||
CModule* CWebSock::ResolveModule() {
|
||||
ParsePath();
|
||||
CModule* pModRet = NULL;
|
||||
|
||||
// Dot means static file, not module
|
||||
if (m_sModName.find(".") != CString::npos) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// This could be user level or global level, check both
|
||||
pModRet = CZNC::Get().GetModules().FindModule(m_sModName);
|
||||
|
||||
if (!pModRet) {
|
||||
if (!ForceLogin()) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
pModRet = GetSession()->GetUser()->GetModules().FindModule(m_sModName);
|
||||
}
|
||||
|
||||
if (!pModRet) {
|
||||
DEBUG("Module not found");
|
||||
}
|
||||
|
||||
return pModRet;
|
||||
}
|
||||
|
||||
size_t CWebSock::GetAvailSkins(vector<CFile>& vRet) {
|
||||
size_t CWebSock::GetAvailSkins(vector<CFile>& vRet) const {
|
||||
vRet.clear();
|
||||
|
||||
CString sRoot(GetSkinPath("_default_"));
|
||||
@@ -436,7 +409,7 @@ CWebSock::EPageReqResult CWebSock::PrintTemplate(const CString& sPageName, CStri
|
||||
}
|
||||
}
|
||||
|
||||
CString CWebSock::GetSkinPath(const CString& sSkinName) const {
|
||||
CString CWebSock::GetSkinPath(const CString& sSkinName) {
|
||||
CString sRet = CZNC::Get().GetZNCPath() + "/webskins/" + sSkinName;
|
||||
|
||||
if (!CFile::IsDir(sRet)) {
|
||||
|
||||
Reference in New Issue
Block a user