Show ban appeal count

Thank you PupperWof
This commit is contained in:
fallenPineapple 2017-04-24 21:42:47 -04:00 committed by -
parent c8821a3dec
commit 8b8828ae3b
2 changed files with 5 additions and 1 deletions

View File

@ -103,6 +103,10 @@ function mod_dashboard() {
$query = query('SELECT COUNT(*) FROM ``reports``') or error(db_error($query));
$args['reports'] = $query->fetchColumn();
// Counter for number of appeals
$query = query('SELECT COUNT(*) FROM ``ban_appeals`` WHERE ``denied`` = 0') or error(db_error($query));
$args['appealcount'] = $query->fetchColumn();
if ($mod['type'] >= ADMIN && $config['check_updates']) {
if (!$config['version'])
error(_('Could not find current version! (Check .installed)'));

View File

@ -90,7 +90,7 @@
<li><a href="?/bans">{% trans 'Ban list' %}</a></li>
{% endif %}
{% if config.ban_appeals and mod|hasPermission(config.mod.view_ban_appeals) %}
<li><a href="?/ban-appeals">{% trans 'Ban appeals' %}</a></li>
<li><a href="?/ban-appeals">{% trans 'Ban appeals' %} ({{ appealcount }})</a></li>
{% endif %}
{% if mod|hasPermission(config.mod.manageusers) %}
<li><a href="?/users">{% trans 'Manage users' %}</a></li>