mirror of
https://github.com/znc/znc.git
synced 2026-06-25 04:22:08 +02:00
This covers the code changes for the datadir move (which is now finished)
Based on darix' patch I wrote this. Modperl's changes were not tested since I didn't find someone who could test it. Well... Ah and btw it regenerates configure git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@902 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
+3
-12
@@ -221,23 +221,14 @@ private:
|
||||
};
|
||||
|
||||
CString CWebAdminSock::GetSkinDir() {
|
||||
CString sModPath = CZNC::Get().FindModPath(m_pModule->GetModName()); // @todo store the path to the module at load time and store it in a member var which can be used here
|
||||
|
||||
// Remove the file.so portion from the path
|
||||
while (!sModPath.empty() && sModPath.Right(1) != "/") {
|
||||
sModPath.RightChomp();
|
||||
}
|
||||
|
||||
// Remove the last /
|
||||
sModPath.RightChomp();
|
||||
|
||||
CString sSkinDir = sModPath + "/" + m_pModule->GetModName() + "/skins/" + m_pModule->GetSkinName() + "/";
|
||||
CString sSkinDir = m_pModule->GetModDataDir() + "/skins/"
|
||||
+ m_pModule->GetSkinName() + "/";
|
||||
|
||||
if (CDir::Exists(sSkinDir)) {
|
||||
return sSkinDir;
|
||||
}
|
||||
|
||||
return sModPath + "/" + m_pModule->GetModName() + "/skins/default/";
|
||||
return m_pModule->GetModDataDir() + "/skins/default/";
|
||||
}
|
||||
|
||||
void CWebAdminSock::PrintPage(CString& sPageRet, const CString& sTmplName) {
|
||||
|
||||
Reference in New Issue
Block a user