bugfix: security token forgotten for ban form in view_ip.html

This commit is contained in:
Michael Save 2012-08-28 02:24:29 +10:00
parent 8828101a0c
commit 268d9d2c88
2 changed files with 15 additions and 3 deletions

View File

@ -328,6 +328,9 @@ function mod_noticeboard_delete($id) {
modLog('Deleted a noticeboard entry'); modLog('Deleted a noticeboard entry');
if ($config['cache']['enabled'])
cache::delete('noticeboard_preview');
header('Location: ?/noticeboard', true, $config['redirect_http']); header('Location: ?/noticeboard', true, $config['redirect_http']);
} }
@ -564,7 +567,7 @@ function mod_page_ip($ip) {
} }
$args['boards'] = $boards; $args['boards'] = $boards;
$args['token'] = make_secure_link_token('ban');
if (hasPermission($config['mod']['view_ban'])) { if (hasPermission($config['mod']['view_ban'])) {
$query = prepare("SELECT `bans`.*, `username` FROM `bans` LEFT JOIN `mods` ON `mod` = `mods`.`id` WHERE `ip` = :ip"); $query = prepare("SELECT `bans`.*, `username` FROM `bans` LEFT JOIN `mods` ON `mod` = `mods`.`id` WHERE `ip` = :ip");

View File

@ -54,7 +54,7 @@
</ul> </ul>
</li> </li>
{% endif %} {% endif %}
<li><a href="?/noticeboard">{% trans 'View all entries' %}</a></li> <li><a href="?/noticeboard">{% trans 'View all noticeboard entries' %}</a></li>
{% endif %} {% endif %}
<li><a href="?/news">{% trans 'News' %}</a></li> <li><a href="?/news">{% trans 'News' %}</a></li>
<li> <li>
@ -104,7 +104,16 @@
<fieldset> <fieldset>
<legend>{% trans 'Search' %}</legend> <legend>{% trans 'Search' %}</legend>
{# TODO #} <ul>
<li>
<form style="display:inline" action="?/search" method="post">
<label style="display:inline" for="search">{% trans 'Phrase:' %}</label>
<input id="search" name="search" type="text" size="35">
<input type="submit" value="{% trans 'Search' %}">
</form>
<p class="unimportant">{% trans '(Search is case-insensitive, and based on keywords. To match exact phrases, use "quotes". Use an asterisk (*) for wildcard.)' %}</p>
</li>
</ul>
</fieldset> </fieldset>
{% if config.debug %} {% if config.debug %}