mirror of
https://github.com/vichan-devel/vichan.git
synced 2024-11-29 01:34:31 +01:00
Merge branch 'master' of github.com:vichan-devel/Tinyboard
This commit is contained in:
commit
5de6227fdd
@ -689,22 +689,15 @@ function displayBan($ban) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$ban['ip'] = $_SERVER['REMOTE_ADDR'];
|
$ban['ip'] = $_SERVER['REMOTE_ADDR'];
|
||||||
|
|
||||||
if ($ban['post'] && isset($ban['post']['board'], $ban['post']['id'])) {
|
if ($ban['post'] && isset($ban['post']['board'], $ban['post']['id'])) {
|
||||||
if (openBoard($ban['post']['board'])) {
|
if (openBoard($ban['post']['board'])) {
|
||||||
|
$query = query(sprintf("SELECT `files` FROM ``posts_%s`` WHERE `id` = " .
|
||||||
$query = query(sprintf("SELECT `thumb`, `file` FROM ``posts_%s`` WHERE `id` = " .
|
|
||||||
(int)$ban['post']['id'], $board['uri']));
|
(int)$ban['post']['id'], $board['uri']));
|
||||||
if ($_post = $query->fetch(PDO::FETCH_ASSOC)) {
|
if ($_post = $query->fetch(PDO::FETCH_ASSOC)) {
|
||||||
$ban['post'] = array_merge($ban['post'], $_post);
|
$ban['post'] = array_merge($ban['post'], $_post);
|
||||||
} else {
|
|
||||||
$ban['post']['file'] = 'deleted';
|
|
||||||
$ban['post']['thumb'] = false;
|
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
$ban['post']['file'] = 'deleted';
|
|
||||||
$ban['post']['thumb'] = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($ban['post']['thread']) {
|
if ($ban['post']['thread']) {
|
||||||
$post = new Post($ban['post']);
|
$post = new Post($ban['post']);
|
||||||
} else {
|
} else {
|
||||||
|
3
post.php
3
post.php
@ -568,7 +568,8 @@ if (isset($_POST['delete'])) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($output = shell_exec_error("cat $filenames | md5sum")) {
|
if ($output = shell_exec_error("cat $filenames | md5sum")) {
|
||||||
$hash = explode(' ', $output)[0];
|
$explodedvar = explode(' ', $output);
|
||||||
|
$hash = $explodedvar[0];
|
||||||
$post['filehash'] = $hash;
|
$post['filehash'] = $hash;
|
||||||
} elseif ($config['max_images'] === 1) {
|
} elseif ($config['max_images'] === 1) {
|
||||||
$post['filehash'] = md5_file($upload);
|
$post['filehash'] = md5_file($upload);
|
||||||
|
@ -83,7 +83,7 @@
|
|||||||
|
|
||||||
{% if post and config.ban_show_post %}
|
{% if post and config.ban_show_post %}
|
||||||
<hr>
|
<hr>
|
||||||
<p>{% trans %}You were banned for the following post on {% endtrans %}{{ board.url }}:</p>
|
<p>{% trans %}You were banned for the following post on{% endtrans %} {{ board.url }}:</p>
|
||||||
{{ post }}
|
{{ post }}
|
||||||
<br>
|
<br>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
Loading…
Reference in New Issue
Block a user