Permalink
Browse files

Modules can now provide its wiki page name.

It's shown on webadmin as a link.
  • Loading branch information...
1 parent e6e3331 commit 0c840f922d177ab356095589b5941a5208847417 Alexey Sokolov committed Jun 11, 2011
View
@@ -963,8 +963,7 @@ bool CModules::GetModPathInfo(CModInfo& ModInfo, const CString& sModule, const C
return false;
if (Info) {
- ModInfo.SetGlobal(Info->IsGlobal());
- ModInfo.SetDescription(Info->GetDescription());
+ ModInfo = *Info;
}
ModInfo.SetName(sModule);
ModInfo.SetPath(sModPath);
View
@@ -191,6 +191,7 @@ class CModInfo {
const CString& GetName() const { return m_sName; }
const CString& GetPath() const { return m_sPath; }
const CString& GetDescription() const { return m_sDescription; }
+ const CString& GetWikiPage() const { return m_sWikiPage; }
bool IsGlobal() const { return m_bGlobal; }
ModLoader GetLoader() const { return m_fLoader; }
GlobalModLoader GetGlobalLoader() const { return m_fGlobalLoader; }
@@ -200,6 +201,7 @@ class CModInfo {
void SetName(const CString& s) { m_sName = s; }
void SetPath(const CString& s) { m_sPath = s; }
void SetDescription(const CString& s) { m_sDescription = s; }
+ void SetWikiPage(const CString& s) { m_sWikiPage = s; }
void SetGlobal(bool b) { m_bGlobal = b; }
void SetLoader(ModLoader fLoader) { m_fLoader = fLoader; }
void SetGlobalLoader(GlobalModLoader fGlobalLoader) { m_fGlobalLoader = fGlobalLoader; }
@@ -210,6 +212,7 @@ class CModInfo {
CString m_sName;
CString m_sPath;
CString m_sDescription;
+ CString m_sWikiPage;
ModLoader m_fLoader;
GlobalModLoader m_fGlobalLoader;
};
@@ -136,7 +136,7 @@
<? LOOP ModuleLoop ?>
<tr class="<? IF __EVEN__ ?>evenrow<? ELSE ?>oddrow<? ENDIF ?>">
<td class="mod_name">
- <input type="checkbox" name="loadmod" id="lm_<? VAR Name ?>" value="<? VAR Name ?>"<? IF Checked ?> checked="checked"<? ENDIF ?><? IF Disabled ?> disabled="disabled"<? ENDIF ?> /><label for="lm_<? VAR Name ?>"> <? VAR Name ?></label>
+ <input type="checkbox" name="loadmod" id="lm_<? VAR Name ?>" value="<? VAR Name ?>"<? IF Checked ?> checked="checked"<? ENDIF ?><? IF Disabled ?> disabled="disabled"<? ENDIF ?> /><label for="lm_<? VAR Name ?>"> <? IF Wiki ?><a href="http://wiki.znc.in/<? VAR Wiki ?>"><? VAR Name ?></a> <? ELSE ?> <? VAR Name ?> <? ENDIF ?></label>
</td>
<td class="mod_args">
<? IF Disabled ?><? VAR Args ?><? ELSE ?><input class="third" type="text" name="modargs_<? VAR Name ?>" value="<? VAR Args ?>" /><? ENDIF ?>
@@ -132,7 +132,7 @@
<tbody>
<? LOOP ModuleLoop ?>
<tr class="<? IF __EVEN__ ?>evenrow<? ELSE ?>oddrow<? ENDIF ?>">
- <td class="mod_name"><input type="checkbox" name="loadmod" id="lm_<? VAR Name ?>" value="<? VAR Name ?>"<? IF Checked ?> checked="checked"<? ENDIF ?><? IF Disabled ?> disabled="disabled"<? ENDIF ?> /><label for="lm_<? VAR Name ?>"> <? VAR Name ?></label></td>
+ <td class="mod_name"><input type="checkbox" name="loadmod" id="lm_<? VAR Name ?>" value="<? VAR Name ?>"<? IF Checked ?> checked="checked"<? ENDIF ?><? IF Disabled ?> disabled="disabled"<? ENDIF ?> /><label for="lm_<? VAR Name ?>"> <? IF Wiki ?> <a href="http://wiki.znc.in/<? VAR Wiki ?>"><? VAR Name ?></a> <? ELSE ?> <? VAR Name ?> <? ENDIF ?></label></td>
<td class="mod_args"><input type="text" name="modargs_<? VAR Name ?>" value="<? VAR Args ?>" /></td>
<td class="mod_descr"><? VAR Description ?></td>
</tr>
@@ -745,6 +745,7 @@ class CWebAdminMod : public CGlobalModule {
l["Name"] = Info.GetName();
l["Description"] = Info.GetDescription();
l["Args"] = GetModArgs(pUser, Info.GetName());
+ l["Wiki"] = Info.GetWikiPage();
if (pUser && pUser->GetModules().FindModule(Info.GetName())) {
l["Checked"] = "true";
@@ -1039,6 +1040,7 @@ class CWebAdminMod : public CGlobalModule {
l["Name"] = Info.GetName();
l["Description"] = Info.GetDescription();
l["Args"] = GetModArgs(NULL, Info.GetName(), true);
+ l["Wiki"] = Info.GetWikiPage();
}
return true;

0 comments on commit 0c840f9

Please sign in to comment.