1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-11-29 09:44:28 +01:00

Only show our boards in dashboard

This commit is contained in:
8chan Admin 2013-10-24 17:25:31 +00:00
parent 627558ddc4
commit 0b3995f111
2 changed files with 5 additions and 0 deletions

View File

@ -1275,6 +1275,7 @@ function mod_ban_post($board, $delete, $post, $token = false) {
if (!hasPermission($config['mod']['delete'], $board))
error($config['error']['noaccess']);
$security_token = make_secure_link_token($board . '/ban/' . $post);
$query = prepare(sprintf('SELECT ' . ($config['ban_show_post'] ? '*' : '`ip`, `thread`') .
@ -1288,6 +1289,8 @@ function mod_ban_post($board, $delete, $post, $token = false) {
$ip = $_post['ip'];
if (isset($_POST['new_ban'], $_POST['reason'], $_POST['length'], $_POST['board'])) {
if (!in_array($_POST['board'], $mod['boards']) && $mod['boards'][0] != '*')
error($config['error']['noaccess']);
require_once 'inc/mod/ban.php';
if (isset($_POST['ip']))

View File

@ -3,6 +3,7 @@
<ul>
{% for board in boards %}
{% if board.uri in mod.boards or mod.boards[0] == '*' %}
<li>
<a href="?/{{ config.board_path|sprintf(board.uri) }}{{ config.file_index }}">{{ config.board_abbreviation|sprintf(board.uri) }}</a>
-
@ -20,6 +21,7 @@
<a href="?/edit/{{ board.uri }}"><small>[{% trans 'edit' %}]</small></a>
{% endif %}
</li>
{% endif %}
{% endfor %}
{% if mod|hasPermission(config.mod.newboard) %}