forked from GithubBackups/vichan
Only show our boards in dashboard
This commit is contained in:
parent
1bd54fa6a8
commit
58afc866a2
@ -1275,6 +1275,7 @@ function mod_ban_post($board, $delete, $post, $token = false) {
|
|||||||
if (!hasPermission($config['mod']['delete'], $board))
|
if (!hasPermission($config['mod']['delete'], $board))
|
||||||
error($config['error']['noaccess']);
|
error($config['error']['noaccess']);
|
||||||
|
|
||||||
|
|
||||||
$security_token = make_secure_link_token($board . '/ban/' . $post);
|
$security_token = make_secure_link_token($board . '/ban/' . $post);
|
||||||
|
|
||||||
$query = prepare(sprintf('SELECT ' . ($config['ban_show_post'] ? '*' : '`ip`, `thread`') .
|
$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'];
|
$ip = $_post['ip'];
|
||||||
|
|
||||||
if (isset($_POST['new_ban'], $_POST['reason'], $_POST['length'], $_POST['board'])) {
|
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';
|
require_once 'inc/mod/ban.php';
|
||||||
|
|
||||||
if (isset($_POST['ip']))
|
if (isset($_POST['ip']))
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
{% for board in boards %}
|
{% for board in boards %}
|
||||||
|
{% if board.uri in mod.boards or mod.boards[0] == '*' %}
|
||||||
<li>
|
<li>
|
||||||
<a href="?/{{ config.board_path|sprintf(board.uri) }}{{ config.file_index }}">{{ config.board_abbreviation|sprintf(board.uri) }}</a>
|
<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>
|
<a href="?/edit/{{ board.uri }}"><small>[{% trans 'edit' %}]</small></a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</li>
|
</li>
|
||||||
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
{% if mod|hasPermission(config.mod.newboard) %}
|
{% if mod|hasPermission(config.mod.newboard) %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user