From 268d9d2c889b23c560b6ff528aaae81f153091a3 Mon Sep 17 00:00:00 2001 From: Michael Save Date: Tue, 28 Aug 2012 02:24:29 +1000 Subject: [PATCH] bugfix: security token forgotten for ban form in view_ip.html --- inc/mod/pages.php | 5 ++++- templates/mod/dashboard.html | 13 +++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/inc/mod/pages.php b/inc/mod/pages.php index d3900130..c3693468 100644 --- a/inc/mod/pages.php +++ b/inc/mod/pages.php @@ -328,6 +328,9 @@ function mod_noticeboard_delete($id) { modLog('Deleted a noticeboard entry'); + if ($config['cache']['enabled']) + cache::delete('noticeboard_preview'); + header('Location: ?/noticeboard', true, $config['redirect_http']); } @@ -564,7 +567,7 @@ function mod_page_ip($ip) { } $args['boards'] = $boards; - + $args['token'] = make_secure_link_token('ban'); if (hasPermission($config['mod']['view_ban'])) { $query = prepare("SELECT `bans`.*, `username` FROM `bans` LEFT JOIN `mods` ON `mod` = `mods`.`id` WHERE `ip` = :ip"); diff --git a/templates/mod/dashboard.html b/templates/mod/dashboard.html index 30742dc1..04da9e70 100644 --- a/templates/mod/dashboard.html +++ b/templates/mod/dashboard.html @@ -54,7 +54,7 @@ {% endif %} -
  • {% trans 'View all entries' %}
  • +
  • {% trans 'View all noticeboard entries' %}
  • {% endif %}
  • {% trans 'News' %}
  • @@ -104,7 +104,16 @@
    {% trans 'Search' %} - {# TODO #} +
      +
    • +
      + + + +
      +

      {% trans '(Search is case-insensitive, and based on keywords. To match exact phrases, use "quotes". Use an asterisk (*) for wildcard.)' %}

      +
    • +
    {% if config.debug %}