mirror of
https://github.com/znc/znc.git
synced 2026-08-06 17:03:14 +02:00
Lastseen module doesn't display links to webadmin webpages anymore if webadmin isn't loaded.
Patch by BrianC, thanks. git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2126 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
+11
-1
@@ -94,6 +94,16 @@ public:
|
||||
|
||||
virtual bool OnWebRequest(CWebSock& WebSock, const CString& sPageName, CTemplate& Tmpl) {
|
||||
if (sPageName.empty() || sPageName == "index") {
|
||||
CModules& GModules = CZNC::Get().GetModules();
|
||||
if (GModules.size()) {
|
||||
for (unsigned int b = 0; b < GModules.size(); b++) {
|
||||
if(GModules[b]->GetModName().Equals("WEBADMIN")) {
|
||||
Tmpl["WebAdminLoaded"] = "true";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MTimeMulti mmSorted;
|
||||
const MUsers& mUsers = CZNC::Get().GetUserMap();
|
||||
|
||||
@@ -134,7 +144,7 @@ public:
|
||||
Row["Info"] += " channel" + CString(n == 1 ? "" : "s");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<td>User</td>
|
||||
<td>Last Seen</td>
|
||||
<td>Info</td>
|
||||
<td>Action</td>
|
||||
<? IF WebAdminLoaded ?><td>Action</td><? ENDIF ?>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -16,10 +16,10 @@
|
||||
<td><? VAR Username ?></td>
|
||||
<td><? VAR LastSeen DEFAULT="- unknown -" ?></td>
|
||||
<td><? VAR Info ?></td>
|
||||
<td><span class="nowrap">
|
||||
<? IF WebAdminLoaded TOP ?><td><span class="nowrap">
|
||||
[<a href="/mods/webadmin/edituser?user=<?VAR Username ESC=URL?>">Edit</a>]
|
||||
<? IF !IsSelf ?>[<a href="/mods/webadmin/deluser?user=<?VAR Username ESC=URL?>">Delete</a>]<? ENDIF ?>
|
||||
</span></td>
|
||||
</span></td><? ENDIF ?>
|
||||
</tr>
|
||||
<? ENDLOOP ?>
|
||||
</tbody>
|
||||
|
||||
Reference in New Issue
Block a user