Bernd Wurst commited on 2019-12-09 10:34:42
Zeige 2 geänderte Dateien mit 8 Einfügungen und 4 Löschungen.
... | ... |
@@ -25,9 +25,9 @@ function get_lists($filter) |
25 | 25 |
$result = null; |
26 | 26 |
if ($filter) { |
27 | 27 |
$filter = '%'.$filter.'%'; |
28 |
- $result = db_query("SELECT id, created, status, listname, fqdn, admin, archivesize FROM mail.v_mailman_lists WHERE owner=:uid AND (listname LIKE :filter OR fqdn LIKE :filter OR admin LIKE :filter) ORDER BY listname", array('uid' => $uid, 'filter' => $filter)); |
|
28 |
+ $result = db_query("SELECT id, created, status, listname, fqdn, admin, archivesize, subscribers, lastactivity FROM mail.v_mailman_lists WHERE owner=:uid AND (listname LIKE :filter OR fqdn LIKE :filter OR admin LIKE :filter) ORDER BY listname", array('uid' => $uid, 'filter' => $filter)); |
|
29 | 29 |
} else { |
30 |
- $result = db_query("SELECT id, created, status, listname, fqdn, admin, archivesize FROM mail.v_mailman_lists WHERE owner=:uid ORDER BY listname", array('uid' => $uid)); |
|
30 |
+ $result = db_query("SELECT id, created, status, listname, fqdn, admin, archivesize, subscribers, lastactivity FROM mail.v_mailman_lists WHERE owner=:uid ORDER BY listname", array('uid' => $uid)); |
|
31 | 31 |
} |
32 | 32 |
$ret = array(); |
33 | 33 |
while ($list = $result->fetch()) { |
... | ... |
@@ -42,7 +42,7 @@ function get_list($id) |
42 | 42 |
{ |
43 | 43 |
$args = array(":id" => $id, |
44 | 44 |
":uid" => $_SESSION['userinfo']['uid']); |
45 |
- $result = db_query("SELECT id, created, status, listname, fqdn, admin, archivesize FROM mail.v_mailman_lists WHERE owner=:uid AND id=:id", $args); |
|
45 |
+ $result = db_query("SELECT id, created, status, listname, fqdn, admin, archivesize, subscribers, lastactivity FROM mail.v_mailman_lists WHERE owner=:uid AND id=:id", $args); |
|
46 | 46 |
if ($result->rowCount() < 1) { |
47 | 47 |
system_failure('Die gewünschte Mailingliste konnte nicht gefunden werden'); |
48 | 48 |
} |
... | ... |
@@ -72,9 +72,13 @@ if (! empty($lists)) { |
72 | 72 |
|
73 | 73 |
$admin = str_replace(',', ', ', $list['admin']); |
74 | 74 |
|
75 |
+ $lastactivity = $list['lastactivity']; |
|
76 |
+ if (! $lastactivity || $lastactivity < '2000') { |
|
77 |
+ $lastactivity = '<em>nie</em>'; |
|
78 |
+ } |
|
75 | 79 |
|
76 | 80 |
output("<div class=\"mailman_list $class\"><p class=\"listname\"><span class=\"listname\">{$list['listname']}</span>@{$list['fqdn']}</p> |
77 |
- <p class=\"listadmin\">Verwalter: {$admin}</p><p class=\"status\">Status: {$status}</p><p class=\"archivesize\">Archivgröße: {$sizestr}</p>"); |
|
81 |
+ <p class=\"listadmin\">Verwalter: {$admin}</p><p class=\"status\">Status: {$status}<br/>Anzahl Mitglieder: {$list['subscribers']}<br/>Letzte Nutzung: {$lastactivity}</p><p class=\"archivesize\">Archivgröße: {$sizestr}</p>"); |
|
78 | 82 |
if ($list['status'] == 'running') { |
79 | 83 |
output("<p class=\"operations\">".internal_link('save', other_icon("lock.png", "Neues Passwort anfordern").' Neues Passwort anfordern', "action=newpw&id={$list['id']}")."<br>".internal_link('save', icon_delete("Mailingliste löschen").' Liste löschen', "action=delete&id={$list['id']}")."<br><a href=\"https://".config('mailman_host')."/mailman/admin.cgi/{$list['listname']}\">".other_icon("database_go.png", "Listen-Verwaltung aufrufen")." Verwaltung aufrufen</a></p></div>\n"); |
80 | 84 |
} else { |
81 | 85 |